]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/ChangeLog
PR libstdc++/88840 delay evaluation of constant until type is complete
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jan 2019 15:39:25 +0000 (15:39 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jan 2019 15:39:25 +0000 (15:39 +0000)
commit4bc4fd900c1f28a2986bfa3514f55ae524f8bc33
treeeddfdc9e4eb573f87f18f3b2ca3d2c5ed4443a5f
parentf107411501a641006420c19ad6d6381cde12c2de
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268239 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/vector.tcc