diff --git a/include/__config b/include/__config
index 3df583f..293c310 100644
--- a/include/__config
+++ b/include/__config
@@ -144,7 +144,7 @@
 
 #if defined(__clang__)
 
-#if __has_feature(cxx_alignas)
+#if __has_feature(__cxx_alignas__)
 #  define _ALIGNAS_TYPE(x) alignas(x)
 #  define _ALIGNAS(x) alignas(x)
 #else
@@ -152,7 +152,7 @@
 #  define _ALIGNAS(x) __attribute__((__aligned__(x)))
 #endif
 
-#if !__has_feature(cxx_alias_templates)
+#if !__has_feature(__cxx_alias_templates__)
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 #endif
 
@@ -165,23 +165,23 @@ typedef __char32_t char32_t;
 #endif
 #endif
 
-#if !(__has_feature(cxx_exceptions))
+#if !(__has_feature(__cxx_exceptions__))
 #define _LIBCPP_NO_EXCEPTIONS
 #endif
 
-#if !(__has_feature(cxx_rtti))
+#if !(__has_feature(__cxx_rtti__))
 #define _LIBCPP_NO_RTTI
 #endif
 
-#if !(__has_feature(cxx_strong_enums))
+#if !(__has_feature(__cxx_strong_enums__))
 #define _LIBCPP_HAS_NO_STRONG_ENUMS
 #endif
 
-#if !(__has_feature(cxx_decltype))
+#if !(__has_feature(__cxx_decltype__))
 #define _LIBCPP_HAS_NO_DECLTYPE
 #endif
 
-#if __has_feature(cxx_attributes)
+#if __has_feature(__cxx_attributes__)
 #  define _ATTRIBUTE(x) [[x]]
 #else
 #  define _ATTRIBUTE(x) __attribute__ ((x))
@@ -189,61 +189,61 @@ typedef __char32_t char32_t;
 
 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
 
-#if !(__has_feature(cxx_deleted_functions))
+#if !(__has_feature(__cxx_deleted_functions__))
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
-#endif  // !(__has_feature(cxx_deleted_functions))
+#endif  // !(__has_feature(__cxx_deleted_functions__))
 
-#if !(__has_feature(cxx_lambdas))
+#if !(__has_feature(__cxx_lambdas__))
 #define _LIBCPP_HAS_NO_LAMBDAS
 #endif
 
-#if !(__has_feature(cxx_nullptr))
+#if !(__has_feature(__cxx_nullptr__))
 #define _LIBCPP_HAS_NO_NULLPTR
 #endif
 
-#if !(__has_feature(cxx_rvalue_references))
+#if !(__has_feature(__cxx_rvalue_references__))
 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #endif
 
-#if !(__has_feature(cxx_static_assert))
+#if !(__has_feature(__cxx_static_assert__))
 #define _LIBCPP_HAS_NO_STATIC_ASSERT
 #endif
 
-#if !(__has_feature(cxx_auto_type))
+#if !(__has_feature(__cxx_auto_type__))
 #define _LIBCPP_HAS_NO_AUTO_TYPE
 #endif
 
-#if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return)
+#if !(__has_feature(__cxx_access_control_sfinae__)) || !__has_feature(__cxx_trailing_return__)
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #endif
 
-#if !(__has_feature(cxx_variadic_templates))
+#if !(__has_feature(__cxx_variadic_templates__))
 #define _LIBCPP_HAS_NO_VARIADICS
 #endif
 
-#if !(__has_feature(cxx_trailing_return))
+#if !(__has_feature(__cxx_trailing_return__))
 #define _LIBCPP_HAS_NO_TRAILING_RETURN
 #endif
 
-#if !(__has_feature(cxx_generalized_initializers))
+#if !(__has_feature(__cxx_generalized_initializers__))
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 #endif
 
-#if __has_feature(is_base_of)
+#if __has_feature(__is_base_of__)
 #  define _LIBCP_HAS_IS_BASE_OF
 #endif
 
 // Objective-C++ features (opt-in)
