This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37986] std::tr1::variate_generator does not conform to TR1.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2016 17:02:08 +0000
- Subject: [Bug libstdc++/37986] std::tr1::variate_generator does not conform to TR1.
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-37986-4@http.gcc.gnu.org/bugzilla/>
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.