Vowpal Wabbit
future_compat.h
Go to the documentation of this file.
1 #pragma once
2 
3 #if __cplusplus >= 201103L || defined(_MSC_VER) && (_MSC_VER >= 1900)
4 
5 #if __cplusplus >= 201402L || defined(_MSC_VER) && (_MSC_VER >= 1910)
6 #define HAS_STD14
7 #endif
8 
9 #if __cplusplus >= 201703L || defined(_MSC_VER) && (_MSC_VER >= 1914)
10 #define HAS_STD17
11 #endif
12 
13 #ifdef HAS_STD17
14 #define ATTR(name) [[ name ]]
15 #else
16 #define ATTR(name)
17 #endif
18 
19 #ifdef HAS_STD14
20 #define VW_STD14_CONSTEXPR constexpr
21 #define VW_DEPRECATED(message) [[deprecated(message)]]
22 #else
23 #define VW_STD14_CONSTEXPR
24 #define VW_DEPRECATED(message)
25 #endif
26 
27 #else
28 #error "At least C++11 is required."
29 #endif