diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-05-12 13:55:17 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-05-12 17:46:28 +0100 |
commit | 6d664515720bb277d49eb1457477a9d88f4ba5ed (patch) | |
tree | 41e1d14ac9a2ab7a5bc784c6020839f0d615fffa /libstdc++-v3/include/ext | |
parent | 1953c0cfb006a696723baa7d5ea14038f6d901a4 (diff) | |
download | gcc-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/include/ext')
-rw-r--r-- | libstdc++-v3/include/ext/random | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/throw_allocator.h | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random index 795c3c5..62acb67 100644 --- a/libstdc++-v3/include/ext/random +++ b/libstdc++-v3/include/ext/random @@ -45,7 +45,7 @@ # include <emmintrin.h> #endif -#if defined(_GLIBCXX_USE_C99_STDINT_TR1) && defined(UINT32_C) +#ifdef UINT32_C namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { @@ -3923,7 +3923,7 @@ _GLIBCXX_END_NAMESPACE_VERSION #include <ext/opt_random.h> #include <ext/random.tcc> -#endif // _GLIBCXX_USE_C99_STDINT_TR1 && UINT32_C +#endif // UINT32_C #endif // C++11 diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h index 0dbf001..71b7198 100644 --- a/libstdc++-v3/include/ext/throw_allocator.h +++ b/libstdc++-v3/include/ext/throw_allocator.h @@ -495,7 +495,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 /** * @brief Base class for random probability control and throw. */ @@ -613,7 +612,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _S_e; } }; -#endif // _GLIBCXX_USE_C99_STDINT_TR1 /** * @brief Class with exception generation control. Intended to be @@ -769,7 +767,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif }; -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 /// Type throwing via random condition. struct throw_value_random : public throw_value_base<random_condition> { @@ -800,7 +797,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator=(throw_value_random&&) = default; #endif }; -#endif // _GLIBCXX_USE_C99_STDINT_TR1 /** * @brief Allocator class with logging and exception generation control. @@ -947,7 +943,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif }; -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 /// Allocator throwing via random condition. template<typename _Tp> struct throw_allocator_random @@ -973,7 +968,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator=(const throw_allocator_random&) = default; #endif }; -#endif // _GLIBCXX_USE_C99_STDINT_TR1 _GLIBCXX_END_NAMESPACE_VERSION } // namespace @@ -1002,7 +996,6 @@ namespace std _GLIBCXX_VISIBILITY(default) } }; -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 /// Explicit specialization of std::hash for __gnu_cxx::throw_value_random. template<> struct hash<__gnu_cxx::throw_value_random> @@ -1017,7 +1010,6 @@ namespace std _GLIBCXX_VISIBILITY(default) return __result; } }; -#endif #pragma GCC diagnostic pop } // end namespace std |