
Summary: This patch just adds the variable templates in <experimental/system_error>. see: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#syserror Reviewers: jroelofs, danalbert, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: chandlerc, cfe-commits Differential Revision: http://reviews.llvm.org/D7353 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227973 91177308-0d34-0410-b5e6-96231b3b80d8
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
//===-------------------------- system_error ------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
|
|
#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
|
|
|
|
/**
|
|
experimental/system_error synopsis
|
|
|
|
// C++1y
|
|
|
|
#include <system_error>
|
|
|
|
namespace std {
|
|
namespace experimental {
|
|
inline namespace fundamentals_v1 {
|
|
|
|
// See C++14 19.5, System error support
|
|
template <class T> constexpr bool is_error_code_enum_v
|
|
= is_error_code_enum<T>::value;
|
|
template <class T> constexpr bool is_error_condition_enum_v
|
|
= is_error_condition_enum<T>::value;
|
|
|
|
} // namespace fundamentals_v1
|
|
} // namespace experimental
|
|
} // namespace std
|
|
|
|
*/
|
|
|
|
#include <experimental/__config>
|
|
|
|
#if _LIBCPP_STD_VER > 11
|
|
|
|
#include <system_error>
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_LFTS
|
|
|
|
#if __has_feature(cxx_variable_templates)
|
|
|
|
template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_code_enum_v
|
|
= is_error_code_enum<_Tp>::value;
|
|
|
|
template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_condition_enum_v
|
|
= is_error_condition_enum<_Tp>::value;
|
|
|
|
#endif /* __has_feature(cxx_variable_templates) */
|
|
|
|
_LIBCPP_END_NAMESPACE_LFTS
|
|
|
|
#endif /* _LIBCPP_STD_VER > 11 */
|
|
|
|
#endif /* _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR */ |