diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -108,6 +108,9 @@ as either ``for (auto&& c : path)`` or ``for (const auto& c : path)``. ``std::reverse_iterator`` is no longer rejected. +- Removed the nonstandard default constructor from ``std::chrono::month_weekday``. + You must now explicitly initialize with a ``chrono::month`` and + ``chrono::weekday_indexed`` instead of "meh, whenever". ABI Changes ----------- diff --git a/libcxx/include/__chrono/calendar.h b/libcxx/include/__chrono/calendar.h --- a/libcxx/include/__chrono/calendar.h +++ b/libcxx/include/__chrono/calendar.h @@ -540,7 +540,6 @@ chrono::month __m; chrono::weekday_indexed __wdi; public: - month_weekday() = default; constexpr month_weekday(const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept : __m{__mval}, __wdi{__wdival} {} inline constexpr chrono::month month() const noexcept { return __m; } diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// UNSUPPORTED: libcpp-has-no-localization -// XFAIL: * - -// -// class day; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const day& d); -// -// Effects: Inserts format(fmt, d) where fmt is "%d" widened to charT. -// If !d.ok(), appends with " is not a valid day". -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const day& d); -// -// Effects: Streams d into os using the format specified by the NTCTS fmt. -// fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// day& d, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the day d using the format flags -// given in the NTCTS fmt as specified in 25.12. -// If the parse fails to decode a valid day, is.setstate(ios_base::failbit) -// shall be called and d shall not be modified. -// If %Z is used and successfully parsed, that value will be assigned to *abbrev -// if abbrev is non-null. If %z (or a modified variant) is used and -// successfully parsed, that value will be assigned to *offset if offset is non-null. -// - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using day = std::chrono::day; - std::cout << day{1}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class month_day; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const month_day& md); -// -// Returns: os << md.month() << '/' << md.day(). -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const month_day& md); -// -// Effects: Streams md into os using the format specified by the NTCTS fmt. -// fmt encoding follows the rules specified in 25.11. - - -#include -#include -#include -#include -#include "test_macros.h" - -int main(int, char**) -{ - using month_day = std::chrono::month_day; - using month = std::chrono::month; - using day = std::chrono::day; - std::cout << month_day{month{1}, day{1}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp @@ -36,8 +36,8 @@ static_assert( testComparisons6Values(month{1}, month{2}), ""); // same day, different months - for (unsigned i = 1; i < 12; ++i) - for (unsigned j = 1; j < 12; ++j) + for (unsigned i = 1; i < 13; ++i) + for (unsigned j = 1; j < 13; ++j) assert((testComparisons6Values(month{i}, month{j}))); return 0; diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class month_day_last; -// -// template -// basic_ostream& -// operator<<(basic_ostream& os, const month_day_last& mdl); -// -// Returns: os << mdl.month() << "/last". - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using month_day_last = std::chrono::month_day_last; - using month = std::chrono::month; - std::cout << month_day_last{month{1}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp @@ -40,8 +40,8 @@ static_assert(testComparisons6Values( 5U, 5U), ""); static_assert(testComparisons6Values( 5U, 10U), ""); - for (unsigned i = 1; i < 10; ++i) - for (unsigned j = 10; j < 10; ++j) + for (unsigned i = 1; i < 13; ++i) + for (unsigned j = 10; j < 13; ++j) assert(testComparisons6Values(i, j)); return 0; diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class month; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const month& m); -// -// Effects: If m.ok() == true inserts format(os.getloc(), fmt, m) where fmt is "%b" widened to charT. -// Otherwise inserts int{m} << " is not a valid month". -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const month& m); -// -// Effects: Streams m into os using the format specified by the NTCTS fmt. -// fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// month& m, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the month m using the format flags -// given in the NTCTS fmt as specified in 25.12. If the parse fails to decode a valid month, -// is.setstate(ios_- base::failbit) shall be called and m shall not be modified. -// If %Z is used and successfully parsed, that value will be assigned to *abbrev if -// abbrev is non-null. If %z (or a modified variant) is used and successfully parsed, -// that value will be assigned to *offset if offset is non-null. - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using month = std::chrono::month; - std::cout << month{1}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp @@ -31,8 +31,6 @@ ASSERT_NOEXCEPT( std::declval().month()); ASSERT_SAME_TYPE(month, decltype(std::declval().month())); - static_assert( month_weekday{}.month() == month{}, ""); - for (unsigned i = 1; i <= 50; ++i) { month_weekday md(month{i}, weekday_indexed{Sunday, 1}); diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class month_weekday; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const month_weekday& mwd); -// -// Returns: os << mwd.month() << '/' << mwd.weekday_indexed(). - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using month_weekday = std::chrono::month_weekday; - using month = std::chrono::month; - using weekday_indexed = std::chrono::weekday_indexed; - using weekday = std::chrono::weekday; - - std::cout << month_weekday{month{1}, weekday_indexed{weekday{3}, 3}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class month_weekday_last; -// -// template -// basic_ostream& -// operator<<(basic_ostream& os, const month_weekday_last& mdl); -// -// Returns: os << mdl.month() << "/last". - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using month_weekday_last = std::chrono::month_weekday_last; - using month = std::chrono::month; - using weekday = std::chrono::weekday; - using weekday_last = std::chrono::weekday_last; - - std::cout << month_weekday_last{month{1}, weekday_last{weekday{3}}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class weekday_indexed; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const weekday_indexed& wdi); -// -// Effects: os << wdi.weekday() << '[' << wdi.index(). -// If wdi.index() is in the range [1, 5], appends with ']', -// otherwise appends with " is not a valid index]". - - -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using weekday_indexed = std::chrono::weekday_indexed; - using weekday = std::chrono::weekday; - - std::cout << weekday_indexed{weekday{3}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class weekday_last; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const weekday_last& wdl); -// -// Returns: os << wdl.weekday() << "[last]". - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using weekday_last = std::chrono::weekday_last; - using weekday = std::chrono::weekday; - - std::cout << weekday_last{weekday{3}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp @@ -19,9 +19,6 @@ // Otherwise the value returned is unspecified. // [Example: Sunday - Monday == days{6}. —end example] - -extern "C" int printf(const char *, ...); - #include #include #include diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class weekday; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const weekday& wd); -// -// Effects: If wd.ok() == true inserts format(os.getloc(), fmt, wd) where fmt is "%a" widened to charT. -// Otherwise inserts unsigned{wd} << " is not a valid weekday". -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const weekday& wd); -// -// Effects: Streams wd into os using the format specified by the NTCTS fmt. -// fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// weekday& wd, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the weekday wd using -// the format flags given in the NTCTS fmt as specified in 25.12. -// If the parse fails to decode a valid weekday, is.setstate(ios_- base::failbit) -// shall be called and wd shall not be modified. -// If %Z is used and successfully parsed, that value will be assigned -// to *abbrev if abbrev is non-null. -// If %z (or a modified variant) is used and successfully parsed, -// that value will be assigned to *offset if offset is non-null. - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using weekday = std::chrono::weekday; - - std::cout << weekday{3}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp @@ -19,8 +19,6 @@ // Otherwise the value returned is unspecified. // [Example: January - February == years{11}. —end example] -extern "C" int printf(const char *, ...); - #include #include #include diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year& y); -// -// Effects: Inserts format(fmt, y) where fmt is "%Y" widened to charT. -// If !y.ok(), appends with " is not a valid year". -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const year& y); -// -// Effects: Streams y into os using the format specified by the NTCTS fmt. -// fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// year& y, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the year y using the format flags -// given in the NTCTS fmt as specified in 25.12. If the parse fails to decode a valid year, -// is.setstate(ios_base::failbit) shall be called and y shall not be modified. If %Z is used -// and successfully parsed, that value will be assigned to *abbrev if abbrev is non-null. -// If %z (or a modified variant) is used and successfully parsed, that value will be -// assigned to *offset if offset is non-null. - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using year = std::chrono::year; - - std::cout << year{2018}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp @@ -59,8 +59,8 @@ i == j, i < j ))); // same month, different years - for (int i = 1000; i < 20; ++i) - for (int j = 1000; j < 20; ++j) + for (int i = 1000; i < 2000; ++i) + for (int j = 1000; j < 2000; ++j) assert((testComparisons6( year_month{year{i}, std::chrono::January}, year_month{year{j}, std::chrono::January}, diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year_month; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year_month& ym); -// -// Returns: os << ym.year() << '/' << ym.month(). -// -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const year_month& ym); -// -// Effects: Streams ym into os using the format specified by the NTCTS fmt. fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// year_month& ym, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the year_month ym using the format -// flags given in the NTCTS fmt as specified in 25.12. If the parse fails to decode -// a valid year_month, is.setstate(ios_- base::failbit) shall be called and ym shall -// not be modified. If %Z is used and successfully parsed, that value will be assigned -// to *abbrev if abbrev is non-null. If %z (or a modified variant) is used and -// successfully parsed, that value will be assigned to *offset if offset is non-null. - - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using year_month = std::chrono::year_month; - using year = std::chrono::year; - using month = std::chrono::month; - - std::cout << year_month{year{2018}, month{3}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp @@ -108,8 +108,8 @@ i == j, i < j ))); // same month, different years - for (int i = 1000; i < 20; ++i) - for (int j = 1000; j < 20; ++j) + for (int i = 1000; i < 2000; ++i) + for (int j = 1000; j < 2000; ++j) assert((testComparisons6( year_month_day{year{i}, January, day{12}}, year_month_day{year{j}, January, day{12}}, diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year_month_day; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year_month_day& ym); -// -// Returns: os << ym.year() << '/' << ym.month(). -// -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const year_month_day& ym); -// -// Effects: Streams ym into os using the format specified by the NTCTS fmt. fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// year_month_day& ym, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the year_month_day ym using the format -// flags given in the NTCTS fmt as specified in 25.12. If the parse fails to decode -// a valid year_month_day, is.setstate(ios_- base::failbit) shall be called and ym shall -// not be modified. If %Z is used and successfully parsed, that value will be assigned -// to *abbrev if abbrev is non-null. If %z (or a modified variant) is used and -// successfully parsed, that value will be assigned to *offset if offset is non-null. - - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using year_month_day = std::chrono::year_month_day; - using year = std::chrono::year; - using month = std::chrono::month; - using day = std::chrono::day; - - std::cout << year_month_day{year{2018}, month{3}, day{12}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp @@ -77,8 +77,8 @@ i == j, i < j ))); // same month, different years - for (int i = 1000; i < 20; ++i) - for (int j = 1000; j < 20; ++j) + for (int i = 1000; i < 2000; ++i) + for (int j = 1000; j < 2000; ++j) assert((testComparisons6( year_month_day_last{year{i}, month_day_last{January}}, year_month_day_last{year{j}, month_day_last{January}}, diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year_month_day_last; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year_month_day_last& ymdl); -// -// Returns: os << ymdl.year() << '/' << ymdl.month_day_last(). - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using year_month_day_last = std::chrono::year_month_day_last; - using year = std::chrono::year; - using month = std::chrono::month; - using month_day_last = std::chrono::month_day_last; - - std::cout << year_month_day_last{year{2018}, month_day_last{month{3}}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp @@ -103,8 +103,8 @@ i == j))); // same month, different years - for (int i = 1000; i < 20; ++i) - for (int j = 1000; j < 20; ++j) + for (int i = 1000; i < 2000; ++i) + for (int j = 1000; j < 2000; ++j) assert((testComparisons2( year_month_weekday{year{i}, January, weekday_indexed{Tuesday, 1}}, year_month_weekday{year{j}, January, weekday_indexed{Tuesday, 1}}, diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year_month_weekday; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year_month_weekday& ym); -// -// Returns: os << ym.year() << '/' << ym.month(). -// -// -// template -// basic_ostream& -// to_stream(basic_ostream& os, const charT* fmt, const year_month_weekday& ym); -// -// Effects: Streams ym into os using the format specified by the NTCTS fmt. fmt encoding follows the rules specified in 25.11. -// -// template> -// basic_istream& -// from_stream(basic_istream& is, const charT* fmt, -// year_month_weekday& ym, basic_string* abbrev = nullptr, -// minutes* offset = nullptr); -// -// Effects: Attempts to parse the input stream is into the year_month_weekday ym using the format -// flags given in the NTCTS fmt as specified in 25.12. If the parse fails to decode -// a valid year_month_weekday, is.setstate(ios_- base::failbit) shall be called and ym shall -// not be modified. If %Z is used and successfully parsed, that value will be assigned -// to *abbrev if abbrev is non-null. If %z (or a modified variant) is used and -// successfully parsed, that value will be assigned to *offset if offset is non-null. - - - -#include -#include -#include -#include -#include "test_macros.h" - -int main(int, char**) -{ - using year_month_weekday = std::chrono::year_month_weekday; - using year = std::chrono::year; - using month = std::chrono::month; - using weekday = std::chrono::weekday; - - std::cout << year_month_weekday{year{2018}, month{3}, weekday{4}}; - - return 0; -} diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp +++ b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp @@ -104,8 +104,8 @@ i == j))); // same month, different years - for (int i = 1000; i < 20; ++i) - for (int j = 1000; j < 20; ++j) + for (int i = 1000; i < 2000; ++i) + for (int j = 1000; j < 2000; ++j) assert((testComparisons2( year_month_weekday_last{year{i}, January, weekday_last{Tuesday}}, year_month_weekday_last{year{j}, January, weekday_last{Tuesday}}, diff --git a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// XFAIL: * - -// -// class year_month_weekday_last; - -// template -// basic_ostream& -// operator<<(basic_ostream& os, const year_month_weekday_last& ymwdl); -// -// Returns: os << ymwdl.year() << '/' << ymwdl.month() << '/' << ymwdl.weekday_last(). - - -#include -#include -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ - using year_month_weekday_last = std::chrono::year_month_weekday_last; - using year = std::chrono::year; - using month = std::chrono::month; - using weekday = std::chrono::weekday; - using weekday_last = std::chrono::weekday_last; - - std::cout << year_month_weekday_last{year{2018}, month{3}, weekday_last{weekday{4}}}; - - return 0; -}