[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos)] Guard definition of ranges::shuffle with _GLIBCXX_USE_C99_STDINT_TR1

Patrick Palka ppalka@gcc.gnu.org
Wed Jan 29 18:02:00 GMT 2020


https://gcc.gnu.org/g:1d6877512fb6ca8cbe133805c5cab529eb30ad5c

commit 1d6877512fb6ca8cbe133805c5cab529eb30ad5c
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Jan 29 13:01:29 2020 -0500

    Guard definition of ranges::shuffle with _GLIBCXX_USE_C99_STDINT_TR1
    
    This mirrors what's done with std::shuffle, which we defer to.

Diff:
---
 libstdc++-v3/include/bits/ranges_algo.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h
index 9fb581a..342bcfb 100644
--- a/libstdc++-v3/include/bits/ranges_algo.h
+++ b/libstdc++-v3/include/bits/ranges_algo.h
@@ -2027,6 +2027,7 @@ namespace ranges
 				 std::move(__result));
     }
 
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
   template<random_access_iterator _Iter, sentinel_for<_Iter> _Sent,
 	   typename _Gen>
     requires permutable<_Iter>
@@ -2049,6 +2050,7 @@ namespace ranges
       return ranges::shuffle(ranges::begin(__r), ranges::end(__r),
 			     std::forward<_Gen>(__g));
     }
+#endif
 
   template<random_access_iterator _Iter, sentinel_for<_Iter> _Sent,
 	   typename _Comp = ranges::less, typename _Proj = identity>



More information about the Libstdc++-cvs mailing list