https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87809
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed for GCC 8.3 and 9.x --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Tue Oct 30 15:15:56 2018 New Revision: 265629 URL: https://gcc.gnu.org/viewcvs?rev=265629&root=gcc&view=rev Log: PR libstdc++/87809 avoid invalid expressions in exception specifications If the allocator isn't default constructible then checking if the default constructor throws in an exception specification makes the declaration invalid. Use the type trait instead. Backport from mainline 2018-10-30 Jonathan Wakely <jwak...@redhat.com> PR libstdc++/87809 * include/bits/forward_list.h (_Fwd_list_impl::_Fwd_list_impl()): Use trait in exception-specification instead of possibly invalid expression. * include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()): Likewise. * include/bits/stl_list.h (_List_impl::_List_impl()): Likewise. * testsuite/23_containers/forward_list/cons/87809.cc: New test. * testsuite/23_containers/list/cons/87809.cc: New test. * testsuite/23_containers/vector/bool/cons/87809.cc: New test. * testsuite/23_containers/vector/cons/87809.cc: New test. Added: branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/forward_list/cons/87809.cc branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/list/cons/87809.cc branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/vector/bool/cons/87809.cc branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/vector/cons/87809.cc Modified: branches/gcc-8-branch/libstdc++-v3/ChangeLog branches/gcc-8-branch/libstdc++-v3/include/bits/forward_list.h branches/gcc-8-branch/libstdc++-v3/include/bits/stl_bvector.h branches/gcc-8-branch/libstdc++-v3/include/bits/stl_list.h