Implement LWG #2212: std::is_final. This requires compiler support, which modern versions of clang provide. Also mark LWG #2230 as complete - no code changes needed.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,6 +91,7 @@ namespace std
|
||||
template <class T> struct is_empty;
|
||||
template <class T> struct is_polymorphic;
|
||||
template <class T> struct is_abstract;
|
||||
template <class T> struct is_final; // C++14
|
||||
|
||||
template <class T, class... Args> struct is_constructible;
|
||||
template <class T> struct is_default_constructible;
|
||||
@@ -759,6 +760,13 @@ template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {}
|
||||
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_abstract : public __libcpp_abstract<_Tp> {};
|
||||
|
||||
// is_final
|
||||
|
||||
#if __has_feature(is_final)
|
||||
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY
|
||||
is_final : public integral_constant<bool, __is_final(_Tp)> {};
|
||||
#endif
|
||||
|
||||
// is_base_of
|
||||
|
||||
#ifdef _LIBCPP_HAS_IS_BASE_OF
|
||||
|
Reference in New Issue
Block a user