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

            Bug ID: 105505
           Summary: P1951R1 (Default Arguments for pair's Forwarding
                    Constructor) is unimplemented
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ensadc at mailnesia dot com
                CC: redi at gcc dot gnu.org
  Target Milestone: ---

https://en.cppreference.com/w/cpp/compiler_support claims that P1951R1 (Default
Arguments for pair's Forwarding Constructor) is supported in GCC libstdc++ 12,
but it seems that libstdc++ 12 doesn't actually add default template arguments
for said forwarding constructor.

For example, the following still does not work with libstdc++ (but works with
latest libc++ and MSVC STL: https://godbolt.org/z/6oY3G77oT).

```
#include <utility>

struct MoveOnly {
    MoveOnly();
    MoveOnly(MoveOnly&&);
};

std::pair<int, MoveOnly> p{42, {}};
```

Reply via email to