[test] new features use c++11 features

Hi Gennadiy, the new features introduced in revision 81010 and81011 use c++ features unconditionally. This breaks compilation of Boost.Test on all older compilers. Even the recent gcc-4.6 (Ubuntu 12.04). The critical places are: std::tuple std::shared_ptr std::false_type std::remove_cv those can be replaced with std::tr1:: equivalents using boost/tr1. See a quick patch attached. The usage of std::enable_if is critical, as I could not find it in boost::tr1. But this should be available as boost::enable_if and be detected by the appropriate Boost.Config macro. And at least gcc-4.6.3 ist missing the angle bracket hack, so closing ">>" template argument lists are interpreted as operator >>. Also patched. Could you please try your changes with an older compiler first? As I can not use c++11 at the moment (I'm stuck with gcc-4.2) I would like to use the new features with this older compiler. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Hi Gennadiy, On Thursday, 18. October 2012 16:03:26 Jürgen Hunold wrote:
Hi Gennadiy,
Please forget most of the last mail.
Could you please try your changes with an older compiler first?
As I can not use c++11 at the moment (I'm stuck with gcc-4.2) I would like to use the new features with this older compiler.
New features should use the new standard. Sorry for the noise. The only patch really needed is guarding the implicit use of <type_traits> in named_params.hpp. The Boost test using Boost.Test start running again. Patch attached, Ok to commit? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Jürgen Hunold <jhunold <at> gmx.eu> writes:
Hi Gennadiy,
On Thursday, 18. October 2012 16:03:26 Jürgen Hunold wrote:
Hi Gennadiy,
Please forget most of the last mail.
Could you please try your changes with an older compiler first?
As I can not use c++11 at the moment (I'm stuck with gcc-4.2) I would like to use the new features with this older compiler.
New features should use the new standard. Sorry for the noise.
New "data test case" functionality will require whole bunch on C++11.
The only patch really needed is guarding the implicit use of <type_traits> in named_params.hpp. The Boost test using Boost.Test start running again.
Patch attached, Ok to commit?
maybe use boost type_traits instead on old compiler? Anyway - feel free to commit. Gennadiy

Hi Gennadiy, On Thursday, 18. October 2012 19:01:40 Gennadiy Rozental wrote:
Jürgen Hunold <jhunold <at> gmx.eu> writes:
New features should use the new standard. Sorry for the noise.
New "data test case" functionality will require whole bunch on C++11.
Yes, I realised that after sending the first mail. I'll definitely take a look at the new features. I know QtTest already has this kind of functionality. But having it in Boost.Test is better.
The only patch really needed is guarding the implicit use of <type_traits> in named_params.hpp. The Boost test using Boost.Test start running again.
Patch attached, Ok to commit?
maybe use boost type_traits instead on old compiler?
This can be changed later if you need it in old parts of the codebase. I know where to look now in case anything breaks again.
Anyway - feel free to commit.
Thanks commited as revision 81015. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Jürgen Hunold <jhunold <at> gmx.eu> writes:
New "data test case" functionality will require whole bunch on C++11.
Yes, I realised that after sending the first mail. I'll definitely take a look at the new features. I know QtTest already has this kind of functionality. But having it in Boost.Test is better.
Well, maybe it has similar idea, but IMO our interfaces are going to be much more convenient and powerful. Look for another port later about this. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Jürgen Hunold