From 9af65c2b9047168f14e623d55f87beda33ba1503 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 6 Oct 2020 00:05:11 +0100 Subject: libstdc++: Reduce uses of std::numeric_limits This avoids unnecessary instantiations of std::numeric_limits or inclusion of when a more lightweight alternative would work. Some uses can be replaced with __gnu_cxx::__int_traits and some can just use size_t(-1) directly where SIZE_MAX is needed. libstdc++-v3/ChangeLog: * include/bits/regex.h: Use __int_traits instead of std::numeric_limits. * include/bits/uniform_int_dist.h: Use __int_traits::__max instead of std::numeric_limits::max(). * include/bits/hashtable_policy.h: Use size_t(-1) instead of std::numeric_limits::max(). * include/std/regex: Include . * include/std/string_view: Use typedef for __int_traits. * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of std::numeric_limits::max(). * testsuite/std/ranges/iota/96042.cc: Include . * testsuite/std/ranges/iota/difference_type.cc: Likewise. * testsuite/std/ranges/subrange/96042.cc: Likewise. --- libstdc++-v3/include/std/regex | 1 + 1 file changed, 1 insertion(+) (limited to 'libstdc++-v3/include/std/regex') diff --git a/libstdc++-v3/include/std/regex b/libstdc++-v3/include/std/regex index b4b8ea7..43ee1ae 100644 --- a/libstdc++-v3/include/std/regex +++ b/libstdc++-v3/include/std/regex @@ -53,6 +53,7 @@ #include #include +#include #include #include #include -- cgit v1.1