public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/109772] [13/14 Regression] Memory layout optimization of std::chrono::hh_mm_ss is wrong
Date: Wed, 10 May 2023 22:47:24 +0000	[thread overview]
Message-ID: <bug-109772-4-hcOSSKz4fB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109772-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109772

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There's another problem which is that hh_mm_ss<duration<char, ratio<1, 11>>>
fails to compile:

/home/jwakely/gcc/13/include/c++/13.0.1/chrono: In instantiation of 'class
std::chrono::hh_mm_ss<std::chrono::duration<char, std::ratio<1, 11> > >':
hms.cc:12:63:   required from here
/home/jwakely/gcc/13/include/c++/13.0.1/chrono:2439:37: error: ambiguous
template instantiation for 'struct
std::chrono::hh_mm_ss<std::chrono::duration<char, std::ratio<1, 11> >
>::__subseconds<std::chrono::duration<long int, std::ratio<1, 1000000> > >'
 2439 |         __subseconds<precision>     _M_ss{};
      |                                     ^~~~~
/home/jwakely/gcc/13/include/c++/13.0.1/chrono:2412:18: note: candidates are:
'template<class _Duration> template<class _Rep, class _Period>  requires
!(treat_as_floating_point_v<_Rep>) && (ratio_less_v<_Period, std::ratio<1, 1>
>) && ((ratio_greater_equal_v<_Period, std::ratio<1, 250> >) ||
(__fits<unsigned char>)) struct
std::chrono::hh_mm_ss<_Duration>::__subseconds<std::chrono::duration<_Rep,
_Period> > [with _Rep = long int; _Period = std::ratio<1, 1000000>; _Duration =
std::chrono::duration<char, std::ratio<1, 11> >]'
 2412 |           struct __subseconds<duration<_Rep, _Period>>
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwakely/gcc/13/include/c++/13.0.1/chrono:2426:18: note:                
'template<class _Duration> template<class _Rep, class _Period>  requires
!(treat_as_floating_point_v<_Rep>) && (ratio_less_v<_Period, std::ratio<1, 250>
>) && ((ratio_greater_equal_v<_Period, std::ratio<1, 4000000000> >) ||
(__fits<uint_least32_t>)) struct
std::chrono::__subseconds<std::chrono::duration<_Rep, _Period> > [with _Rep =
long int; _Period = std::ratio<1, 1000000>; _Duration =
std::chrono::duration<char, std::ratio<1, 11> >]'
 2426 |           struct __subseconds<duration<_Rep, _Period>>
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  parent reply	other threads:[~2023-05-10 22:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 14:41 [Bug libstdc++/109772] New: " redi at gcc dot gnu.org
2023-05-08 14:41 ` [Bug libstdc++/109772] " redi at gcc dot gnu.org
2023-05-08 15:18 ` redi at gcc dot gnu.org
2023-05-08 15:59 ` redi at gcc dot gnu.org
2023-05-08 16:32 ` redi at gcc dot gnu.org
2023-05-10 22:47 ` redi at gcc dot gnu.org [this message]
2023-05-11 20:19 ` [Bug libstdc++/109772] [13/14 Regression] " cvs-commit at gcc dot gnu.org
2023-07-27  9:26 ` [Bug libstdc++/109772] [13 " rguenth at gcc dot gnu.org
2024-05-13 11:34 ` rguenth at gcc dot gnu.org
2024-05-21  9:15 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109772-4-hcOSSKz4fB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).