system_error 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // -*- C++ -*-
  2. //===-------------------------- system_error ------------------------------===//
  3. //
  4. // The LLVM Compiler Infrastructure
  5. //
  6. // This file is dual licensed under the MIT and the University of Illinois Open
  7. // Source Licenses. See LICENSE.TXT for details.
  8. //
  9. //===----------------------------------------------------------------------===//
  10. #ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
  11. #define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
  12. /**
  13. experimental/system_error synopsis
  14. // C++1y
  15. #include <system_error>
  16. namespace std {
  17. namespace experimental {
  18. inline namespace fundamentals_v1 {
  19. // See C++14 19.5, System error support
  20. template <class T> constexpr bool is_error_code_enum_v
  21. = is_error_code_enum<T>::value;
  22. template <class T> constexpr bool is_error_condition_enum_v
  23. = is_error_condition_enum<T>::value;
  24. } // namespace fundamentals_v1
  25. } // namespace experimental
  26. } // namespace std
  27. */
  28. #include <experimental/__config>
  29. #if _LIBCPP_STD_VER > 11
  30. #include <system_error>
  31. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  32. #pragma GCC system_header
  33. #endif
  34. _LIBCPP_BEGIN_NAMESPACE_LFTS
  35. #ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
  36. template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_code_enum_v
  37. = is_error_code_enum<_Tp>::value;
  38. template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_condition_enum_v
  39. = is_error_condition_enum<_Tp>::value;
  40. #endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
  41. _LIBCPP_END_NAMESPACE_LFTS
  42. #endif /* _LIBCPP_STD_VER > 11 */
  43. #endif /* _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR */