• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++03, c++11, c++14, c++17
9 // XFAIL: *
10 
11 // <chrono>
12 // class weekday_indexed;
13 
14 // template<class charT, class traits>
15 //   basic_ostream<charT, traits>&
16 //   operator<<(basic_ostream<charT, traits>& os, const weekday_indexed& wdi);
17 //
18 //   Effects: os << wdi.weekday() << '[' << wdi.index().
19 //     If wdi.index() is in the range [1, 5], appends with ']',
20 //       otherwise appends with " is not a valid index]".
21 
22 
23 #include <chrono>
24 #include <type_traits>
25 #include <cassert>
26 
27 #include "test_macros.h"
28 
main(int,char **)29 int main(int, char**)
30 {
31     using weekday_indexed = std::chrono::weekday_indexed;
32     using weekday         = std::chrono::weekday;
33 
34     std::cout << weekday_indexed{weekday{3}};
35 
36   return 0;
37 }
38