From 05a1ebfa858d86be9d91c639b6caf839b08d2254 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sat, 29 Jun 2013 13:27:11 +0900 Subject: [PATCH] add compiler-config: SPROUT_NO_CXX14_CONSTEXPR --- sprout/config/auto_config.hpp | 45 +++++++++++++--------- sprout/config/compiler.hpp | 2 +- sprout/config/compiler/borland.hpp | 20 +++++----- sprout/config/compiler/clang.hpp | 22 ++++++----- sprout/config/compiler/codegear.hpp | 20 +++++----- sprout/config/compiler/common_edg.hpp | 20 +++++----- sprout/config/compiler/digitalmars.hpp | 20 +++++----- sprout/config/compiler/gcc.hpp | 20 +++++----- sprout/config/compiler/gcc_xml.hpp | 20 +++++----- sprout/config/compiler/has_future.hpp | 18 ++++----- sprout/config/compiler/metrowerks.hpp | 20 +++++----- sprout/config/compiler/mpw.hpp | 20 +++++----- sprout/config/compiler/no_cxx11_future.hpp | 32 --------------- sprout/config/compiler/no_future.hpp | 32 +++++++++++++++ sprout/config/compiler/pathscale.hpp | 20 +++++----- sprout/config/compiler/pgi.hpp | 20 +++++----- sprout/config/compiler/sunpro_cc.hpp | 20 +++++----- sprout/config/compiler/vacpp.hpp | 20 +++++----- sprout/config/compiler/visualc.hpp | 20 +++++----- sprout/config/suffix.hpp | 6 ++- 20 files changed, 229 insertions(+), 188 deletions(-) delete mode 100644 sprout/config/compiler/no_cxx11_future.hpp create mode 100644 sprout/config/compiler/no_future.hpp diff --git a/sprout/config/auto_config.hpp b/sprout/config/auto_config.hpp index 74a786c5..121e430d 100644 --- a/sprout/config/auto_config.hpp +++ b/sprout/config/auto_config.hpp @@ -7,81 +7,90 @@ // SPROUT_CONFIG_DISABLE_CONSTEXPR // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# ifdef SPROUT_NO_CONSTEXPR +# ifdef SPROUT_NO_CXX11_CONSTEXPR # define SPROUT_CONFIG_DISABLE_CONSTEXPR -# endif // #ifdef SPROUT_NO_CONSTEXPR +# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR +#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR + +// +// SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +// +#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +# ifdef SPROUT_NO_CXX14_CONSTEXPR +# define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +# endif // #ifdef SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR // // SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# ifdef SPROUT_NO_DEFAULTED_FUNCTIONS +# ifdef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS # define SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# endif // #ifdef SPROUT_NO_CONSTEXPR +# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS // // SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# ifdef SPROUT_NO_DELETED_FUNCTIONS +# ifdef SPROUT_NO_CXX11_DELETED_FUNCTIONS # define SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# endif // #ifdef SPROUT_NO_CONSTEXPR +# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS // // SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# ifdef SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +# ifdef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# endif // #ifdef SPROUT_NO_CONSTEXPR +# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS // // SPROUT_CONFIG_DISABLE_NOEXCEPT // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# ifdef SPROUT_NO_NOEXCEPT +# ifdef SPROUT_NO_CXX11_NOEXCEPT # define SPROUT_CONFIG_DISABLE_NOEXCEPT -# endif // #ifdef SPROUT_NO_NOEXCEPT +# endif // #ifdef SPROUT_NO_CXX11_NOEXCEPT #endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT // // SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# ifdef SPROUT_NO_TEMPLATE_ALIASES +# ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES # define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# endif // #ifdef SPROUT_NO_TEMPLATE_ALIASES +# endif // #ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES #endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES // // SPROUT_USE_USER_DEFINED_LITERALS // #ifndef SPROUT_USE_USER_DEFINED_LITERALS -# ifdef SPROUT_NO_USER_DEFINED_LITERALS +# ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS # define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# endif // #ifdef SPROUT_NO_USER_DEFINED_LITERALS +# endif // #ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS #endif // #ifndef SPROUT_USE_USER_DEFINED_LITERALS // // SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# ifdef SPROUT_NO_DELEGATING_CONSTRUCTORS +# ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS # define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# endif // #ifdef SPROUT_NO_DELEGATING_CONSTRUCTORS +# endif // #ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS #endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS // // SPROUT_CONFIG_DISABLE_UNICODE_LITERALS // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# ifdef SPROUT_NO_UNICODE_LITERALS +# ifdef SPROUT_NO_CXX11_UNICODE_LITERALS # define SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# endif // #ifdef SPROUT_NO_UNICODE_LITERALS +# endif // #ifdef SPROUT_NO_CXX11_UNICODE_LITERALS #endif // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS // diff --git a/sprout/config/compiler.hpp b/sprout/config/compiler.hpp index 2f0548a2..77f39692 100644 --- a/sprout/config/compiler.hpp +++ b/sprout/config/compiler.hpp @@ -47,7 +47,7 @@ # include #endif -#include +#include #include #endif // #ifndef SPROUT_CONFIG_COMPILER_HPP diff --git a/sprout/config/compiler/borland.hpp b/sprout/config/compiler/borland.hpp index 4c32d2cc..ceb7e163 100644 --- a/sprout/config/compiler/borland.hpp +++ b/sprout/config/compiler/borland.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP #define SPROUT_CONFIG_COMPILER_BORLAND_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP diff --git a/sprout/config/compiler/clang.hpp b/sprout/config/compiler/clang.hpp index 3abdb8dc..e62504db 100644 --- a/sprout/config/compiler/clang.hpp +++ b/sprout/config/compiler/clang.hpp @@ -2,42 +2,44 @@ #define SPROUT_CONFIG_COMPILER_CLANG_HPP #if !__has_feature(cxx_constexpr) -# define SPROUT_NO_CONSTEXPR +# define SPROUT_NO_CXX11_CONSTEXPR #endif #if !__has_feature(cxx_defaulted_functions) -# define SPROUT_NO_DEFAULTED_FUNCTIONS +# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS #endif #if !__has_feature(cxx_deleted_functions) -# define SPROUT_NO_DELETED_FUNCTIONS +# define SPROUT_NO_CXX11_DELETED_FUNCTIONS #endif #if !__has_feature(cxx_explicit_conversions) -# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if !__has_feature(cxx_noexcept) -# define SPROUT_NO_NOEXCEPT +# define SPROUT_NO_CXX11_NOEXCEPT #endif #if !__has_feature(cxx_alias_templates) -# define SPROUT_NO_TEMPLATE_ALIASES +# define SPROUT_NO_CXX11_TEMPLATE_ALIASES #endif #if !__has_feature(cxx_user_literals) -# define SPROUT_NO_USER_DEFINED_LITERALS +# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS #endif #if !__has_feature(cxx_delegating_constructors) -# define SPROUT_NO_DELEGATING_CONSTRUCTORS +# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS #endif #if !__has_feature(cxx_unicode_literals) -# define SPROUT_NO_UNICODE_LITERALS +# define SPROUT_NO_CXX11_UNICODE_LITERALS #endif -#if !defined(SPROUT_NO_CONSTEXPR) +#define SPROUT_NO_CXX14_CONSTEXPR + +#if !defined(SPROUT_NO_CXX11_CONSTEXPR) # define SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE #endif diff --git a/sprout/config/compiler/codegear.hpp b/sprout/config/compiler/codegear.hpp index e45f89d6..705c98de 100644 --- a/sprout/config/compiler/codegear.hpp +++ b/sprout/config/compiler/codegear.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP #define SPROUT_CONFIG_COMPILER_CODEGEAR_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP diff --git a/sprout/config/compiler/common_edg.hpp b/sprout/config/compiler/common_edg.hpp index d6343fb9..9a45ba07 100644 --- a/sprout/config/compiler/common_edg.hpp +++ b/sprout/config/compiler/common_edg.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP #define SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP diff --git a/sprout/config/compiler/digitalmars.hpp b/sprout/config/compiler/digitalmars.hpp index e42a781c..a7127a89 100644 --- a/sprout/config/compiler/digitalmars.hpp +++ b/sprout/config/compiler/digitalmars.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP #define SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP diff --git a/sprout/config/compiler/gcc.hpp b/sprout/config/compiler/gcc.hpp index 6edc250e..b5b10b9c 100644 --- a/sprout/config/compiler/gcc.hpp +++ b/sprout/config/compiler/gcc.hpp @@ -2,39 +2,39 @@ #define SPROUT_CONFIG_COMPILER_GCC_HPP #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_CONSTEXPR +# define SPROUT_NO_CXX11_CONSTEXPR #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_DEFAULTED_FUNCTIONS +# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_DELETED_FUNCTIONS +# define SPROUT_NO_CXX11_DELETED_FUNCTIONS #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_NOEXCEPT +# define SPROUT_NO_CXX11_NOEXCEPT #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_TEMPLATE_ALIASES +# define SPROUT_NO_CXX11_TEMPLATE_ALIASES #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_USER_DEFINED_LITERALS +# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_DELEGATING_CONSTRUCTORS +# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS #endif #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_NO_UNICODE_LITERALS +# define SPROUT_NO_CXX11_UNICODE_LITERALS #endif #if ((__GNUC__ >= 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) @@ -45,4 +45,6 @@ # define SPROUT_HAS_CONSTEXPR_BIT_OPERATION #endif +#define SPROUT_NO_CXX14_CONSTEXPR + #endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP diff --git a/sprout/config/compiler/gcc_xml.hpp b/sprout/config/compiler/gcc_xml.hpp index c4d60533..018c53f0 100644 --- a/sprout/config/compiler/gcc_xml.hpp +++ b/sprout/config/compiler/gcc_xml.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP #define SPROUT_CONFIG_COMPILER_GCC_XML_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP diff --git a/sprout/config/compiler/has_future.hpp b/sprout/config/compiler/has_future.hpp index 296fd6c8..f7465f00 100644 --- a/sprout/config/compiler/has_future.hpp +++ b/sprout/config/compiler/has_future.hpp @@ -1,31 +1,31 @@ #ifndef SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP #define SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP -#ifndef SPROUT_NO_CONSTEXPR +#ifndef SPROUT_NO_CXX11_CONSTEXPR # define SPROUT_HAS_CONSTEXPR #endif -#ifndef SPROUT_NO_DEFAULTED_FUNCTIONS +#ifndef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS # define SPROUT_HAS_DEFAULTED_FUNCTIONS #endif -#ifndef SPROUT_NO_DELETED_FUNCTIONS +#ifndef SPROUT_NO_CXX11_DELETED_FUNCTIONS # define SPROUT_HAS_DELETED_FUNCTIONS #endif -#ifndef SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +#ifndef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define SPROUT_HAS_EXPLICIT_CONVERSION_OPERATORS #endif -#ifndef SPROUT_NO_NOEXCEPT +#ifndef SPROUT_NO_CXX11_NOEXCEPT # define SPROUT_HAS_NOEXCEPT #endif -#ifndef SPROUT_NO_TEMPLATE_ALIASES +#ifndef SPROUT_NO_CXX11_TEMPLATE_ALIASES # define SPROUT_HAS_TEMPLATE_ALIASES #endif -#ifndef SPROUT_NO_USER_DEFINED_LITERALS +#ifndef SPROUT_NO_CXX11_USER_DEFINED_LITERALS # define SPROUT_HAS_USER_DEFINED_LITERALS #endif -#ifndef SPROUT_NO_DELEGATING_CONSTRUCTORS +#ifndef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS # define SPROUT_HAS_DELEGATING_CONSTRUCTORS #endif -#ifndef SPROUT_NO_UNICODE_LITERALS +#ifndef SPROUT_NO_CXX11_UNICODE_LITERALS # define SPROUT_HAS_UNICODE_LITERALS #endif diff --git a/sprout/config/compiler/metrowerks.hpp b/sprout/config/compiler/metrowerks.hpp index ac52eb7c..861c69bb 100644 --- a/sprout/config/compiler/metrowerks.hpp +++ b/sprout/config/compiler/metrowerks.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP #define SPROUT_CONFIG_COMPILER_METROWERKS_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP diff --git a/sprout/config/compiler/mpw.hpp b/sprout/config/compiler/mpw.hpp index 35089da0..dcc744c2 100644 --- a/sprout/config/compiler/mpw.hpp +++ b/sprout/config/compiler/mpw.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_MPW_HPP #define SPROUT_CONFIG_COMPILER_MPW_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_MPW_HPP diff --git a/sprout/config/compiler/no_cxx11_future.hpp b/sprout/config/compiler/no_cxx11_future.hpp deleted file mode 100644 index 122a0cb7..00000000 --- a/sprout/config/compiler/no_cxx11_future.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP -#define SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP - -#ifdef SPROUT_NO_CONSTEXPR -# define SPROUT_NO_CXX11_CONSTEXPR -#endif -#ifdef SPROUT_NO_DEFAULTED_FUNCTIONS -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#endif -#ifdef SPROUT_NO_DELETED_FUNCTIONS -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#endif -#ifdef SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#ifdef SPROUT_NO_NOEXCEPT -# define SPROUT_NO_CXX11_NOEXCEPT -#endif -#ifdef SPROUT_NO_TEMPLATE_ALIASES -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif -#ifdef SPROUT_NO_USER_DEFINED_LITERALS -# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#endif -#ifdef SPROUT_NO_DELEGATING_CONSTRUCTORS -# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#endif -#ifdef SPROUT_NO_UNICODE_LITERALS -# define SPROUT_NO_CXX11_UNICODE_LITERALS -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP diff --git a/sprout/config/compiler/no_future.hpp b/sprout/config/compiler/no_future.hpp new file mode 100644 index 00000000..0289ade1 --- /dev/null +++ b/sprout/config/compiler/no_future.hpp @@ -0,0 +1,32 @@ +#ifndef SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP +#define SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP + +#ifdef SPROUT_NO_CXX11_CONSTEXPR +# define SPROUT_NO_CONSTEXPR +#endif +#ifdef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +# define SPROUT_NO_DEFAULTED_FUNCTIONS +#endif +#ifdef SPROUT_NO_CXX11_DELETED_FUNCTIONS +# define SPROUT_NO_DELETED_FUNCTIONS +#endif +#ifdef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +#endif +#ifdef SPROUT_NO_CXX11_NOEXCEPT +# define SPROUT_NO_NOEXCEPT +#endif +#ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES +# define SPROUT_NO_TEMPLATE_ALIASES +#endif +#ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS +# define SPROUT_NO_USER_DEFINED_LITERALS +#endif +#ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +# define SPROUT_NO_DELEGATING_CONSTRUCTORS +#endif +#ifdef SPROUT_NO_CXX11_UNICODE_LITERALS +# define SPROUT_NO_UNICODE_LITERALS +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP diff --git a/sprout/config/compiler/pathscale.hpp b/sprout/config/compiler/pathscale.hpp index 3ae11de7..3308ecab 100644 --- a/sprout/config/compiler/pathscale.hpp +++ b/sprout/config/compiler/pathscale.hpp @@ -2,15 +2,17 @@ #define SPROUT_CONFIG_COMPILER_PATHSCALE_HPP #if __PATHCC__ >= 4 -# define SPROUT_NO_CONSTEXPR -# define SPROUT_NO_DEFAULTED_FUNCTIONS -# define SPROUT_NO_DELETED_FUNCTIONS -# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_NOEXCEPT -# define SPROUT_NO_TEMPLATE_ALIASES -# define SPROUT_NO_USER_DEFINED_LITERALS -# define SPROUT_NO_DELEGATING_CONSTRUCTORS -# define SPROUT_NO_UNICODE_LITERALS +# define SPROUT_NO_CXX11_CONSTEXPR +# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +# define SPROUT_NO_CXX11_DELETED_FUNCTIONS +# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define SPROUT_NO_CXX11_NOEXCEPT +# define SPROUT_NO_CXX11_TEMPLATE_ALIASES +# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +# define SPROUT_NO_CXX11_UNICODE_LITERALS + +# define SPROUT_NO_CXX14_CONSTEXPR #endif #endif // #ifndef SPROUT_CONFIG_COMPILER_PATHSCALE_HPP diff --git a/sprout/config/compiler/pgi.hpp b/sprout/config/compiler/pgi.hpp index c08ccf04..c4603fcf 100644 --- a/sprout/config/compiler/pgi.hpp +++ b/sprout/config/compiler/pgi.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_PGI_HPP #define SPROUT_CONFIG_COMPILER_PGI_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_PGI_HPP diff --git a/sprout/config/compiler/sunpro_cc.hpp b/sprout/config/compiler/sunpro_cc.hpp index c4d91638..8f030960 100644 --- a/sprout/config/compiler/sunpro_cc.hpp +++ b/sprout/config/compiler/sunpro_cc.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP #define SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP diff --git a/sprout/config/compiler/vacpp.hpp b/sprout/config/compiler/vacpp.hpp index 29159b77..5d36ebff 100644 --- a/sprout/config/compiler/vacpp.hpp +++ b/sprout/config/compiler/vacpp.hpp @@ -2,17 +2,19 @@ #define SPROUT_CONFIG_COMPILER_VACPP_HPP #if !__IBMCPP_CONSTEXPR -# define SPROUT_NO_CONSTEXPR +# define SPROUT_NO_CXX11_CONSTEXPR #endif -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS #if !__IBMCPP_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS +# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_VACPP_HPP diff --git a/sprout/config/compiler/visualc.hpp b/sprout/config/compiler/visualc.hpp index ee26fdff..7a31246c 100644 --- a/sprout/config/compiler/visualc.hpp +++ b/sprout/config/compiler/visualc.hpp @@ -1,14 +1,16 @@ #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP #define SPROUT_CONFIG_COMPILER_VISUALC_HPP -#define SPROUT_NO_CONSTEXPR -#define SPROUT_NO_DEFAULTED_FUNCTIONS -#define SPROUT_NO_DELETED_FUNCTIONS -#define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_NOEXCEPT -#define SPROUT_NO_TEMPLATE_ALIASES -#define SPROUT_NO_USER_DEFINED_LITERALS -#define SPROUT_NO_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_UNICODE_LITERALS +#define SPROUT_NO_CXX11_CONSTEXPR +#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +#define SPROUT_NO_CXX11_DELETED_FUNCTIONS +#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define SPROUT_NO_CXX11_NOEXCEPT +#define SPROUT_NO_CXX11_TEMPLATE_ALIASES +#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS +#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +#define SPROUT_NO_CXX11_UNICODE_LITERALS + +#define SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP diff --git a/sprout/config/suffix.hpp b/sprout/config/suffix.hpp index 46b2684c..5706cf57 100644 --- a/sprout/config/suffix.hpp +++ b/sprout/config/suffix.hpp @@ -27,7 +27,11 @@ // // SPROUT_CXX14_CONSTEXPR // -#define SPROUT_CXX14_CONSTEXPR +#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +# define SPROUT_CXX14_CONSTEXPR constexpr +#else // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +# define SPROUT_CXX14_CONSTEXPR +#endif // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR // // SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL