diff --git a/include/type_traits b/include/type_traits index 3ad7d8655..e7bb1eb34 100644 --- a/include/type_traits +++ b/include/type_traits @@ -328,6 +328,11 @@ template struct _LIBCPP_VISIBLE is_class #endif +// is_same + +template struct _LIBCPP_VISIBLE is_same : public false_type {}; +template struct _LIBCPP_VISIBLE is_same<_Tp, _Tp> : public true_type {}; + // is_function namespace __is_function_imp @@ -340,7 +345,8 @@ template _Tp& __source(); template ::value || is_union<_Tp>::value || is_void<_Tp>::value || - is_reference<_Tp>::value> + is_reference<_Tp>::value || + is_same<_Tp, nullptr_t>::value > struct __is_function : public integral_constant(__is_function_imp::__source<_Tp>())) == 1> {}; @@ -591,11 +597,6 @@ template struct _LIBCPP_VISIBLE remove_all_extents<_Tp[]> template struct _LIBCPP_VISIBLE remove_all_extents<_Tp[_Np]> {typedef typename remove_all_extents<_Tp>::type type;}; -// is_same - -template struct _LIBCPP_VISIBLE is_same : public false_type {}; -template struct _LIBCPP_VISIBLE is_same<_Tp, _Tp> : public true_type {}; - // is_abstract namespace __is_abstract_imp