DATAKIT API  V2025.2
dtk_compiler_msvc.h
Go to the documentation of this file.
1 #ifndef DTK_COMPILER_MSVC_H
2 #define DTK_COMPILER_MSVC_H
3 
4 #ifndef _MSC_VER
5 This File shouldn't be used with this compiler !!!'
6 #endif
7 
8 #define DTK_MSVC _MSC_VER
9 
10 #ifndef _NATIVE_WCHAR_T_DEFINED
11 # define DTK_NO_INTRINSIC_WCHAR_T
12 #endif
13 
14 //DTK_TOREMOVE_START
15 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
16 // Calling conventions
17 #define DTK_CDECL __cdecl
18 #define DTK_STDCALL __stdcall
19 #endif
20 //DTK_TOREMOVE_END
21 
22 //
23 // C++0x features
24 //
25 
26 // C++ features supported by VC++ 10 (aka 2010)
27 //
28 #if _MSC_VER < 1600
29 # define DTK_NO_CXX11_STATIC_ASSERT
30 # define DTK_NO_CXX11_NULLPTR
31 # define DTK_NO_CXX11_RVALUE_REFERENCES
32 # define DTK_NO_CXX11_DECLTYPE
33 #endif // _MSC_VER < 1600
34 
35 // C++11 features supported by VC++ 12 (aka 2013).
36 //
37 #if _MSC_FULL_VER < 180020827
38 # define DTK_NO_CXX11_VARIADIC_TEMPLATES
39 # define DTK_NO_CXX11_DELETED_FUNCTIONS
40 # define DTK_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
41 #endif
42 
43 // C++11 features supported by VC++ 14 (aka 2015) Preview
44 //
45 #if (_MSC_FULL_VER < 190023026)
46 # define DTK_NO_CXX11_CHAR16_T
47 # define DTK_NO_CXX11_CHAR32_T
48 # define DTK_NO_CXX11_NOEXCEPT
49 #endif
50 
51 // This is somewhat supported in VC14, but we may need to wait for
52 // a service release before enabling:
53 //
54 #define DTK_NO_CXX11_CONSTEXPR
55 
56 //C++14
57 #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
58 # define DTK_NO_CXX14_CONSTEXPR
59 #endif
60 
61 #if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
62 # define DTK_HAS_LONG_LONG
63 #else
64 # define DTK_NO_LONG_LONG
65 #endif
66 
67 //
68 // Helper macro DTK_MSVC_FULL_VER for use in code:
69 //
70 #if _MSC_FULL_VER > 100000000
71 # define DTK_MSVC_FULL_VER _MSC_FULL_VER
72 #else
73 # define DTK_MSVC_FULL_VER (_MSC_FULL_VER * 10)
74 #endif
75 
76 #if (defined(DTK_MSVC) && defined(DTK_MSVC_FULL_VER) && (DTK_MSVC_FULL_VER >=140050215))
77 # define DTK_MOVE_IS_EMPTY(T) __is_empty(T)
78 # define DTK_MOVE_IS_UNION(T) __is_union(T)
79 # define DTK_MOVE_IS_ENUM(T) __is_enum(T)
80 #endif
81 
82 #endif