-#if __has_feature(objc_arc)
+#if __has_feature(__objc_arc__)
 #define _LIBCPP_HAS_OBJC_ARC
 #endif
 
-#if __has_feature(objc_arc_weak)
+#if __has_feature(__objc_arc_weak__)
 #define _LIBCPP_HAS_OBJC_ARC_WEAK
 #define _LIBCPP_HAS_NO_STRONG_ENUMS
 #endif
 
-#if !(__has_feature(cxx_constexpr))
+#if !(__has_feature(__cxx_constexpr__))
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
@@ -251,7 +251,7 @@ typedef __char32_t char32_t;
 #define _LIBCPP_HAS_QUICK_EXIT
 #endif
 
-#if (__has_feature(cxx_noexcept))
+#if (__has_feature(__cxx_noexcept__))
 #  define _NOEXCEPT noexcept
 #  define _NOEXCEPT_(x) noexcept(x)
 #else
@@ -259,7 +259,7 @@ typedef __char32_t char32_t;
 #  define _NOEXCEPT_(x)
 #endif
 
-#if __has_feature(underlying_type)
+#if __has_feature(__underlying_type__)
 #  define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
 #endif
 
diff --git a/include/atomic b/include/atomic
index 6a200eb..1852ec2 100644
--- a/include/atomic
+++ b/include/atomic
@@ -532,7 +532,7 @@ void atomic_signal_fence(memory_order m) noexcept;
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if !__has_feature(cxx_atomic)
+#if !__has_feature(__cxx_atomic__)
 #error <atomic> is not implemented
 #else
 
@@ -1508,7 +1508,7 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
 #define ATOMIC_LONG_LOCK_FREE 0
 #define ATOMIC_LLONG_LOCK_FREE 0
 
-#endif  //  !__has_feature(cxx_atomic)
+#endif  //  !__has_feature(__cxx_atomic__)
 
 _LIBCPP_END_NAMESPACE_STD
 
diff --git a/include/map b/include/map
index dd98da5..044ac48 100644
--- a/include/map
+++ b/include/map
@@ -382,7 +382,7 @@ swap(multimap<Key, T, Compare, Allocator>& x,
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _Tp, class _Compare, bool = is_empty<_Compare>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                                         && !__is_final(_Compare)
 #endif
          >
diff --git a/include/memory b/include/memory
index 0f3ccec..71d3299 100644
--- a/include/memory
+++ b/include/memory
@@ -1938,12 +1938,12 @@ public:
 template <class _T1, class _T2, bool = is_same<typename remove_cv<_T1>::type,
                                                      typename remove_cv<_T2>::type>::value,
                                 bool = is_empty<_T1>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                        && !__is_final(_T1)
 #endif
                                 ,
                                 bool = is_empty<_T2>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                        && !__is_final(_T2)
 #endif
          >
diff --git a/include/new b/include/new
index ae0951a..f4bd198 100644
--- a/include/new
+++ b/include/new
@@ -92,7 +92,7 @@ _LIBCPP_VISIBLE new_handler get_new_handler() _NOEXCEPT;
 }  // std
 
 _LIBCPP_VISIBLE void* operator new(std::size_t __sz)
-#if !__has_feature(cxx_noexcept)
+#if !__has_feature(__cxx_noexcept__)
     throw(std::bad_alloc)
 #endif
 ;
@@ -101,7 +101,7 @@ _LIBCPP_VISIBLE void  operator delete(void* __p) _NOEXCEPT;
 _LIBCPP_VISIBLE void  operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
 
 _LIBCPP_VISIBLE void* operator new[](std::size_t __sz)
-#if !__has_feature(cxx_noexcept)
+#if !__has_feature(__cxx_noexcept__)
     throw(std::bad_alloc)
 #endif
 ;
diff --git a/include/tuple b/include/tuple
index 683c9dd..7e3d312 100644
--- a/include/tuple
+++ b/include/tuple
@@ -206,7 +206,7 @@ public:
 // __tuple_leaf
 
 template <size_t _Ip, class _Hp, bool=is_empty<_Hp>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                  && !__is_final(_Hp)
 #endif
          >
