|
| 1 | +// Copyright (C) 2014-2015 Jonathan Müller <[email protected]> |
| 2 | +// This file is subject to the license terms in the LICENSE file |
| 3 | +// found in the top-level directory of this distribution. |
| 4 | + |
| 5 | +//=== version ===// |
| 6 | +/// \brief Major version. |
| 7 | +#define FOONATHAN_STRING_ID_VERSION_MAJOR ${version_major} |
| 8 | + |
| 9 | +/// \brief Minor version. |
| 10 | +#define FOONATHAN_STRING_ID_VERSION_MINOR ${version_minor} |
| 11 | + |
| 12 | +/// \brief Total version number. |
| 13 | +#define FOONATHAN_STRING_ID_VERSION (${version_major} * 100 + ${version_minor}) |
| 14 | + |
| 15 | +//=== database ===// |
| 16 | +/// \brief Whether or not the database for string ids is active. |
| 17 | +/// \detail This is \c true by default, change it via CMake option \c FOONATHAN_STRING_ID_DATABASE. |
| 18 | +#define FOONATHAN_STRING_ID_DATABASE |
| 19 | + |
| 20 | +/// \brief Whether or not the database should thread safe. |
| 21 | +/// \detail This is \c true by default, change it via CMake option \c FOONATHAN_STRING_ID_MULTITHREADED. |
| 22 | +#define FOONATHAN_STRING_ID_MULTITHREADED 0 |
| 23 | + |
| 24 | +//=== compatibility ===// |
| 25 | +#define FOONATHAN_IMPL_HAS_NOEXCEPT |
| 26 | +#define FOONATHAN_IMPL_HAS_CONSTEXPR |
| 27 | +#define FOONATHAN_IMPL_HAS_LITERAL |
| 28 | +#define FOONATHAN_IMPL_HAS_OVERRIDE |
| 29 | + |
| 30 | +#ifndef FOONATHAN_NOEXCEPT |
| 31 | + #ifdef FOONATHAN_IMPL_HAS_NOEXCEPT |
| 32 | + #define FOONATHAN_NOEXCEPT noexcept |
| 33 | + #else |
| 34 | + #define FOONATHAN_NOEXCEPT |
| 35 | + #endif |
| 36 | +#endif |
| 37 | + |
| 38 | +#ifndef FOONATHAN_CONSTEXPR |
| 39 | + #ifdef FOONATHAN_IMPL_HAS_CONSTEXPR |
| 40 | + #define FOONATHAN_CONSTEXPR constexpr |
| 41 | + #else |
| 42 | + #define FOONATHAN_CONSTEXPR const |
| 43 | + #endif |
| 44 | +#endif |
| 45 | + |
| 46 | +#ifndef FOONATHAN_CONSTEXPR_FNC |
| 47 | + #ifdef FOONATHAN_IMPL_HAS_CONSTEXPR |
| 48 | + #define FOONATHAN_CONSTEXPR_FNC constexpr |
| 49 | + #else |
| 50 | + #define FOONATHAN_CONSTEXPR_FNC inline |
| 51 | + #endif |
| 52 | +#endif |
| 53 | + |
| 54 | +#ifndef FOONATHAN_OVERRIDE |
| 55 | + #ifdef FOONATHAN_IMPL_HAS_OVERRIDE |
| 56 | + #define FOONATHAN_OVERRIDE override |
| 57 | + #else |
| 58 | + #define FOONATHAN_OVERRIDE |
| 59 | + #endif |
| 60 | +#endif |
| 61 | + |
| 62 | +/// \brief Whether or not the \c constexpr literal operators are availble. |
| 63 | +/// \detail If this is \c false, there is only the \ref id() function which can't be used inside switch cases. |
| 64 | +#define FOONATHAN_STRING_ID_HAS_LITERAL 1 |
| 65 | + |
| 66 | +/// \brief Whether or not the handler functions are atomic. |
| 67 | +//#cmakedefine01 FOONATHAN_STRING_ID_ATOMIC_HANDLER |
0 commit comments