1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

delete auto_config.hpp

add compiler supports
This commit is contained in:
bolero-MURAKAMI 2012-04-13 16:00:30 +09:00
parent 2fa0ad1fe4
commit 8f818ee63f
29 changed files with 438 additions and 128 deletions

View file

@ -0,0 +1,63 @@
#ifndef SPROUT_CONFIG_AUTO_CONFIG_HPP
#define SPROUT_CONFIG_AUTO_CONFIG_HPP
#include <sprout/config/compiler.hpp>
//
// 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

View file

@ -0,0 +1,50 @@
#ifndef SPROUT_CONFIG_COMPILER_HPP
#define SPROUT_CONFIG_COMPILER_HPP
#if defined(__GCCXML__)
# include <sprout/config/compiler/gcc_xml.hpp>
#elif defined(_CRAYC)
# include <sprout/config/compiler/cray.hpp>
#elif defined __CUDACC__
# include <sprout/config/compiler/nvcc.hpp>
#elif defined __COMO__
# include <sprout/config/compiler/comeau.hpp>
#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
# include <sprout/config/compiler/pathscale.hpp>
#elif defined __clang__
# include <sprout/config/compiler/clang.hpp>
#elif defined __DMC__
# include <sprout/config/compiler/digitalmars.hpp>
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
# include <sprout/config/compiler/intel.hpp>
# elif defined __GNUC__
# include <sprout/config/compiler/gcc.hpp>
#elif defined __KCC
# include <sprout/config/compiler/kai.hpp>
#elif defined __sgi
# include <sprout/config/compiler/sgi_mipspro.hpp>
#elif defined __DECCXX
# include <sprout/config/compiler/compaq_cxx.hpp>
#elif defined __ghs
# include <sprout/config/compiler/greenhills.hpp>
#elif defined __CODEGEARC__
# include <sprout/config/compiler/codegear.hpp>
#elif defined __BORLANDC__
# include <sprout/config/compiler/borland.hpp>
#elif defined __MWERKS__
# include <sprout/config/compiler/metrowerks.hpp>
#elif defined __SUNPRO_CC
# include <sprout/config/compiler/sunpro_cc.hpp>
#elif defined __HP_aCC
# include <sprout/config/compiler/hp_acc.hpp>
#elif defined(__MRC__) || defined(__SC__)
# include <sprout/config/compiler/mpw.hpp>
#elif defined(__IBMCPP__)
# include <sprout/config/compiler/vacpp.hpp>
#elif defined(__PGI)
# include <sprout/config/compiler/pgi.hpp>
#elif defined(_MSC_VER)
# include <sprout/config/compiler/visualc.hpp>
#endif
#endif // #ifndef SPROUT_CONFIG_COMPILER_HPP

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP
#define SPROUT_CONFIG_COMPILER_COMEAU_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP

View file

@ -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

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP
#define SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP
#define SPROUT_CONFIG_COMPILER_CRAY_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP
#define SPROUT_CONFIG_COMPILER_GREENHILLS_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP
#define SPROUT_CONFIG_COMPILER_HP_ACC_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP
#define SPROUT_CONFIG_COMPILER_INTEL_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_KAI_HPP
#define SPROUT_CONFIG_COMPILER_KAI_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_KAI_HPP

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,10 @@
#ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP
#define SPROUT_CONFIG_COMPILER_NVCC_HPP
#if defined(__GNUC__)
# include <sprout/config/compiler/gcc.hpp>
#elif defined(_MSC_VER)
# include <sprout/config/compiler/visualc.hpp>
#endif
#endif // #ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,6 @@
#ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP
#define SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP
#include <sprout/config/compiler/common_edg.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP

View file

@ -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

View file

@ -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

View file

@ -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

67
sprout/config/config.hpp Normal file
View file

@ -0,0 +1,67 @@
#ifndef SPROUT_CONFIG_CONFIG_HPP
#define SPROUT_CONFIG_CONFIG_HPP
#include <sprout/config/compiler.hpp>
#ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG
# include <sprout/config/auto_config.hpp>
#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 <sprout/functional/functor.hpp>
# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT <sprout/algorithm/non_modifying.hpp>
# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT <sprout/iterator/operation.hpp>
# define NS_SSCRISK_CEL_OR_SPROUT sprout
#else // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL
# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/functional.hpp>
# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/algorithm.hpp>
# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/iterator.hpp>
# 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