https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121128
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Tomasz KamiĆski from comment #2) > > Note that _M_objp's type i.e. _ATraits::pointer may not be a raw pointer > > type, so the value category should be propagated. > > Allocator requirements imply that _ATraits::pointer, needs to produce > equivalent-behavior for derefererencing (const and non-const): > https://eel.is/c++draft/allocator.requirements#general-22. Right, it would be madness for *ptr to behave differently from *std::move(ptr) or *std::as_const(ptr) for a pointer type, and it's not reasonable to expect the standard library to support such silliness.