public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "christian.mazakas at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/108952] New: Regression in uses_allocator_construction_args for pair of rvalue references
Date: Mon, 27 Feb 2023 16:14:38 +0000	[thread overview]
Message-ID: <bug-108952-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 108952
           Summary: Regression in uses_allocator_construction_args for
                    pair of rvalue references
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christian.mazakas at gmail dot com
  Target Milestone: ---

Consider the following example as demonstrated on Compiler Explorer:
https://godbolt.org/z/jhxxK9hT3

The C++20 version of uses_allocator_construction_args seems to inappropriately
forward the pair's data members and when they happen to be rvalue references,
they decay to an lvalue reference which breaks constructibility tests.

This same code will pass for previous standards versions.

I'm not sure about the range of compilers affected by this but it seems to
follow wherever C++20 support is enabled.

             reply	other threads:[~2023-02-27 16:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 16:14 christian.mazakas at gmail dot com [this message]
2023-02-27 16:15 ` [Bug libstdc++/108952] " pinskia at gcc dot gnu.org
2023-02-27 17:03 ` redi at gcc dot gnu.org
2023-02-27 17:18 ` rs2740 at gmail dot com
2023-02-27 17:33 ` pdimov at gmail dot com
2023-02-27 17:34 ` redi at gcc dot gnu.org
2023-02-27 21:27 ` [Bug libstdc++/108952] [10/11/12/13 Regression] " redi at gcc dot gnu.org
2023-02-28  9:50 ` cvs-commit at gcc dot gnu.org
2023-02-28  9:53 ` [Bug libstdc++/108952] [10/11/12 " redi at gcc dot gnu.org
2023-02-28 10:40 ` rguenth at gcc dot gnu.org
2023-04-27 14:44 ` cvs-commit at gcc dot gnu.org
2023-04-27 14:52 ` [Bug libstdc++/108952] [10/11 " redi at gcc dot gnu.org
2023-04-27 22:01 ` cvs-commit at gcc dot gnu.org
2023-04-27 23:04 ` cvs-commit at gcc dot gnu.org
2023-04-27 23:05 ` redi 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-108952-4@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).