Home
last modified time | relevance | path

Searched refs:year_month_day (Results 1 – 19 of 19) sorted by relevance

/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/
Dok.pass.cpp28 using year_month_day = std::chrono::year_month_day; in main() typedef
32 ASSERT_NOEXCEPT( std::declval<const year_month_day>().ok()); in main()
33 ASSERT_SAME_TYPE(bool, decltype(std::declval<const year_month_day>().ok())); in main()
35 static_assert(!year_month_day{year{-32768}, month{}, day{}}.ok(), ""); // All three bad in main()
37 static_assert(!year_month_day{year{-32768}, January, day{1}}.ok(), ""); // Bad year in main()
38 static_assert(!year_month_day{year{2019}, month{}, day{1}}.ok(), ""); // Bad month in main()
39 static_assert(!year_month_day{year{2019}, January, day{} }.ok(), ""); // Bad day in main()
41 static_assert(!year_month_day{year{-32768}, month{}, day{1}}.ok(), ""); // Bad year & month in main()
42 static_assert(!year_month_day{year{2019}, month{}, day{} }.ok(), ""); // Bad month & day in main()
43 static_assert(!year_month_day{year{-32768}, January, day{} }.ok(), ""); // Bad year & day in main()
[all …]
Dop.local_days.pass.cpp43 static_assert(year_month_day{local_days{year{2017}/January/0}} == year{2016}/December/31); in RunTheExample()
44 static_assert(year_month_day{local_days{year{2017}/January/31}} == year{2017}/January/31); in RunTheExample()
45 static_assert(year_month_day{local_days{year{2017}/January/32}} == year{2017}/February/1); in RunTheExample()
55 using year_month_day = std::chrono::year_month_day; in main() typedef
57 ASSERT_NOEXCEPT(local_days(std::declval<year_month_day>())); in main()
61 constexpr year_month_day ymd{year{1970}, month{1}, day{1}}; in main()
65 static_assert( year_month_day{sd} == ymd, ""); // and back in main()
69 constexpr year_month_day ymd{year{2000}, month{2}, day{2}}; in main()
73 static_assert( year_month_day{sd} == ymd, ""); // and back in main()
79 constexpr year_month_day ymd{year{1940}, month{1}, day{2}}; in main()
[all …]
Dop.sys_days.pass.cpp43 static_assert(year_month_day{sys_days{year{2017}/January/0}} == year{2016}/December/31); in RunTheExample()
44 static_assert(year_month_day{sys_days{year{2017}/January/31}} == year{2017}/January/31); in RunTheExample()
45 static_assert(year_month_day{sys_days{year{2017}/January/32}} == year{2017}/February/1); in RunTheExample()
55 using year_month_day = std::chrono::year_month_day; in main() typedef
57 ASSERT_NOEXCEPT(sys_days(std::declval<year_month_day>())); in main()
61 constexpr year_month_day ymd{year{1970}, month{1}, day{1}}; in main()
65 static_assert( year_month_day{sd} == ymd, ""); // and back in main()
69 constexpr year_month_day ymd{year{2000}, month{2}, day{2}}; in main()
73 static_assert( year_month_day{sd} == ymd, ""); // and back in main()
79 constexpr year_month_day ymd{year{1940}, month{1}, day{2}}; in main()
[all …]
Dplus_minus_equal_month.pass.cpp41 using year_month_day = std::chrono::year_month_day; in main() typedef
44 ASSERT_NOEXCEPT(std::declval<year_month_day&>() += std::declval<months>()); in main()
45 ASSERT_NOEXCEPT(std::declval<year_month_day&>() -= std::declval<months>()); in main()
47 …ASSERT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() += std::declval<months>… in main()
48 …ASSERT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() -= std::declval<months>… in main()
50 …static_assert(testConstexpr<year_month_day, months>(year_month_day{year{1234}, month{1}, day{1}}),… in main()
56 year_month_day ym(y, month{i}, d); in main()
Dplus_minus_equal_year.pass.cpp41 using year_month_day = std::chrono::year_month_day; in main() typedef
44 ASSERT_NOEXCEPT(std::declval<year_month_day&>() += std::declval<years>()); in main()
45 ASSERT_NOEXCEPT(std::declval<year_month_day&>() -= std::declval<years>()); in main()
47 …ASSERT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() += std::declval<years>(… in main()
48 …ASSERT_SAME_TYPE(year_month_day&, decltype(std::declval<year_month_day&>() -= std::declval<years>(… in main()
50 …static_assert(testConstexpr<year_month_day, years>(year_month_day{year{1}, month{1}, day{1}}), ""); in main()
56 year_month_day ym(year{i}, m, d); in main()
Dyear.pass.cpp28 using year_month_day = std::chrono::year_month_day; in main() typedef
30 ASSERT_NOEXCEPT( std::declval<const year_month_day>().year()); in main()
31 ASSERT_SAME_TYPE(year, decltype(std::declval<const year_month_day>().year())); in main()
33 static_assert( year_month_day{}.year() == year{}, ""); in main()
37 year_month_day ym(year{i}, month{}, day{}); in main()
Dday.pass.cpp28 using year_month_day = std::chrono::year_month_day; in main() typedef
30 ASSERT_NOEXCEPT( std::declval<const year_month_day>().day()); in main()
31 ASSERT_SAME_TYPE(day, decltype(std::declval<const year_month_day>().day())); in main()
33 static_assert( year_month_day{}.day() == day{}, ""); in main()
37 year_month_day ymd(year{1234}, month{2}, day{i}); in main()
Dmonth.pass.cpp28 using year_month_day = std::chrono::year_month_day; in main() typedef
30 ASSERT_NOEXCEPT( std::declval<const year_month_day>().month()); in main()
31 ASSERT_SAME_TYPE(month, decltype(std::declval<const year_month_day>().month())); in main()
33 static_assert( year_month_day{}.month() == month{}, ""); in main()
37 year_month_day ymd(year{1234}, month{i}, day{12}); in main()
Dctor.local_days.pass.cpp39 using year_month_day = std::chrono::year_month_day; in main() typedef
41 ASSERT_NOEXCEPT(year_month_day{std::declval<local_days>()}); in main()
45 constexpr year_month_day ymd{sd}; in main()
55 constexpr year_month_day ymd{sd}; in main()
68 constexpr year_month_day ymd{sd}; in main()
78 year_month_day ymd{sd}; in main()
Dctor.sys_days.pass.cpp38 using year_month_day = std::chrono::year_month_day; in main() typedef
40 ASSERT_NOEXCEPT(year_month_day{std::declval<sys_days>()}); in main()
44 constexpr year_month_day ymd{sd}; in main()
54 constexpr year_month_day ymd{sd}; in main()
67 constexpr year_month_day ymd{sd}; in main()
77 year_month_day ymd{sd}; in main()
Dctor.pass.cpp37 using year_month_day = std::chrono::year_month_day; in main() typedef
39 ASSERT_NOEXCEPT(year_month_day{}); in main()
40 ASSERT_NOEXCEPT(year_month_day{year{1}, month{1}, day{1}}); in main()
44 constexpr year_month_day ym0{}; in main()
50 constexpr year_month_day ym1{year{2019}, January, day{12}}; in main()
Dctor.year_month_day_last.pass.cpp37 using year_month_day = std::chrono::year_month_day; in main() typedef
39 ASSERT_NOEXCEPT(year_month_day{std::declval<const year_month_day_last>()}); in main()
43 constexpr year_month_day ymd{ymdl}; in main()
53 constexpr year_month_day ymd{ymdl}; in main()
63 constexpr year_month_day ymd{ymdl}; in main()
73 year_month_day ymd{ymdl}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/
Dcomparisons.pass.cpp38 using year_month_day = std::chrono::year_month_day; in main() typedef
40 AssertComparisons6AreNoexcept<year_month_day>(); in main()
41 AssertComparisons6ReturnBool<year_month_day>(); in main()
47 year_month_day{year{1234}, January, day{1}}, in main()
48 year_month_day{year{1234}, January, day{1}}, in main()
53 year_month_day{year{1234}, January, day{1}}, in main()
54 year_month_day{year{1234}, January, day{2}}, in main()
59 year_month_day{year{1234}, January, day{1}}, in main()
60 year_month_day{year{1234}, February, day{1}}, in main()
65 year_month_day{year{1234}, January, day{1}}, in main()
[all …]
Dplus.pass.cpp35 constexpr bool testConstexprYears(std::chrono::year_month_day ym) in testConstexprYears()
45 constexpr bool testConstexprMonths(std::chrono::year_month_day ym) in testConstexprMonths()
62 using year_month_day = std::chrono::year_month_day; in main() typedef
65 ASSERT_NOEXCEPT(std::declval<year_month_day>() + std::declval<months>()); in main()
66 ASSERT_NOEXCEPT(std::declval<months>() + std::declval<year_month_day>()); in main()
68 …ASSERT_SAME_TYPE(year_month_day, decltype(std::declval<year_month_day>() + std::declval<months>())… in main()
69 …ASSERT_SAME_TYPE(year_month_day, decltype(std::declval<months>() + std::declval<year_month_day>())… in main()
71 static_assert(testConstexprMonths(year_month_day{year{1}, month{1}, day{1}}), ""); in main()
73 year_month_day ym{year{1234}, std::chrono::January, day{12}}; in main()
76 year_month_day ym1 = ym + months{i}; in main()
[all …]
Dminus.pass.cpp28 …std::chrono::year_month_day ym0{std::chrono::year{1234}, std::chrono::January, std::chrono::day{12… in test_constexpr()
29 std::chrono::year_month_day ym1 = ym0 - std::chrono::years{10}; in test_constexpr()
42 using year_month_day = std::chrono::year_month_day; in main() typedef
45 … ASSERT_NOEXCEPT( std::declval<year_month_day>() - std::declval<years>()); in main()
46 …ASSERT_SAME_TYPE(year_month_day, decltype(std::declval<year_month_day>() - std::declval<years>())); in main()
52 year_month_day ym{year{1234}, January, day{10}}; in main()
55 year_month_day ym1 = ym - years{i}; in main()
Dstreaming.pass.cpp52 using year_month_day = std::chrono::year_month_day; in main() typedef
57 std::cout << year_month_day{year{2018}, month{3}, day{12}}; in main()
/external/libcxx/test/std/utilities/time/time.cal/time.cal.operators/
Dyear_month_day.pass.cpp53 using year_month_day = std::chrono::year_month_day; in main() typedef
60 ASSERT_SAME_TYPE(year_month_day, decltype(Feb2018/day{2})); in main()
73 year_month_day ymd = ym/d; in main()
83 ASSERT_SAME_TYPE(year_month_day, decltype(Feb2018/2)); in main()
96 year_month_day ymd = ym/k; in main()
106 ASSERT_SAME_TYPE(year_month_day, decltype(Feb2018/2)); in main()
119 year_month_day ymd = ym/k; in main()
131 ASSERT_SAME_TYPE(year_month_day, decltype(year{2018}/month_day{February, day{2}})); in main()
133 ASSERT_SAME_TYPE(year_month_day, decltype(month_day{February, day{2}}/year{2018})); in main()
148 year_month_day ymd1 = y/md; in main()
[all …]
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/
Dtypes.pass.cpp22 using year_month_day = std::chrono::year_month_day; in main() typedef
24 static_assert(std::is_trivially_copyable_v<year_month_day>, ""); in main()
25 static_assert(std::is_standard_layout_v<year_month_day>, ""); in main()
/external/libcxx/include/
Dchrono446 // 25.8.14, class year_month_day class // C++20
447 year_month_day;
449 constexpr bool operator==(const year_month_day& x, const year_month_day& y) noexcept;
450 constexpr bool operator!=(const year_month_day& x, const year_month_day& y) noexcept;
451 constexpr bool operator< (const year_month_day& x, const year_month_day& y) noexcept;
452 constexpr bool operator> (const year_month_day& x, const year_month_day& y) noexcept;
453 constexpr bool operator<=(const year_month_day& x, const year_month_day& y) noexcept;
454 constexpr bool operator>=(const year_month_day& x, const year_month_day& y) noexcept;
456 constexpr year_month_day operator+(const year_month_day& ymd, const months& dm) noexcept;
457 constexpr year_month_day operator+(const months& dm, const year_month_day& ymd) noexcept;
[all …]