Dear list,
I have a technical question I do not know how to address, and I would
like to know how people deal with this.
To put things in the background: boost.test uses heavily boost::function
and boost::bind, however I would like to use in some circumstances
std::function and std::bind, which are, for instance, variadic.
Boost.test is compiled with b2. I believe if the user does not pass
additional parameters to the build, the default is to use whatever is
provided in the Jamfile, that compiles the static and shared libraries
in C++03 mode.
If the user of boost.test compiles in C++03, it is ok if the library is
used in a C++11 project. The other way is obviously not true.
Now, in the headers of boost.test, I can detect for the compiler
version, and depending on the language settings, activate an API that is
C++11.
OTOH, if I do not want users to be confused, this API should be header
only. But this hardly work in practice, as the C++03 and C++11 APIs are
usually not separable.
Say:
struct test_case {
// compiled member function
test_case(boost::function