Home | History | Annotate | Download | only in locale.time.get
      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 // <locale>
     11 
     12 // class time_base
     13 // {
     14 // public:
     15 //     enum dateorder {no_order, dmy, mdy, ymd, ydm};
     16 // };
     17 //
     18 // template <class charT, class InputIterator = istreambuf_iterator<charT> >
     19 // class time_get
     20 //     : public locale::facet,
     21 //       public time_base
     22 // {
     23 // public:
     24 //     typedef charT         char_type;
     25 //     typedef InputIterator iter_type;
     26 
     27 #include <locale>
     28 #include <iterator>
     29 #include <type_traits>
     30 
     31 int main()
     32 {
     33     static_assert((std::is_base_of<std::locale::facet, std::time_get<char> >::value), "");
     34     static_assert((std::is_base_of<std::locale::facet, std::time_get<wchar_t> >::value), "");
     35     static_assert((std::is_base_of<std::time_base, std::time_get<char> >::value), "");
     36     static_assert((std::is_base_of<std::time_base, std::time_get<wchar_t> >::value), "");
     37     static_assert((std::is_same<std::time_get<char>::char_type, char>::value), "");
     38     static_assert((std::is_same<std::time_get<wchar_t>::char_type, wchar_t>::value), "");
     39     static_assert((std::is_same<std::time_get<char>::iter_type, std::istreambuf_iterator<char> >::value), "");
     40     static_assert((std::is_same<std::time_get<wchar_t>::iter_type, std::istreambuf_iterator<wchar_t> >::value), "");
     41 }
     42