diff --git a/include/type_traits b/include/type_traits
index 31e3fac..4ec27c2 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -290,7 +290,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_reference<_Tp&&> : public true_ty
 
 // is_union
 
-#if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__is_union__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_union
     : public integral_constant<bool, __is_union(_Tp)> {};
@@ -305,7 +305,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_union
 
 // is_class
 
-#if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__is_class__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_class
     : public integral_constant<bool, __is_class(_Tp)> {};
@@ -374,7 +374,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_member_object_pointer
 
 // is_enum
 
-#if __has_feature(is_enum) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__is_enum__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_enum
     : public integral_constant<bool, __is_enum(_Tp)> {};
@@ -609,12 +609,12 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_abstract : public __libcpp_abstra
 
 // is_convertible
 
-#if __has_feature(is_convertible_to)
+#if __has_feature(__is_convertible_to__)
 
 template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
     : public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
 
-#else  // __has_feature(is_convertible_to)
+#else  // __has_feature(__is_convertible_to__)
 
 namespace __is_convertible_imp
 {
@@ -716,7 +716,7 @@ template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
     static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
 };
 
-#endif  // __has_feature(is_convertible_to)
+#endif  // __has_feature(__is_convertible_to__)
 
 // is_base_of
 
@@ -726,21 +726,21 @@ template <class _Bp, class _Dp>
 struct _LIBCPP_VISIBLE is_base_of
     : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
 
-#else  // __has_feature(is_base_of)
+#else  // __has_feature(__is_base_of__)
 
 #error is_base_of not implemented.
 
-#endif  // __has_feature(is_base_of)
+#endif  // __has_feature(__is_base_of__)
 
 // is_empty
 
-#if __has_feature(is_empty)
+#if __has_feature(__is_empty__)
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_empty
     : public integral_constant<bool, __is_empty(_Tp)> {};
 
-#else  // __has_feature(is_empty)
+#else  // __has_feature(__is_empty__)
 
 template <class _Tp>
 struct __is_empty1
@@ -761,11 +761,11 @@ template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {};
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_empty : public __libcpp_empty<_Tp> {};
 
-#endif  // __has_feature(is_empty)
+#endif  // __has_feature(__is_empty__)
 
 // is_polymorphic
 
-#if __has_feature(is_polymorphic)
+#if __has_feature(__is_polymorphic__)
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_polymorphic
@@ -785,11 +785,11 @@ template <class _Tp> struct __libcpp_polymorphic<_Tp, false> : public false_type
 template <class _Tp> struct _LIBCPP_VISIBLE is_polymorphic
     : public __libcpp_polymorphic<_Tp> {};
 
-#endif // __has_feature(is_polymorphic)
+#endif // __has_feature(__is_polymorphic__)
 
 // has_virtual_destructor
 
-#if __has_feature(has_virtual_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_virtual_destructor__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE has_virtual_destructor
     : public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
@@ -1412,7 +1412,7 @@ struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile, tr
     typedef _Rp _ReturnType;
 };
 
-#if __has_feature(cxx_reference_qualified_functions)
+#if __has_feature(__cxx_reference_qualified_functions__)
 
 template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) &, true, false>
@@ -1470,7 +1470,7 @@ struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&&,
     typedef _Rp _ReturnType;
 };
 
-#endif  // __has_feature(cxx_reference_qualified_functions)
+#endif  // __has_feature(__cxx_reference_qualified_functions__)
 
 #else  // _LIBCPP_HAS_NO_VARIADICS
 
@@ -2089,7 +2089,7 @@ struct _LIBCPP_VISIBLE is_move_constructible
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
-#if __has_feature(is_trivially_constructible)
+#if __has_feature(__is_trivially_constructible__)
 
 template <class _Tp, class... _Args>
 struct _LIBCPP_VISIBLE is_trivially_constructible
@@ -2097,7 +2097,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible
 {
 };
 
-#else  // !__has_feature(is_trivially_constructible)
+#else  // !__has_feature(__is_trivially_constructible__)
 
 template <class _Tp, class... _Args>
 struct _LIBCPP_VISIBLE is_trivially_constructible
