Builder.defineMacro("__cpp_lambdas", "200907");
Builder.defineMacro("__cpp_constexpr",
LangOpts.CPlusPlus14 ? "201304" : "200704");
- Builder.defineMacro("__cpp_range_based_for", "200907");
+ Builder.defineMacro("__cpp_range_based_for",
+ LangOpts.CPlusPlus1z ? "201603" : "200907");
Builder.defineMacro("__cpp_static_assert",
LangOpts.CPlusPlus1z ? "201411" : "200410");
Builder.defineMacro("__cpp_decltype", "200707");
// C++17 features.
if (LangOpts.CPlusPlus1z) {
+ Builder.defineMacro("__cpp_hex_float", "201603");
//Builder.defineMacro("__cpp_noexcept_function_type", "201510");
- Builder.defineMacro("__cpp_fold_expressions", "201411");
+ Builder.defineMacro("__cpp_capture_star_this", "201603");
Builder.defineMacro("__cpp_namespace_attributes", "201411");
Builder.defineMacro("__cpp_enumerator_attributes", "201411");
Builder.defineMacro("__cpp_nested_namespace_definitions", "201411");
+ Builder.defineMacro("__cpp_aggregate_bases", "201603");
Builder.defineMacro("__cpp_nontype_template_args", "201411");
+ Builder.defineMacro("__cpp_fold_expressions", "201603");
}
// TS features.
// --- C++17 features ---
+#if check(hex_float, 0, 0, 0, 201603)
+#error "wrong value for __cpp_hex_float"
+#endif
+
#if check(noexcept_function_type, 0, 0, 0, 0)
-// FIXME
+// FIXME: value shuld be 201510 for cxx1z once implemented
#error "wrong value for __cpp_noexcept_function_type"
#endif
-#if check(fold_expressions, 0, 0, 0, 201411)
+#if check(fold_expressions, 0, 0, 0, 201603)
#error "wrong value for __cpp_fold_expressions"
#endif
+#if check(capture_star_this, 0, 0, 0, 201603)
+#error "wrong value for __cpp_capture_star_this"
+#endif
+
+// FIXME: bump __cpp_constexpr to 201603 for constexpr lambda support
+
+// range_based_for checked below
+
// static_assert checked below
#if check(namespace_attributes, 0, 0, 0, 201411)
#error "wrong value for __cpp_nested_namespace_definitions"
#endif
+#if check(aggregate_bases, 0, 0, 0, 201603)
+#error "wrong value for __cpp_aggregate_bases"
+#endif
+
#if check(nontype_template_args, 0, 0, 0, 201411)
#error "wrong value for __cpp_nontype_template_args"
#endif
#error "wrong value for __cpp_constexpr"
#endif
-#if check(range_based_for, 0, 200907, 200907, 200907)
+#if check(range_based_for, 0, 200907, 200907, 201603)
#error "wrong value for __cpp_range_based_for"
#endif