diff options
-rw-r--r-- | odb/details/config-vc.h | 20 | ||||
-rw-r--r-- | odb/details/config.hxx | 42 |
2 files changed, 25 insertions, 37 deletions
diff --git a/odb/details/config-vc.h b/odb/details/config-vc.h index c187fe5..3aced8f 100644 --- a/odb/details/config-vc.h +++ b/odb/details/config-vc.h @@ -11,24 +11,4 @@ #define ODB_THREADS_WIN32 #define ODB_THREADS_TLS_DECLSPEC -/* VC++10 and later have C++11 always enabled. - */ -#if _MSC_VER >= 1600 -# define ODB_CXX11 -# define ODB_CXX11_NULLPTR -# if _MSC_VER >= 1700 -# define ODB_CXX11_ENUM -# if _MSC_VER >= 1800 -# define ODB_CXX11_DELETED_FUNCTION -# define ODB_CXX11_EXPLICIT_CONVERSION_OPERATOR -# define ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT -# define ODB_CXX11_VARIADIC_TEMPLATE -# define ODB_CXX11_INITIALIZER_LIST -# if _MSC_VER >= 1900 -# define ODB_CXX11_NOEXCEPT -# endif -# endif -# endif -#endif - #endif /* ODB_DETAILS_CONFIG_VC_H */ diff --git a/odb/details/config.hxx b/odb/details/config.hxx index 5aa35aa..b240f5c 100644 --- a/odb/details/config.hxx +++ b/odb/details/config.hxx @@ -7,25 +7,36 @@ // no pre -#ifdef _MSC_VER -# include <odb/details/config-vc.h> -#elif defined(ODB_COMPILER) +#ifdef ODB_COMPILER # define ODB_THREADS_NONE # define LIBODB_STATIC_LIB -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +#elif defined(_MSC_VER) +# include <odb/details/config-vc.h> +#else +# include <odb/details/config.h> +#endif + +// C++11 support. +// +#ifdef _MSC_VER +# if _MSC_VER >= 1600 // VC++10 and later have C++11 always enabled. # define ODB_CXX11 -# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4 -# define ODB_CXX11_NULLPTR -# define ODB_CXX11_NOEXCEPT +# define ODB_CXX11_NULLPTR +# if _MSC_VER >= 1700 +# define ODB_CXX11_ENUM +# if _MSC_VER >= 1800 +# define ODB_CXX11_DELETED_FUNCTION +# define ODB_CXX11_EXPLICIT_CONVERSION_OPERATOR +# define ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT +# define ODB_CXX11_VARIADIC_TEMPLATE +# define ODB_CXX11_INITIALIZER_LIST +# if _MSC_VER >= 1900 +# define ODB_CXX11_NOEXCEPT +# endif +# endif # endif -# define ODB_CXX11_DELETED_FUNCTION -# define ODB_CXX11_EXPLICIT_CONVERSION_OPERATOR -# define ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT -# define ODB_CXX11_VARIADIC_TEMPLATE -# define ODB_CXX11_INITIALIZER_LIST # endif #else -# include <odb/details/config.h> # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L # define ODB_CXX11 # ifdef __clang__ // Pretends to be a really old __GNUC__ on some platforms. @@ -45,10 +56,7 @@ # define ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT # define ODB_CXX11_VARIADIC_TEMPLATE # define ODB_CXX11_INITIALIZER_LIST -// GCC supports strongly typed enums from 4.4 (forward -- 4.6), -// Clang -- 2.9 (3.1). -// -# define ODB_CXX11_ENUM +# define ODB_CXX11_ENUM // GCC 4.4 (forward -- 4.6), Clang 2.9 (3.1). # endif #endif |