@@ -2107,7 +2107,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp>
-#if __has_feature(has_trivial_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_trivial_constructor__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_trivial_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2137,7 +2137,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp, _Tp&>
 {
 };
 
-#endif  // !__has_feature(is_trivially_constructible)
+#endif  // !__has_feature(__is_trivially_constructible__)
 
 #else  // _LIBCPP_HAS_NO_VARIADICS
 
@@ -2148,7 +2148,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible
 {
 };
 
-#if __has_feature(is_trivially_constructible)
+#if __has_feature(__is_trivially_constructible__)
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp, __is_construct::__nat,
@@ -2178,7 +2178,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp, _Tp&,
 {
 };
 
-#else  // !__has_feature(is_trivially_constructible)
+#else  // !__has_feature(__is_trivially_constructible__)
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp, __is_construct::__nat,
@@ -2208,7 +2208,7 @@ struct _LIBCPP_VISIBLE is_trivially_constructible<_Tp, _Tp&,
 {
 };
 
-#endif  // !__has_feature(is_trivially_constructible)
+#endif  // !__has_feature(__is_trivially_constructible__)
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
@@ -2236,7 +2236,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_move_constructible
 
 // is_trivially_assignable
 
-#if __has_feature(is_trivially_constructible)
+#if __has_feature(__is_trivially_constructible__)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2244,7 +2244,7 @@ struct is_trivially_assignable
 {
 };
 
-#else  // !__has_feature(is_trivially_constructible)
+#else  // !__has_feature(__is_trivially_constructible__)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2270,7 +2270,7 @@ struct is_trivially_assignable<_Tp&, _Tp&&>
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-#endif  // !__has_feature(is_trivially_constructible)
+#endif  // !__has_feature(__is_trivially_constructible__)
 
 // is_trivially_copy_assignable
 
@@ -2292,7 +2292,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_move_assignable
 
 // is_trivially_destructible
 
-#if __has_feature(has_trivial_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_trivial_destructor__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_destructible
     : public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
@@ -2312,7 +2312,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_destructible
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(__cxx_noexcept__)
 
 template <bool, class _Tp, class... _Args> struct __is_nothrow_constructible;
 
@@ -2340,7 +2340,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp[_Ns]>
 {
 };
 
-#else  // __has_feature(cxx_noexcept)
+#else  // __has_feature(__cxx_noexcept__)
 
 template <class _Tp, class... _Args>
 struct _LIBCPP_VISIBLE is_nothrow_constructible
@@ -2350,7 +2350,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_constructor__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2364,7 +2364,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp&&>
 #else
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp>
 #endif
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2374,7 +2374,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp>
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, const _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2384,7 +2384,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, const _Tp&>
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2392,7 +2392,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp&>
 {
 };
 
-#endif  // __has_feature(cxx_noexcept)
+#endif  // __has_feature(__cxx_noexcept__)
 
 #else  // _LIBCPP_HAS_NO_VARIADICS
 
@@ -2406,7 +2406,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, __is_construct::__nat,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_constructor__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2417,7 +2417,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, __is_construct::__nat,
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2428,7 +2428,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp,
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, const _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2439,7 +2439,7 @@ struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, const _Tp&,
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_constructible<_Tp, _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_copy__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2473,7 +2473,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_nothrow_move_constructible
 
 // is_nothrow_assignable
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(__cxx_noexcept__)
 
 template <bool, class _Tp, class _Arg> struct __is_nothrow_assignable;
 
@@ -2495,7 +2495,7 @@ struct _LIBCPP_VISIBLE is_nothrow_assignable
 {
 };
 
-#else  // __has_feature(cxx_noexcept)
+#else  // __has_feature(__cxx_noexcept__)
 
 template <class _Tp, class _Arg>
 struct _LIBCPP_VISIBLE is_nothrow_assignable
