X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=cds%2Fcompiler%2Fvc%2Fdefs.h;h=cd837e46719e99e3bd45085fe1d4cd3cc8726e4d;hp=f927231758b6596a2ec71d220e095e9b0cb833b1;hb=af8ae303bac899508a6c4ff4c8b26aec21aed918;hpb=4cea7f63c979b3225eead374ad178961f73eb398 diff --git a/cds/compiler/vc/defs.h b/cds/compiler/vc/defs.h index f9272317..cd837e46 100644 --- a/cds/compiler/vc/defs.h +++ b/cds/compiler/vc/defs.h @@ -11,6 +11,7 @@ // Supported compilers: MS VC 2013 // C++ compiler versions: #define CDS_COMPILER_MSVC12 1800 // 2013 vc12 +#define CDS_COMPILER_MSVC14 1900 // 2015 vc14 #if CDS_COMPILER_VERSION < CDS_COMPILER_MSVC12 # error "Only MS Visual C++ 12 (2013) and above is supported" @@ -19,6 +20,9 @@ #if _MSC_VER == 1800 # define CDS_COMPILER__NAME "MS Visual C++ 2013" # define CDS_COMPILER__NICK "vc12" +#elif _MSC_VER == 1900 +# define CDS_COMPILER__NAME "MS Visual C++ 2015" +# define CDS_COMPILER__NICK "vc14" #else # define CDS_COMPILER__NAME "MS Visual C++" # define CDS_COMPILER__NICK "msvc" @@ -79,44 +83,20 @@ // constexpr is not yet supported #define CDS_CONSTEXPR -#define CDS_CONSTEXPR_CONST const -// noexcept is not yet supported -//#define CDS_NOEXCEPT_SUPPORT noexcept -//#define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr) -#define CDS_NOEXCEPT_SUPPORT -#define CDS_NOEXCEPT_SUPPORT_(expr) - -// C++11 atomic support -#define CDS_CXX11_ATOMIC_SUPPORT 1 - -// Lambda (VC 10 +) -//#define CDS_CXX11_LAMBDA_SUPPORT - -// RValue (VC 10+) -#define CDS_RVALUE_SUPPORT -#define CDS_MOVE_SEMANTICS_SUPPORT - -// Default template arguments for function templates (VC12+) -#define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT - -// C++11 delete definition ( function declaration = delete) -#define CDS_CXX11_DELETE_DEFINITION_SUPPORT - -// C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]] -#define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT - -// Variadic template support (VC12+) -#define CDS_CXX11_VARIADIC_TEMPLATE_SUPPORT 1 - -// C++11 template alias -#define CDS_CXX11_TEMPLATE_ALIAS_SUPPORT +// noexcept - vc14 + +#if CDS_COMPILER_VERSION > CDS_COMPILER_MSVC12 +# define CDS_NOEXCEPT_SUPPORT noexcept +# define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr) +#else +# define CDS_NOEXCEPT_SUPPORT +# define CDS_NOEXCEPT_SUPPORT_(expr) +#endif // C++11 inline namespace -//#define CDS_CXX11_INLINE_NAMESPACE_SUPPORT - -// Explicit conversion operator (VC12+) -#define CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT +#if CDS_COMPILER_VERSION > CDS_COMPILER_MSVC12 +# define CDS_CXX11_INLINE_NAMESPACE_SUPPORT +#endif #if CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 // VC12: move ctor cannot be defaulted @@ -124,17 +104,10 @@ # define CDS_DISABLE_DEFAULT_MOVE_CTOR #endif -// Thread support library (thread, mutex, condition variable) -#define CDS_CXX11_STDLIB_THREAD -#define CDS_CXX11_STDLIB_MUTEX -#define CDS_CXX11_STDLIB_CONDITION_VARIABLE -#define CDS_CXX11_STDLIB_CHRONO - // Full SFINAE support -//#if CDS_COMPILER_VERSION >= ???? -//# define CDS_CXX11_SFINAE -//#endif - +#if CDS_COMPILER_VERSION > CDS_COMPILER_MSVC12 +# define CDS_CXX11_SFINAE +#endif // ************************************************* // Alignment macro