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 via email to