https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98473
--- Comment #4 from Jonathan Wakely ---
(In reply to Borislav Stanimirov from comment #2)
> (In reply to Jonathan Wakely from comment #1)
>
> > To meet the requirements of the standard we would need to insert them at the
> > end and then use std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98473
--- Comment #3 from Borislav Stanimirov ---
By the way, this is not just some esoteric synthetic example. A type which is
copy-constructible but not copy-assignable is very useful to model immutable
objects.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98473
--- Comment #2 from Borislav Stanimirov ---
(In reply to Jonathan Wakely from comment #1)
> To meet the requirements of the standard we would need to insert them at the
> end and then use std::rotate to reposition them.
Or, to save move assignm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98473
--- Comment #1 from Jonathan Wakely ---
Complete example:
#include
struct X {
X();
X(const X&);
X& operator=(const X&) = delete; // !!
X(X&&) noexcept;
X& operator=(X&&) noexcept;
int data = 54;
};
void add_to_front(st