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
13 // constexpr day operator""d(unsigned long long d) noexcept;
16 #include <type_traits>
19 #include "test_macros.h"
24 using namespace std::chrono
;
26 ASSERT_SAME_TYPE(day
, decltype(4d
));
28 static_assert( 7d
== day(7), "");
30 assert (d1
== day(4));
34 using namespace std::literals
;
36 ASSERT_SAME_TYPE(std::chrono::day
, decltype(4d
));
38 static_assert( 7d
== std::chrono::day(7), "");
40 std::chrono::day d1
= 4d
;
41 assert (d1
== std::chrono::day(4));