]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Break header cycle between <new> and <exception>
authorJonathan Wakely <jwakely@redhat.com>
Wed, 2 Sep 2020 12:27:57 +0000 (13:27 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 2 Sep 2020 12:56:32 +0000 (13:56 +0100)
commit6bdbf0f37bda2587a4e82cbb956de7a159a397ae
tree513869983ddbdd3c4ac03fba5373904073259963
parentb567d3bd302933adb253aba9069fd8120c485441
libstdc++: Break header cycle between <new> and <exception>

The <new> and <exception> headers each include each other, which makes
building them as header-units "exciting". The <new> header only needs
the definition of std::exception (in order to derive from it) which is
already in its own header, so just include that.

libstdc++-v3/ChangeLog:

* include/bits/stl_iterator.h: Include <bits/exception_defines.h>
for definitions of __try, __catch and __throw_exception_again.
(counted_iterator::operator++(int)): Use __throw_exception_again
instead of throw.
* libsupc++/new: Include <bits/exception.h> not <exception>.
* libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
* testsuite/18_support/destroying_delete.cc: Include
<type_traits> for std::is_same_v definition.
* testsuite/20_util/variant/index_type.cc: Qualify size_t.
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/libsupc++/new
libstdc++-v3/libsupc++/new_opvnt.cc
libstdc++-v3/testsuite/18_support/destroying_delete.cc
libstdc++-v3/testsuite/20_util/variant/index_type.cc
This page took 0.064052 seconds and 5 git commands to generate.