1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // class month_day_last;
13 // constexpr month_day_last(const chrono::month& m) noexcept;
15 // Effects: Constructs an object of type month_day_last by initializing m_ with m
17 // constexpr chrono::month month() const noexcept;
18 // constexpr bool ok() const noexcept;
21 #include <type_traits>
24 #include "test_macros.h"
28 using month
= std::chrono::month
;
29 using month_day_last
= std::chrono::month_day_last
;
31 ASSERT_NOEXCEPT(month_day_last
{month
{1}});
33 constexpr month_day_last md0
{month
{}};
34 static_assert( md0
.month() == month
{}, "");
35 static_assert(!md0
.ok(), "");
37 constexpr month_day_last md1
{std::chrono::January
};
38 static_assert( md1
.month() == std::chrono::January
, "");
39 static_assert( md1
.ok(), "");