This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/37986] std::tr1::variate_generator does not conform to TR1.


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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Manuel Holtgrewe from comment #0)
>   std::tr1::variate_generator<
>     std::tr1::mt19937&,
>     std::tr1::uniform_real<double>
>     > g(mt, dist);

This case is only fixed for -std=gnu++98 mode. With -std=c++98 there is no
reference collapsing and the std::tr1::__detail::_Adaptor class template tries
to form a reference to a reference.

From a look at the code, it appears that our variate_generator is not
conforming, because its engine_value_type is the adaptor class, not the Engine
argument.

I don't intend to fix this, I'm just noting it here for posterity.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]