File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 2323 enum StdNamespace = " std" ;
2424}
2525
26+ /**
27+ * Possible values of the `__cplusplus` macro provided by C++ compilers
28+ *
29+ * For foolproofness, use ordering comparison, e.g. `__cplusplus >= CppStdRevision.cpp17`.
30+ */
2631enum CppStdRevision : uint
2732{
2833 cpp98 = 199711 ,
2934 cpp11 = 201103 ,
3035 cpp14 = 201402 ,
31- cpp17 = 201703
36+ cpp17 = 201703 ,
37+ cpp20 = 202002 ,
3238}
3339
40+ /**
41+ * Returns the target C++ version, encoded as C++ compilers do
42+ *
43+ * C++ compilers provide a `__cplusplus` macro which returns an integer
44+ * representing the targetted standard. This manifest provides the same
45+ * interface, retrieved from the compiler via a `__traits`.
46+ */
3447enum __cplusplus = __traits(getTargetInfo, " cppStd" );
3548
3649// wrangle C++ features
You can’t perform that action at this time.
0 commit comments