Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-01-22 04:30:06

Jared McIntyre wrote:
> I was hoping to get some of your thoughts on best practices for TR1
> usage in boost libraries (maybe there is already a recommendation
> that I haven't seen yet). I'd like for some of the libraries I'm
> working on in the sandbox to use the TR1 namespace wherever possible,
> since this seems more future proof
> than using the boost namespace. I understand how to use the TR1
> namespace in boost so that it uses the TR1 implementation of the
> compiler provider if it exists, or the version of boost if it
> doesn't. For libraries in boost, I don't see a really "clean" way to
> do this as it seems it would require the user to add an additional
> include path beyond just the standard boost
> path (just like you do if you use it outside) to use my library. Is
> anyone trying to code their boost library to the TR1 namespace? How
> are you
> doing it?

#include <boost/tr1/tuple.hpp>

std::tr1::tuple<double, double> foo(); // Uses the real std::tr1::tuple if
it exists, otherwise the boost version.

Is that what you wanted?


Boost list run by bdawes at, gregod at, cpdaniel at, john at