aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-01-14 15:41:58 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-01-14 16:59:58 +0000
commit9afc914809ca90d03a9a8f53c439ebf4c62cf544 (patch)
treedf197ff1229ee01f5c9c2e81041d3da139fbec9c /libstdc++-v3/include
parente176c031f02d01623b697c3c78c85cebb0506e87 (diff)
downloadgcc-9afc914809ca90d03a9a8f53c439ebf4c62cf544.zip
gcc-9afc914809ca90d03a9a8f53c439ebf4c62cf544.tar.gz
gcc-9afc914809ca90d03a9a8f53c439ebf4c62cf544.tar.bz2
libstdc++: Fix ostream insertion operators for calendar types
libstdc++-v3/ChangeLog: * include/bits/chrono_io.h (operator<<): Fix syntax errors. * testsuite/std/time/month_day/io.cc: New test. * testsuite/std/time/month_day_last/io.cc: New test. * testsuite/std/time/month_weekday/io.cc: New test. * testsuite/std/time/month_weekday_last/io.cc: New test. * testsuite/std/time/weekday_indexed/io.cc: New test. * testsuite/std/time/weekday_last/io.cc: New test. * testsuite/std/time/year_month/io.cc: New test. * testsuite/std/time/year_month_day_last/io.cc: New test. * testsuite/std/time/year_month_weekday/io.cc: New test. * testsuite/std/time/year_month_weekday_last/io.cc: New test.
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/chrono_io.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/libstdc++-v3/include/bits/chrono_io.h b/libstdc++-v3/include/bits/chrono_io.h
index 4e53cd4..87caa30 100644
--- a/libstdc++-v3/include/bits/chrono_io.h
+++ b/libstdc++-v3/include/bits/chrono_io.h
@@ -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 = '/';