[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.cal / time.cal.wdlast / time.cal.wdlast.members / ctor.pass.cpp
blob0562aaad44aeb77e52dd5978d054cb730d2a5592
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
10 // <chrono>
11 // class weekday_last;
13 // explicit constexpr weekday_last(const chrono::weekday& wd) noexcept;
15 // Effects: Constructs an object of type weekday_last by initializing wd_ with wd.
17 // constexpr chrono::weekday weekday() const noexcept;
18 // constexpr bool ok() const noexcept;
20 #include <chrono>
21 #include <type_traits>
22 #include <cassert>
24 #include "test_macros.h"
26 int main(int, char**)
28 using weekday = std::chrono::weekday;
29 using weekday_last = std::chrono::weekday_last;
31 ASSERT_NOEXCEPT(weekday_last{weekday{}});
33 constexpr weekday_last wdl0{weekday{}};
34 static_assert( wdl0.weekday() == weekday{}, "");
35 static_assert( wdl0.ok(), "");
37 constexpr weekday_last wdl1 {weekday{1}};
38 static_assert( wdl1.weekday() == weekday{1}, "");
39 static_assert( wdl1.ok(), "");
41 for (unsigned i = 0; i <= 255; ++i)
43 weekday_last wdl{weekday{i}};
44 assert(wdl.weekday() == weekday{i});
47 return 0;