Home | History | Annotate | Download | only in header.system_error.synop
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // UNSUPPORTED: c++98, c++03, c++11
     11 
     12 // <experimental/system_error>
     13 
     14 // template <class T> constexpr bool is_error_condition_enum_v;
     15 
     16 #include <experimental/system_error>
     17 #include <type_traits>
     18 namespace ex = std::experimental;
     19 
     20 int main() {
     21   {
     22     static_assert(ex::is_error_condition_enum_v<std::errc>, "");
     23 
     24     static_assert(ex::is_error_condition_enum_v<std::errc> ==
     25                   std::is_error_condition_enum <std::errc>::value, "");
     26 
     27     static_assert(
     28         std::is_same<decltype(ex::is_error_condition_enum_v<std::errc>),
     29                      const bool>::value,
     30         "");
     31   }
     32   {
     33     static_assert(!ex::is_error_condition_enum_v<int>, "");
     34 
     35     static_assert(ex::is_error_condition_enum_v<int> ==
     36                   std::is_error_condition_enum <int>::value, "");
     37   }
     38 }
     39