@@ -2134,7 +2134,7 @@ namespace chrono
// either "{:L}[{}]" or "{:L}[{} is not a valid index]". The {:L} spec
// means to format the weekday using ostringstream, so just do that.
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __wdi.weekday();
const auto __i = __wdi.index();
if constexpr (is_same_v<_CharT, char>)
@@ -2157,7 +2157,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{:L}[last]"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __wdl.weekday() << _GLIBCXX_WIDEN("[last]");
__os << __os2.view();
return __os;
@@ -2169,7 +2169,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{:L}/{}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __md.month();
if constexpr (is_same_v<_CharT, char>)
__os2 << '/';
@@ -2189,7 +2189,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{:L}/last"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __mdl.month();
if constexpr (is_same_v<_CharT, char>)
__os2 << "/last";
@@ -2206,7 +2206,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{:L}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __mwd.month();
if constexpr (is_same_v<_CharT, char>)
__os2 << '/';
@@ -2224,7 +2224,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{:L}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __mwdl.month();
if constexpr (is_same_v<_CharT, char>)
__os2 << '/';
@@ -2241,7 +2241,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __ym.year();
if constexpr (is_same_v<_CharT, char>)
__os2 << '/';
@@ -2277,7 +2277,7 @@ namespace chrono
{
// As above, just write straight to a stringstream, as if by "{}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
__os2 << __ymdl.year();
if constexpr (is_same_v<_CharT, char>)
__os2 << '/';
@@ -2296,7 +2296,7 @@ namespace chrono
// As above, just write straight to a stringstream, as if by
// "{}/{:L}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
_CharT __slash;
if constexpr (is_same_v<_CharT, char>)
__slash = '/';
@@ -2316,7 +2316,7 @@ namespace chrono
// As above, just write straight to a stringstream, as if by
// "{}/{:L}/{:L}"
basic_stringstream<_CharT> __os2;
- __os2.imbue(__os.getloc);
+ __os2.imbue(__os.getloc());
_CharT __slash;
if constexpr (is_same_v<_CharT, char>)
__slash = '/';
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << January/14 << ' ' << February/30 << ' ' << March/34;
+ VERIFY( ss.str() == "Jan/14 Feb/30 Mar/34 is not a valid day" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << July/27;
+ VERIFY( ss.str() == "juil./27" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << January/last << ' ' << February/last << ' ' << March/last;
+ VERIFY( ss.str() == "Jan/last Feb/last Mar/last" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << July/last;
+ VERIFY( ss.str() == "juil./last" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << January/Saturday[2] << ' ' << February/Monday[5] << ' '
+ << March/Sunday[8];
+ VERIFY( ss.str() == "Jan/Sat[2] Feb/Mon[5] Mar/Sun[8 is not a valid index]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << July/Thursday[4];
+ VERIFY( ss.str() == "juil./jeu.[4]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << January/Saturday[last] << ' ' << February/Monday[last] << ' '
+ << March/weekday(9)[last];
+ VERIFY( ss.str() == "Jan/Sat[last] Feb/Mon[last] Mar/9 is not a valid weekday[last]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << July/Thursday[last];
+ VERIFY( ss.str() == "juil./jeu.[last]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << Monday[2] << ' ' << Wednesday[5] << ' ' << Friday[13];
+ VERIFY( ss.str() == "Mon[2] Wed[5] Fri[13 is not a valid index]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << Saturday[1];
+ VERIFY( ss.str() == "sam.[1]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << Monday[last] << ' ' << Wednesday[last] << ' ' << weekday(9)[last];
+ VERIFY( ss.str() == "Mon[last] Wed[last] 9 is not a valid weekday[last]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << Saturday[last];
+ VERIFY( ss.str() == "sam.[last]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << 2023y/January << ' ' << 2023y/month(13);
+ VERIFY( ss.str() == "2023/Jan 2023/13 is not a valid month" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << 2023y/July;
+ VERIFY( ss.str() == "2023/juil." );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << 2023y/January/last << ' ' << 2023y/month(13)/last;
+ VERIFY( ss.str() == "2023/Jan/last 2023/13 is not a valid month/last" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << 2023y/July/last;
+ VERIFY( ss.str() == "2023/juil./last" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,42 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << 2023y/January/Saturday[2];
+ VERIFY( ss.str() == "2023/Jan/Sat[2]" );
+ ss.clear();
+ ss.str("");
+ ss << 2023y/month(13)/Monday[1];
+ VERIFY( ss.str() == "2023/13 is not a valid month/Mon[1]" );
+ ss.clear();
+ ss.str("");
+ ss << 2023y/December/weekday(9)[5];
+ VERIFY( ss.str() == "2023/Dec/9 is not a valid weekday[5]" );
+ ss.clear();
+ ss.str("");
+ ss << 2023y/December/Monday[6];
+ VERIFY( ss.str() == "2023/Dec/Mon[6 is not a valid index]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << 2023y/July/Thursday[2];
+ VERIFY( ss.str() == "2023/juil./jeu.[2]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}
new file mode 100644
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+
+#include <chrono>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test_ostream()
+{
+ using std::ostringstream;
+ using namespace std::chrono;
+
+ ostringstream ss;
+ ss << 2023y/January/Monday[last];
+ VERIFY( ss.str() == "2023/Jan/Mon[last]" );
+ ss.clear();
+ ss.str("");
+ ss << 2023y/month(13)/Monday[last];
+ VERIFY( ss.str() == "2023/13 is not a valid month/Mon[last]" );
+ ss.clear();
+ ss.str("");
+ ss << 2023y/December/weekday(9)[last];
+ VERIFY( ss.str() == "2023/Dec/9 is not a valid weekday[last]" );
+
+ ss.str("");
+ ss.imbue(std::locale(ISO_8859(15,fr_FR)));
+ ss << 2023y/July/Thursday[last];
+ VERIFY( ss.str() == "2023/juil./jeu.[last]" );
+}
+
+int main()
+{
+ test_ostream();
+ // TODO: test_format();
+ // TODO: test_parse();
+}