[mlir][vector]add extractInsertFoldConstantOp fold function and apply it to extractOp...
[llvm-project.git] / libcxx / test / std / time / time.cal / time.cal.day / time.cal.day.nonmembers / literals.pass.cpp
blob3e753d9c20bfc05b8cbd0d292db443960beef3e7
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 day;
13 // constexpr day operator""d(unsigned long long d) noexcept;
15 #include <chrono>
16 #include <type_traits>
17 #include <cassert>
19 #include "test_macros.h"
21 int main(int, char**)
24 using namespace std::chrono;
25 ASSERT_NOEXCEPT( 4d);
26 ASSERT_SAME_TYPE(day, decltype(4d));
28 static_assert( 7d == day(7), "");
29 day d1 = 4d;
30 assert (d1 == day(4));
34 using namespace std::literals;
35 ASSERT_NOEXCEPT( 4d);
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));
45 return 0;