diff --git a/README b/README index ef86dff9..99d7c59e 100644 --- a/README +++ b/README @@ -43,9 +43,12 @@ constexpr 乱数 (Random numbers) sprout/random.hpp sprout/random/unique_seed.hpp +constexpr 関数オブジェクト (functors) + sprout/functional.hpp + constexpr ハッシュ関数 (Hash functions) - sprout/functional/hash.hpp sprout/checksum/sha1.hpp + sprout/functional/hash.hpp constexpr UUID (UUID) sprout/uuid.hpp @@ -72,21 +75,39 @@ constexpr レイトレーシング (Ray tracing) #define SPROUT_CONFIG_DISABLE_CONSTEXPR このマクロが定義されているとき、関数は constexpr 指定されない。 -コンパイラが constexpr に対応していない場合。 +コンパイラが constexpr に対応していない場合、これを定義すべき。 +通常、これはコンパイラに応じて自動的に定義される。 (When this macro is defined, the functions are not specified constexpr. - If the compiler does not support constexpr.) + If the compiler does not support constexpr, should define it. + Usually, it defined automatically depending to the compiler.) #define SPROUT_CONFIG_DISABLE_NOEXCEPT このマクロが定義されているとき、関数は noexcept 修飾されない。 -コンパイラが noexcept に対応していない場合。 +コンパイラが noexcept に対応していない場合、これを定義すべき。 +通常、これはコンパイラに応じて自動的に定義される。 (When this macro is defined, the functions are not qualified noexcept. - If the compiler does not support noexcept.) + If the compiler does not support noexcept, should define it. + Usually, it defined automatically depending to the compiler.) #define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES このマクロが定義されているとき、Template aliases によるエイリアスは定義されない。 -コンパイラが Template aliases に対応していない場合。 +コンパイラが Template aliases に対応していない場合、これを定義すべき。 +通常、これはコンパイラに応じて自動的に定義される。 (When this macro is defined, the aliases are not defined by the Template aliases. - If the compiler does not support Template aliases.) + If the compiler does not support Template aliases, should define it. + Usually, it defined automatically depending to the compiler.) + +#define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS +このマクロが定義されているとき、Delegating constructors による実装は行われない。 +コンパイラが Delegating constructors に対応していない場合、これを定義すべき。 +通常、これはコンパイラに応じて自動的に定義される。 + (When this macro is defined, the implementation is not done by Delegating constructors. + If the compiler does not support Delegating constructors, should define it. + Usually, it defined automatically depending to the compiler.) + +#define SPROUT_CONFIG_DISABLE_AUTO_CONFIG +このマクロが定義されているとき、自動的な言語機能の無効化は行われない。 + (When this macro is defined, not automatically disable language features.) #define SPROUT_CONFIG_USE_SSCRISK_CEL このマクロが定義されているとき、実装の詳細として CEL - ConstExpr Library を使用する。 @@ -110,7 +131,7 @@ https://github.com/sscrisk/CEL---ConstExpr-Library Bolero MURAKAMI Blog: http://d.hatena.ne.jp/boleros/ -Twitter: http://twitter.com/#!/bolero_MURAKAMI +Twitter: https://twitter.com/#!/bolero_MURAKAMI Mail: contact-lib@boleros.x0.com diff --git a/sprout/auto_config.hpp b/sprout/auto_config.hpp deleted file mode 100644 index 90e95165..00000000 --- a/sprout/auto_config.hpp +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef SPROUT_AUTO_CONFIG_HPP -#define SPROUT_AUTO_CONFIG_HPP - -#include - -// -// SPROUT_CONFIG_DISABLE_CONSTEXPR -// -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# ifdef BOOST_NO_CONSTEXPR -# if !defined(__GNUC__) \ - || defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_CONFIG_DISABLE_CONSTEXPR -# endif -# endif // #ifdef BOOST_NO_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -// -// SPROUT_CONFIG_DISABLE_NOEXCEPT -// -#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# ifdef BOOST_NO_NOEXCEPT -# if !defined(__GNUC__) \ - || defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_CONFIG_DISABLE_NOEXCEPT -# endif -# endif // #ifdef BOOST_NO_NOEXCEPT -#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT - -// -// SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -// -#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# ifdef BOOST_NO_TEMPLATE_ALIASES -# if !defined(__GNUC__) \ - || defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# endif -# endif // #ifdef BOOST_NO_TEMPLATE_ALIASES -#endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES - -// -// SPROUT_USE_USER_DEFINED_LITERALS -// - -// -// SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -// - -// -// SPROUT_CONFIG_USE_SSCRISK_CEL -// - -// -// SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -// SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -// -#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION - -#include - -#endif // #ifndef SPROUT_AUTO_CONFIG_HPP diff --git a/sprout/config.hpp b/sprout/config.hpp index 8856a75e..fa317cd3 100644 --- a/sprout/config.hpp +++ b/sprout/config.hpp @@ -1,61 +1,6 @@ #ifndef SPROUT_CONFIG_HPP #define SPROUT_CONFIG_HPP -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define SPROUT_CONSTEXPR constexpr -# define SPROUT_CONSTEXPR_OR_CONST constexpr -# define SPROUT_STATIC_CONSTEXPR static constexpr -#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define SPROUT_CONSTEXPR -# define SPROUT_CONSTEXPR_OR_CONST const -# define SPROUT_STATIC_CONSTEXPR static const -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# define SPROUT_NOEXCEPT noexcept -# define SPROUT_NOEXCEPT_EXPR(EXPR) noexcept(EXPR) -#else // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# define SPROUT_NOEXCEPT -# define SPROUT_NOEXCEPT_EXPR(EXPR) -#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT - -#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# define SPROUT_USE_TEMPLATE_ALIASES 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# define SPROUT_USE_TEMPLATE_ALIASES 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES - -#ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# define SPROUT_USE_USER_DEFINED_LITERALS 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# define SPROUT_USE_USER_DEFINED_LITERALS 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS - -#ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# define SPROUT_USE_DELEGATING_CONSTRUCTORS 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# define SPROUT_USE_DELEGATING_CONSTRUCTORS 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS - -#ifndef SPROUT_CONFIG_USE_SSCRISK_CEL -# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT -# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT -# define NS_SSCRISK_CEL_OR_SPROUT sprout -#else // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL -# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT -# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT -# define NS_SSCRISK_CEL_OR_SPROUT sscrisk::cel -#endif // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL - -#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# ifdef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# error config conflict: SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION, SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# endif // #ifndef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +#include #endif // #ifndef SPROUT_CONFIG_HPP diff --git a/sprout/config/auto_config.hpp b/sprout/config/auto_config.hpp new file mode 100644 index 00000000..b694fe93 --- /dev/null +++ b/sprout/config/auto_config.hpp @@ -0,0 +1,63 @@ +#ifndef SPROUT_CONFIG_AUTO_CONFIG_HPP +#define SPROUT_CONFIG_AUTO_CONFIG_HPP + +#include + +// +// SPROUT_CONFIG_DISABLE_CONSTEXPR +// +#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR +# ifdef SPROUT_NO_CONSTEXPR +# define SPROUT_CONFIG_DISABLE_CONSTEXPR +# endif // #ifdef SPROUT_NO_CONSTEXPR +#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR + +// +// SPROUT_CONFIG_DISABLE_NOEXCEPT +// +#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT +# ifdef SPROUT_NO_NOEXCEPT +# define SPROUT_CONFIG_DISABLE_NOEXCEPT +# endif // #ifdef SPROUT_NO_NOEXCEPT +#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT + +// +// SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +// +#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +# ifdef SPROUT_NO_TEMPLATE_ALIASES +# define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +# endif // #ifdef SPROUT_NO_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 +# define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS +# endif // #ifdef SPROUT_NO_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 +# define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS +# endif // #ifdef SPROUT_NO_DELEGATING_CONSTRUCTORS +#endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS + +// +// SPROUT_CONFIG_USE_SSCRISK_CEL +// + +// +// SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +// SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION +// +#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# define SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION +#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION + +#endif // #ifndef SPROUT_CONFIG_AUTO_CONFIG_HPP diff --git a/sprout/config/compiler.hpp b/sprout/config/compiler.hpp new file mode 100644 index 00000000..bb457db9 --- /dev/null +++ b/sprout/config/compiler.hpp @@ -0,0 +1,50 @@ +#ifndef SPROUT_CONFIG_COMPILER_HPP +#define SPROUT_CONFIG_COMPILER_HPP + +#if defined(__GCCXML__) +# include +#elif defined(_CRAYC) +# include +#elif defined __CUDACC__ +# include +#elif defined __COMO__ +# include +#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) +# include +#elif defined __clang__ +# include +#elif defined __DMC__ +# include +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +# include +# elif defined __GNUC__ +# include +#elif defined __KCC +# include +#elif defined __sgi +# include +#elif defined __DECCXX +# include +#elif defined __ghs +# include +#elif defined __CODEGEARC__ +# include +#elif defined __BORLANDC__ +# include +#elif defined __MWERKS__ +# include +#elif defined __SUNPRO_CC +# include +#elif defined __HP_aCC +# include +#elif defined(__MRC__) || defined(__SC__) +# include +#elif defined(__IBMCPP__) +# include +#elif defined(__PGI) +# include +#elif defined(_MSC_VER) +# include +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_HPP diff --git a/sprout/config/compiler/borland.hpp b/sprout/config/compiler/borland.hpp new file mode 100644 index 00000000..55f9c960 --- /dev/null +++ b/sprout/config/compiler/borland.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP +#define SPROUT_CONFIG_COMPILER_BORLAND_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP diff --git a/sprout/config/compiler/clang.hpp b/sprout/config/compiler/clang.hpp new file mode 100644 index 00000000..8f791129 --- /dev/null +++ b/sprout/config/compiler/clang.hpp @@ -0,0 +1,24 @@ +#ifndef SPROUT_CONFIG_COMPILER_CLANG_HPP +#define SPROUT_CONFIG_COMPILER_CLANG_HPP + +#if !__has_feature(cxx_constexpr) +# define SPROUT_NO_CONSTEXPR +#endif + +#if !__has_feature(cxx_noexcept) +# define SPROUT_NO_NOEXCEPT +#endif + +#if !__has_feature(cxx_alias_templates) +# define SPROUT_NO_TEMPLATE_ALIASES +#endif + +#if !__has_feature(cxx_user_literals) +# define SPROUT_NO_USER_DEFINED_LITERALS +#endif + +#if !__has_feature(cxx_delegating_constructors) +# define SPROUT_NO_DELEGATING_CONSTRUCTORS +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_CLANG_HPP diff --git a/sprout/config/compiler/codegear.hpp b/sprout/config/compiler/codegear.hpp new file mode 100644 index 00000000..924228df --- /dev/null +++ b/sprout/config/compiler/codegear.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP +#define SPROUT_CONFIG_COMPILER_CODEGEAR_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP diff --git a/sprout/config/compiler/comeau.hpp b/sprout/config/compiler/comeau.hpp new file mode 100644 index 00000000..8656f0ab --- /dev/null +++ b/sprout/config/compiler/comeau.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP +#define SPROUT_CONFIG_COMPILER_COMEAU_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP diff --git a/sprout/config/compiler/common_edg.hpp b/sprout/config/compiler/common_edg.hpp new file mode 100644 index 00000000..dfdd1c05 --- /dev/null +++ b/sprout/config/compiler/common_edg.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP +#define SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP diff --git a/sprout/config/compiler/compaq_cxx.hpp b/sprout/config/compiler/compaq_cxx.hpp new file mode 100644 index 00000000..0c55a212 --- /dev/null +++ b/sprout/config/compiler/compaq_cxx.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP +#define SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP diff --git a/sprout/config/compiler/cray.hpp b/sprout/config/compiler/cray.hpp new file mode 100644 index 00000000..8111615a --- /dev/null +++ b/sprout/config/compiler/cray.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP +#define SPROUT_CONFIG_COMPILER_CRAY_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP diff --git a/sprout/config/compiler/digitalmars.hpp b/sprout/config/compiler/digitalmars.hpp new file mode 100644 index 00000000..6e8de695 --- /dev/null +++ b/sprout/config/compiler/digitalmars.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP +#define SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP diff --git a/sprout/config/compiler/gcc.hpp b/sprout/config/compiler/gcc.hpp new file mode 100644 index 00000000..701757eb --- /dev/null +++ b/sprout/config/compiler/gcc.hpp @@ -0,0 +1,24 @@ +#ifndef SPROUT_CONFIG_COMPILER_GCC_HPP +#define SPROUT_CONFIG_COMPILER_GCC_HPP + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +# define SPROUT_NO_CONSTEXPR +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +# define SPROUT_NO_NOEXCEPT +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +# define SPROUT_NO_TEMPLATE_ALIASES +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +# define SPROUT_NO_USER_DEFINED_LITERALS +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +# define SPROUT_NO_DELEGATING_CONSTRUCTORS +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP diff --git a/sprout/config/compiler/gcc_xml.hpp b/sprout/config/compiler/gcc_xml.hpp new file mode 100644 index 00000000..2e803135 --- /dev/null +++ b/sprout/config/compiler/gcc_xml.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP +#define SPROUT_CONFIG_COMPILER_GCC_XML_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP diff --git a/sprout/config/compiler/greenhills.hpp b/sprout/config/compiler/greenhills.hpp new file mode 100644 index 00000000..ac31a832 --- /dev/null +++ b/sprout/config/compiler/greenhills.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP +#define SPROUT_CONFIG_COMPILER_GREENHILLS_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP diff --git a/sprout/config/compiler/hp_acc.hpp b/sprout/config/compiler/hp_acc.hpp new file mode 100644 index 00000000..4a3f14e1 --- /dev/null +++ b/sprout/config/compiler/hp_acc.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP +#define SPROUT_CONFIG_COMPILER_HP_ACC_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP diff --git a/sprout/config/compiler/intel.hpp b/sprout/config/compiler/intel.hpp new file mode 100644 index 00000000..92682a03 --- /dev/null +++ b/sprout/config/compiler/intel.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP +#define SPROUT_CONFIG_COMPILER_INTEL_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP diff --git a/sprout/config/compiler/kai.hpp b/sprout/config/compiler/kai.hpp new file mode 100644 index 00000000..524e2645 --- /dev/null +++ b/sprout/config/compiler/kai.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_KAI_HPP +#define SPROUT_CONFIG_COMPILER_KAI_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_KAI_HPP diff --git a/sprout/config/compiler/metrowerks.hpp b/sprout/config/compiler/metrowerks.hpp new file mode 100644 index 00000000..15710503 --- /dev/null +++ b/sprout/config/compiler/metrowerks.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP +#define SPROUT_CONFIG_COMPILER_METROWERKS_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP diff --git a/sprout/config/compiler/mpw.hpp b/sprout/config/compiler/mpw.hpp new file mode 100644 index 00000000..e7cc977a --- /dev/null +++ b/sprout/config/compiler/mpw.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_MPW_HPP +#define SPROUT_CONFIG_COMPILER_MPW_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_MPW_HPP diff --git a/sprout/config/compiler/nvcc.hpp b/sprout/config/compiler/nvcc.hpp new file mode 100644 index 00000000..74610f21 --- /dev/null +++ b/sprout/config/compiler/nvcc.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP +#define SPROUT_CONFIG_COMPILER_NVCC_HPP + +#if defined(__GNUC__) +# include +#elif defined(_MSC_VER) +# include +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP diff --git a/sprout/config/compiler/pathscale.hpp b/sprout/config/compiler/pathscale.hpp new file mode 100644 index 00000000..66298b09 --- /dev/null +++ b/sprout/config/compiler/pathscale.hpp @@ -0,0 +1,12 @@ +#ifndef SPROUT_CONFIG_COMPILER_PATHSCALE_HPP +#define SPROUT_CONFIG_COMPILER_PATHSCALE_HPP + +#if __PATHCC__ >= 4 +# define SPROUT_NO_CONSTEXPR +# define SPROUT_NO_NOEXCEPT +# define SPROUT_NO_TEMPLATE_ALIASES +# define SPROUT_NO_USER_DEFINED_LITERALS +# define SPROUT_NO_DELEGATING_CONSTRUCTORS +#endif + +#endif // #ifndef SPROUT_CONFIG_COMPILER_PATHSCALE_HPP diff --git a/sprout/config/compiler/pgi.hpp b/sprout/config/compiler/pgi.hpp new file mode 100644 index 00000000..2879a552 --- /dev/null +++ b/sprout/config/compiler/pgi.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_PGI_HPP +#define SPROUT_CONFIG_COMPILER_PGI_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_PGI_HPP diff --git a/sprout/config/compiler/sgi_mipspro.hpp b/sprout/config/compiler/sgi_mipspro.hpp new file mode 100644 index 00000000..d235769f --- /dev/null +++ b/sprout/config/compiler/sgi_mipspro.hpp @@ -0,0 +1,6 @@ +#ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP +#define SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP + +#include + +#endif // #ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP diff --git a/sprout/config/compiler/sunpro_cc.hpp b/sprout/config/compiler/sunpro_cc.hpp new file mode 100644 index 00000000..1f3133c8 --- /dev/null +++ b/sprout/config/compiler/sunpro_cc.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP +#define SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP diff --git a/sprout/config/compiler/vacpp.hpp b/sprout/config/compiler/vacpp.hpp new file mode 100644 index 00000000..d08149f6 --- /dev/null +++ b/sprout/config/compiler/vacpp.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_VACPP_HPP +#define SPROUT_CONFIG_COMPILER_VACPP_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_VACPP_HPP diff --git a/sprout/config/compiler/visualc.hpp b/sprout/config/compiler/visualc.hpp new file mode 100644 index 00000000..e7ba4847 --- /dev/null +++ b/sprout/config/compiler/visualc.hpp @@ -0,0 +1,10 @@ +#ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP +#define SPROUT_CONFIG_COMPILER_VISUALC_HPP + +#define SPROUT_NO_CONSTEXPR +#define SPROUT_NO_NOEXCEPT +#define SPROUT_NO_TEMPLATE_ALIASES +#define SPROUT_NO_USER_DEFINED_LITERALS +#define SPROUT_NO_DELEGATING_CONSTRUCTORS + +#endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP diff --git a/sprout/config/config.hpp b/sprout/config/config.hpp new file mode 100644 index 00000000..889ba4ea --- /dev/null +++ b/sprout/config/config.hpp @@ -0,0 +1,67 @@ +#ifndef SPROUT_CONFIG_CONFIG_HPP +#define SPROUT_CONFIG_CONFIG_HPP + +#include + +#ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG +# include +#endif // #ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG + +#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR +# define SPROUT_CONSTEXPR constexpr +# define SPROUT_CONSTEXPR_OR_CONST constexpr +# define SPROUT_STATIC_CONSTEXPR static constexpr +#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR +# define SPROUT_CONSTEXPR +# define SPROUT_CONSTEXPR_OR_CONST const +# define SPROUT_STATIC_CONSTEXPR static const +#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR + +#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT +# define SPROUT_NOEXCEPT noexcept +# define SPROUT_NOEXCEPT_EXPR(EXPR) noexcept(EXPR) +#else // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT +# define SPROUT_NOEXCEPT +# define SPROUT_NOEXCEPT_EXPR(EXPR) +#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT + +#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +# define SPROUT_USE_TEMPLATE_ALIASES 1 +#else // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +# define SPROUT_USE_TEMPLATE_ALIASES 0 +#endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES + +#ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS +# define SPROUT_USE_USER_DEFINED_LITERALS 1 +#else // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS +# define SPROUT_USE_USER_DEFINED_LITERALS 0 +#endif // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS + +#ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS +# define SPROUT_USE_DELEGATING_CONSTRUCTORS 1 +#else // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS +# define SPROUT_USE_DELEGATING_CONSTRUCTORS 0 +#endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS + +#ifndef SPROUT_CONFIG_USE_SSCRISK_CEL +# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT +# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT +# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT +# define NS_SSCRISK_CEL_OR_SPROUT sprout +#else // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL +# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT +# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT +# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT +# define NS_SSCRISK_CEL_OR_SPROUT sscrisk::cel +#endif // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL + +#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 1 +#else // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# ifdef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# error config conflict: SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION, SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# endif // #ifndef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION +# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 0 +#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION + +#endif // #ifndef SPROUT_CONFIG_CONFIG_HPP