[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.cal / time.cal.ymd / time.cal.ymd.members / ctor.pass.cpp
blob82dfa65b7ebf03b47ceef95507786cffd4c2a9cb
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 year_month_day;
13 // year_month_day() = default;
14 // constexpr year_month_day(const chrono::year& y, const chrono::month& m,
15 // const chrono::day& d) noexcept;
17 // Effects: Constructs an object of type year_month_day by initializing
18 // y_ with y, m_ with m, and d_ with d.
20 // constexpr chrono::year year() const noexcept;
21 // constexpr chrono::month month() const noexcept;
22 // constexpr chrono::day day() const noexcept;
23 // constexpr bool ok() const noexcept;
25 #include <chrono>
26 #include <type_traits>
27 #include <cassert>
29 #include "test_macros.h"
31 int main(int, char**)
33 using year = std::chrono::year;
34 using month = std::chrono::month;
35 using day = std::chrono::day;
36 using year_month_day = std::chrono::year_month_day;
38 ASSERT_NOEXCEPT(year_month_day{});
39 ASSERT_NOEXCEPT(year_month_day{year{1}, month{1}, day{1}});
41 constexpr month January = std::chrono::January;
43 constexpr year_month_day ym0{};
44 static_assert( ym0.year() == year{}, "");
45 static_assert( ym0.month() == month{}, "");
46 static_assert( ym0.day() == day{}, "");
47 static_assert(!ym0.ok(), "");
49 constexpr year_month_day ym1{year{2019}, January, day{12}};
50 static_assert( ym1.year() == year{2019}, "");
51 static_assert( ym1.month() == January, "");
52 static_assert( ym1.day() == day{12}, "");
53 static_assert( ym1.ok(), "");
56 return 0;