[libcxx-commits] [libcxx] [libc++][C++03] Remove code that is not used in C++03 (PR #134045)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 13 13:36:14 PST 2026


================
@@ -111,14 +110,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
 
 template <class _RandomAccessIterator, class _RandomNumberGenerator>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
-random_shuffle(_RandomAccessIterator __first,
-               _RandomAccessIterator __last,
-#  ifndef _LIBCPP_CXX03_LANG
-               _RandomNumberGenerator&& __rand)
-#  else
-               _RandomNumberGenerator& __rand)
-#  endif
-{
+random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator&& __rand) {
----------------
ldionne wrote:

@philnik777 I think this was wrong, in the sense that it changed the behavior for the frozen headers in C++03 mode. Do you remember if that was intentional? I wonder how this can have happened if you did these changes mechanically? Fixing this is the topic of https://github.com/llvm/llvm-project/pull/155915.

https://github.com/llvm/llvm-project/pull/134045


More information about the libcxx-commits mailing list