aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-05-12 13:55:17 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-05-12 17:46:28 +0100
commit6d664515720bb277d49eb1457477a9d88f4ba5ed (patch)
tree41e1d14ac9a2ab7a5bc784c6020839f0d615fffa /libstdc++-v3/src
parent1953c0cfb006a696723baa7d5ea14038f6d901a4 (diff)
downloadgcc-6d664515720bb277d49eb1457477a9d88f4ba5ed.zip
gcc-6d664515720bb277d49eb1457477a9d88f4ba5ed.tar.gz
gcc-6d664515720bb277d49eb1457477a9d88f4ba5ed.tar.bz2
libstdc++: Remove <random> dependency on _GLIBCXX_USE_C99_STDINT_TR1
Since r9-2028-g8ba7f29e3dd064 we've defined most of <cstdint> unconditionally, including uint_least32_t. This means that all of <random> can be defined unconditionally, which means that std::shuffle and std::ranges::shuffle can be too. libstdc++-v3/ChangeLog: * include/bits/algorithmfwd.h (shuffle): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1. * include/bits/ranges_algo.h (shuffle): Likewise. * include/bits/stl_algo.h (shuffle): Likewise. * include/ext/random: Likewise. * include/ext/throw_allocator.h (random_condition): Likewise. * include/std/random: Likewise. * src/c++11/cow-string-inst.cc: Likewise. * src/c++11/random.cc: Likewise.
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/c++11/cow-string-inst.cc2
-rw-r--r--libstdc++-v3/src/c++11/random.cc3
2 files changed, 0 insertions, 5 deletions
diff --git a/libstdc++-v3/src/c++11/cow-string-inst.cc b/libstdc++-v3/src/c++11/cow-string-inst.cc
index c6b3a2c..5a2b8ff 100644
--- a/libstdc++-v3/src/c++11/cow-string-inst.cc
+++ b/libstdc++-v3/src/c++11/cow-string-inst.cc
@@ -33,7 +33,6 @@
# error This file should not be compiled for this configuration.
#endif
-#ifdef _GLIBCXX_USE_C99_STDINT_TR1
#include <random>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -46,4 +45,3 @@ namespace std _GLIBCXX_VISIBILITY(default)
random_device::_M_init_pretr1(const std::string& token)
{ _M_init(token.c_str(), token.length()); }
} // namespace
-#endif
diff --git a/libstdc++-v3/src/c++11/random.cc b/libstdc++-v3/src/c++11/random.cc
index daf9348..6ecdc71 100644
--- a/libstdc++-v3/src/c++11/random.cc
+++ b/libstdc++-v3/src/c++11/random.cc
@@ -28,8 +28,6 @@
#include <random>
#include <system_error>
-#ifdef _GLIBCXX_USE_C99_STDINT_TR1
-
#if defined __i386__ || defined __x86_64__
# include <cpuid.h>
# ifdef _GLIBCXX_X86_RDRAND
@@ -674,4 +672,3 @@ namespace std _GLIBCXX_VISIBILITY(default)
template struct __detail::_Mod<unsigned, 2147483647UL, 16807UL, 0UL>;
#endif
}
-#endif // _GLIBCXX_USE_C99_STDINT_TR1