* Re: random_sample: where did it go?
2002-08-19 20:40 ` Igor Markov
@ 2002-08-19 21:05 ` Phil Edwards
2002-08-20 9:50 ` Jonathan Lennox
1 sibling, 0 replies; 5+ messages in thread
From: Phil Edwards @ 2002-08-19 21:05 UTC (permalink / raw)
To: Igor Markov; +Cc: Andrew Pinski, gcc
On Mon, Aug 19, 2002 at 11:40:11PM -0400, Igor Markov wrote:
> What do I do, in general, when I don't see
> my favorite function in
> http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.1/namespacemembers.html
Also look in namespaces.html.
> For example, random_shuffle() is there, but random_sample() is not.
>
> Another one: power()
> Ok, I can guess, it's in <ext/numeric> :)
> but this makes things harder to figure out
> and also requires lots of #if(GCC_VERSION)
>
> Is there some way to avoid obfuscating source code
> with detailed gcc version checks?
Don't depend on functions that aren't in the ISO Standard Library being
in namespace std. As we find them, we move them to __gnu_cxx.
Also, be aware that not every function is listed in the URLs above, only
because we haven't had the time to get to all of them. See todo.html for a
very small fraction of what's left to be done.
Phil
--
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
- Edsger Dijkstra, 1930-2002
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: random_sample: where did it go?
2002-08-19 20:40 ` Igor Markov
2002-08-19 21:05 ` Phil Edwards
@ 2002-08-20 9:50 ` Jonathan Lennox
1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Lennox @ 2002-08-20 9:50 UTC (permalink / raw)
To: Igor Markov; +Cc: Andrew Pinski, gcc
Igor Markov writes:
> Another one: power()
> Ok, I can guess, it's in <ext/numeric> :)
> but this makes things harder to figure out
> and also requires lots of #if(GCC_VERSION)
> Is there some way to avoid obfuscating source code
> with detailed gcc version checks?
You can use autoconf to search for the symbols, rather than checking for gcc
versions directly, if you're using autoconf 2.5x. (Autoconf's checking for
type definitions in 2.1x is poor enough that you want to use the later
version.)
Checking for template types is somewhat tricky, because the comma in the
type name interferes with the syntax of m4, so you have to over-quote. (I
think this is an autoconf bug, which I've reported.) I've attached a
configure.ac file which works for me for detecting libstdc++'s hash_map
template class; tested with gcc 2.95.2, 3.0.2, and 3.1.
^ permalink raw reply [flat|nested] 5+ messages in thread