Scott Meyers wrote:
Which is consistent with the "explicitly specify what your compiler/library support" idea above. Unfortunately :-(
Right, but please remember that there is only one compiler that ships with *any* TR1 support at all - gcc - and that was still in the very early stages of development when Boost.TR1 was developed. Given time it'll get smarter and "learn" about more compilers/platforms as they release TR1 support - if they do.
gcc: nothing if you're happy with the Boost versions, BOOST_HAS_GCC_TR1 if you want to use the gcc-supplied versions. It's possible that BOOST_HAS_GCC_TR1 is somewhat out of date, I don't recall now which gcc version I tested with, but 4.2 probably has more TR1 support than it currently enables.
Which means that the macro doesn't mean "turn on whatever gcc TR1 support you have," it means "turn on the following TR1 components that I, the macro writer, believe are supported by gcc." Again, consistent with the above. And, again, unfortunately :-(
I'd hoped that Boost.TR1 would magically figure out what TR1 stuff was available from my compiler/library and use that by default, falling back on Boost functionality only when necessary. Apparently that is not the way it works :-(
Not yet :-( As I say, it'll learn. John.