Configuration options

## Description

Configurable options to tweak the global behavior of the library.

## Macros

#define | BOOST_HANA_CONFIG_DISABLE_ASSERTIONS
| Disables the `BOOST_HANA_*_ASSERT` macro & friends. More...
#define | BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS
| Disables concept checks in interface methods. More...
#define | BOOST_HANA_CONFIG_ENABLE_STRING_UDL
| Enables usage of the "string literal operator template" GNU extension. More...
#define | BOOST_HANA_CONFIG_ENABLE_DEBUG_MODE
| Enables additional assertions and sanity checks to be done by Hana. More...
#define | BOOST_HANA_MAJOR_VERSION 1
| Macro expanding to the major version of the library, i.e. the `x` in `x.y.z`.
#define | BOOST_HANA_MINOR_VERSION 7
| Macro expanding to the minor version of the library, i.e. the `y` in `x.y.z`.
#define | BOOST_HANA_PATCH_VERSION 1
| Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`.
#define | BOOST_HANA_VERSION
| Macro expanding to the full version of the library, in hexadecimal representation. More...

## Macro Definition Documentation

## BOOST_HANA_CONFIG_DISABLE_ASSERTIONS

#define BOOST_HANA_CONFIG_DISABLE_ASSERTIONS

`#include <boost/hana/config.hpp>`

Disables the `BOOST_HANA_*_ASSERT` macro & friends.

When this macro is defined, the `BOOST_HANA_*_ASSERT` macro & friends are disabled, i.e. they expand to nothing.

This macro is defined automatically when `NDEBUG` is defined. It can also be defined by users before including this header or defined on the command line.

## BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS

#define BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS

`#include <boost/hana/config.hpp>`

Disables concept checks in interface methods.

When this macro is not defined (the default), tag-dispatched methods will make sure the arguments they are passed are models of the proper concept(s). This can be very helpful in catching programming errors, but it is also slightly less compile-time efficient. You should probably always leave the checks enabled (and hence never define this macro), except perhaps in translation units that are compiled very often but whose code using Hana is modified very rarely.

## BOOST_HANA_CONFIG_ENABLE_STRING_UDL

#define BOOST_HANA_CONFIG_ENABLE_STRING_UDL

`#include <boost/hana/config.hpp>`

Enables usage of the "string literal operator template" GNU extension.

That operator is not part of the language yet, but it is supported by both Clang and GCC. This operator allows Hana to provide the nice `_s` user-defined literal for creating compile-time strings.

When this macro is not defined, the GNU extension will be not used by Hana. Because this is a non-standard extension, the macro is not defined by default.

## BOOST_HANA_CONFIG_ENABLE_DEBUG_MODE

#define BOOST_HANA_CONFIG_ENABLE_DEBUG_MODE

`#include <boost/hana/config.hpp>`

Enables additional assertions and sanity checks to be done by Hana.

When this macro is defined (it is not defined by default), additional sanity checks may be done by Hana. These checks may be costly to perform, either in terms of compilation time or in terms of execution time. These checks may help debugging an application during its initial development, but they should not be enabled as part of the normal configuration.

## BOOST_HANA_VERSION

#define BOOST_HANA_VERSION

`#include <boost/hana/version.hpp>`

Value:
BOOST_HANA_CONFIG_VERSION(BOOST_HANA_MAJOR_VERSION, \
BOOST_HANA_MINOR_VERSION, \
BOOST_HANA_PATCH_VERSION) \
BOOST_HANA_PATCH_VERSION
#define BOOST_HANA_PATCH_VERSION
Macro expanding to the patch level of the library, i.e. the z in x.y.z.
Definition: version.hpp:31
BOOST_HANA_MAJOR_VERSION
#define BOOST_HANA_MAJOR_VERSION
Macro expanding to the major version of the library, i.e. the x in x.y.z.
Definition: version.hpp:23
BOOST_HANA_MINOR_VERSION
#define BOOST_HANA_MINOR_VERSION
Macro expanding to the minor version of the library, i.e. the y in x.y.z.
Definition: version.hpp:27
BOOST_HANA_CONFIG_VERSION
#define BOOST_HANA_CONFIG_VERSION(version, revision, patch)
Definition: version.hpp:18

Macro expanding to the full version of the library, in hexadecimal representation.

Specifically, `BOOST_HANA_VERSION` expands to an hexadecimal number of the form 0xVVRRPPPP, where `VV` is the major version of the library, `RR` is the minor version and `PPPP` is the patch level. This allows the version of the library to be compared:

#include <boost/hana/version.hpp>
#if BOOST_HANA_VERSION < 0x01020003
// Hana's version is < 1.2.3
#else
// Hana's version is >= 1.2.3
#endif
version.hpp
Defines macros for tracking the version of the library.

Note
  The major, minor and patch versions of the library are also available individually with the `BOOST_HANA_{MAJOR,MINOR,PATCH}_VERSION` macros.