This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: profile mode broken with -std=gnu++0x
On 05/05/2010 11:30 AM, Paolo Carlini wrote:
> it's because stl_algo.h now includes <random> as an implementation
> detail - only for uniform_int_distribution - which uses <vector>, which
> in profile mode ends up including <algorithm>, thus stl_algo.h. I can
> imagine more sophisticated ways of fixing this but for now, for 4.5.1, I
> think I will just change stl_algo.h to include <tr1/random> instead.
>
Silvius, I did that, and it worked, of course, but in general we try to
avoid including tr1 stuff as implementation details of std things,
because that injects unuglified names, etc.
Can you instead avoid including in profile mode the whole <algorithm>?
If you can do with only <bits/stl_algobase.h> I think the problem would
be also solved: I see only an handful of <algorithm> -proper functions
used, among which std::sort, which, if I understand correctly an XXX
comment in __report, you want to replace, and other trivial ones, which
you can open-code adding a minimal amount of code, like std::for_each or
std::remove. That would be a *much* more satisfactory fix.
Thanks,
Paolo.