https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85749

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-05-11
          Component|c++                         |libstdc++
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There's also a template constructor, which is the one that gets used:

      template<typename _Sseq, typename = typename
        std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value>
               ::type>
        explicit
        linear_congruential_engine(_Sseq& __q)
        { seed(__q); }

The conversion to unsigned now happens when calling seed(__q), which is in the
std::lib code and so gets suppressed because it's in a system header (and using
-Wsystem-headers produces a lot of warnings from the std::lib code).

That constructor is only supposed to be used for seed sequence types, but
nothign in the standard actually ensures that, and so it gets used for your
example too. That might be a defect in the standard.

I'm going to re-assign this to libstdc++, so we can make that constructor less
greedy.

Reply via email to