https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88840
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Jan 24 15:39:25 2019 New Revision: 268239 URL: https://gcc.gnu.org/viewcvs?rev=268239&root=gcc&view=rev Log: PR libstdc++/88840 delay evaluation of constant until type is complete Clang fails to compile std::vector<Incomplete> because the static member __use_relocate cannot be evaluated for an incomplete type. Replace with a static member function that will not be odr-used until needed, by which point the type must be complete. PR libstdc++/88840 * include/bits/stl_vector.h (vector::__use_relocate): Replace static data member with static member function _S_use_relocate(). * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert) (vector::_M_default_append): Use _S_use_relocate() instead of __use_relocate. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/stl_vector.h trunk/libstdc++-v3/include/bits/vector.tcc