[Bug libstdc++/89130] [9 Regression] std::vector relocation fails for types with deleted move constructor
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 5 15:25:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89130
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
With the removal of if constexpr we would unconditionally instantiate
__relocate_a, which could fail ... but only in cases like a deleted move
constructor. This avoids that instantiation, so it doesn't fail for weird
types, and doesn't spend time instantiating a function template that isn't
needed. Not strictly necessary, but like you say, it avoids gratuitously
rejecting some types that are weird, but can still be used in limited ways.
OK, let's leave it like this.
More information about the Gcc-bugs
mailing list