@@ -2503,7 +2503,7 @@ struct _LIBCPP_VISIBLE is_nothrow_assignable
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, _Tp>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_assign__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2511,7 +2511,7 @@ struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, _Tp>
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_assign__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2519,7 +2519,7 @@ struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, _Tp&>
 
 template <class _Tp>
 struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, const _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_assign__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2529,7 +2529,7 @@ struct _LIBCPP_VISIBLE is_nothrow_assignable<_Tp&, const _Tp&>
 
 template <class _Tp>
 struct is_nothrow_assignable<_Tp&, _Tp&&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__has_nothrow_assign__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2537,7 +2537,7 @@ struct is_nothrow_assignable<_Tp&, _Tp&&>
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-#endif  // __has_feature(cxx_noexcept)
+#endif  // __has_feature(__cxx_noexcept__)
 
 // is_nothrow_copy_assignable
 
@@ -2559,7 +2559,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_nothrow_move_assignable
 
 // is_nothrow_destructible
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(__cxx_noexcept__)
 
 template <bool, class _Tp> struct __is_nothrow_destructible;
 
@@ -2616,7 +2616,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_nothrow_destructible
 
 // is_pod
 
-#if __has_feature(is_pod) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(__is_pod__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_pod
     : public integral_constant<bool, __is_pod(_Tp)> {};
@@ -2634,7 +2634,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_pod
 // is_literal_type;
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_literal_type
-#if __has_feature(is_literal)
+#if __has_feature(__is_literal__)
     : public integral_constant<bool, __is_literal(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value ||
@@ -2645,7 +2645,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_literal_type
 // is_standard_layout;
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_standard_layout
-#if __has_feature(is_standard_layout)
+#if __has_feature(__is_standard_layout__)
     : public integral_constant<bool, __is_standard_layout(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
@@ -2655,7 +2655,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_standard_layout
 // is_trivially_copyable;
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_copyable
-#if __has_feature(is_trivially_copyable)
+#if __has_feature(__is_trivially_copyable__)
     : public integral_constant<bool, __is_trivially_copyable(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
@@ -2665,7 +2665,7 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_trivially_copyable
 // is_trivial;
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_trivial
-#if __has_feature(is_trivial)
+#if __has_feature(__is_trivial__)
     : public integral_constant<bool, __is_trivial(_Tp)>
 #else
     : integral_constant<bool, is_trivially_copyable<_Tp>::value &&
@@ -2751,7 +2751,7 @@ struct __check_complete<_Rp (_Class::*)(_Param...) const volatile>
 {
 };
 
-#if __has_feature(cxx_reference_qualified_functions)
+#if __has_feature(__cxx_reference_qualified_functions__)
 
 template <class _Rp, class _Class, class ..._Param>
 struct __check_complete<_Rp (_Class::*)(_Param...) &>
@@ -2948,7 +2948,7 @@ struct __is_swappable
 {
 };
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(__cxx_noexcept__)
 
 template <bool, class _Tp>
 struct __is_nothrow_swappable_imp
@@ -2969,7 +2969,7 @@ struct __is_nothrow_swappable
 {
 };
 
-#else  // __has_feature(cxx_noexcept)
+#else  // __has_feature(__cxx_noexcept__)
 
 template <class _Tp>
 struct __is_nothrow_swappable
@@ -2977,7 +2977,7 @@ struct __is_nothrow_swappable
 {
 };
 
-#endif  // __has_feature(cxx_noexcept)
+#endif  // __has_feature(__cxx_noexcept__)
 
 #ifdef _LIBCXX_UNDERLYING_TYPE
 
diff --git a/include/unordered_map b/include/unordered_map
index cb2ab42..01d1700 100644
--- a/include/unordered_map
+++ b/include/unordered_map
@@ -326,7 +326,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _Tp, class _Hash, bool = is_empty<_Hash>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                          && !__is_final(_Hash)
 #endif
          >
@@ -387,7 +387,7 @@ public:
 };
 
 template <class _Key, class _Tp, class _Pred, bool = is_empty<_Pred>::value
-#if __has_feature(is_final)
+#if __has_feature(__is_final__)
                                          && !__is_final(_Pred)
 #endif
          >
