Avoid unnecessary inclusion of <stdexcept> header
This can greatly reduce the amount of preprocessed code that is included by other headers, because <stdexcept> depends on <string> which is huge. * include/std/array: Do not include <stdexcept>. * include/std/optional: Include <exception> and <bits/exception_defines.h> instead of <stdexcept>. * testsuite/20_util/function_objects/searchers.cc: Include <cctype> for std::isalnum. * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for std::allocator. * testsuite/23_containers/map/erasure.cc: Include <string>. * testsuite/23_containers/unordered_map/erasure.cc: Likewise. From-SVN: r272011
This commit is contained in:
parent
ad60f42883
commit
beb0086f59
7 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,15 @@
|
|||
2019-06-06 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/std/array: Do not include <stdexcept>.
|
||||
* include/std/optional: Include <exception> and
|
||||
<bits/exception_defines.h> instead of <stdexcept>.
|
||||
* testsuite/20_util/function_objects/searchers.cc: Include <cctype>
|
||||
for std::isalnum.
|
||||
* testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
|
||||
std::allocator.
|
||||
* testsuite/23_containers/map/erasure.cc: Include <string>.
|
||||
* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
|
||||
|
||||
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
|
||||
dg-prune-output for different C++98 diagnostic.
|
||||
* testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#else
|
||||
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <bits/functexcept.h>
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <bits/range_access.h>
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
#include <exception>
|
||||
#include <new>
|
||||
#include <initializer_list>
|
||||
#include <bits/functexcept.h>
|
||||
#include <bits/exception_defines.h>
|
||||
#include <bits/functional_hash.h>
|
||||
#include <bits/enable_special_members.h>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <functional>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||
# include <cwchar>
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
|
||||
template<typename T, typename U> struct require_same;
|
||||
template<typename T> struct require_same<T, T> { using type = void; };
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#ifndef __cpp_lib_erase_if
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
#ifndef __cpp_lib_erase_if
|
||||
|
|
Loading…
Add table
Reference in a new issue