]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix -Wreorder warning in std::philox_engine
authorJonathan Wakely <jwakely@redhat.com>
Wed, 1 Oct 2025 12:48:18 +0000 (13:48 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 7 Oct 2025 11:11:21 +0000 (12:11 +0100)
libstdc++-v3/ChangeLog:

* include/bits/random.h (philox_engine(result_type)): Reorder
ctor-initializer-list to match declaration order.

libstdc++-v3/include/bits/random.h

index 4049a77fbf4c52737ff78af48a692a5a6b09260f..ebc863e84534463b5c3779e43d0c14924b8408c5 100644 (file)
@@ -1778,7 +1778,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        explicit
        philox_engine(result_type __value)
-       : _M_x{}, _M_y{}, _M_k{}, _M_i(__n - 1)
+       : _M_x{}, _M_k{}, _M_y{}, _M_i(__n - 1)
        { _M_k[0] = __value & max(); }
 
        /** @brief seed sequence constructor for %philox_engine