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

            Bug ID: 116162
           Summary: GCC rejects explicitly default move ctor with const
                    X&& parameter
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

The following valid program is rejected by gcc, clang and msvc. Only EDG
accepts it correctly. https://godbolt.org/z/c9Wf8hh16
```
struct C
{
   C(const C&&) = default; // EDG: ok, gcc: No, Clang: No
};
int main()
{

}
```

Gcc says:
```
<source>:3:4: error: defaulted declaration 'C::C(const C&&)' does not match the
expected signature
    3 |    C(const C&&) = default;
      |    ^
<source>:3:4: note: expected signature: 'constexpr C::C(C&&)'
```

Reply via email to