[test] Any dependency on Boost.Test requires C++11 ?

At present any test in Boost.Math that depends on Boost.Test fails for GCC prior to 4.5 because the build script for Boost.Test has: <toolset>gcc:<cxxflags>-std=gnu++0x Is this really required? It looks wrong headed to me: * We already have testers that test both C++03 and C++11 modes - so we don't need this to test C++11 support. * It's presence makes testing gcc in C++03 mode impossible if the library uses Boost.Test - so there may be C++03 breakages that we don't know about because of this. * As mentioned above, this is a hard error for GCC prior to 4.5, so those compilers can't be tested either. Can this be safely removed? Many thanks, John.

Le 15/03/13 11:54, John Maddock a écrit :
At present any test in Boost.Math that depends on Boost.Test fails for GCC prior to 4.5 because the build script for Boost.Test has:
<toolset>gcc:<cxxflags>-std=gnu++0x
Is this really required?
It looks wrong headed to me:
* We already have testers that test both C++03 and C++11 modes - so we don't need this to test C++11 support. * It's presence makes testing gcc in C++03 mode impossible if the library uses Boost.Test - so there may be C++03 breakages that we don't know about because of this. * As mentioned above, this is a hard error for GCC prior to 4.5, so those compilers can't be tested either.
Can this be safely removed?
I have experimenting regression that disappear when this line is commented. This line must be removed. Could I commit it? Best, Vicente

-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Vicente J. Botet Escriba Sent: Saturday, March 16, 2013 2:18 PM To: boost@lists.boost.org Subject: Re: [boost] [test] Any dependency on Boost.Test requires C++11 ?
Le 15/03/13 11:54, John Maddock a écrit :
At present any test in Boost.Math that depends on Boost.Test fails for GCC prior to 4.5 because the build script for Boost.Test has:
<toolset>gcc:<cxxflags>-std=gnu++0x
Is this really required?
It looks wrong headed to me:
* We already have testers that test both C++03 and C++11 modes - so we don't need this to test C++11 support. * It's presence makes testing gcc in C++03 mode impossible if the library uses Boost.Test - so there may be C++03 breakages that we don't know about because of this. * As mentioned above, this is a hard error for GCC prior to 4.5, so those compilers can't be tested either.
Can this be safely removed?
I have experimenting regression that disappear when this line is commented. This line must be removed. Could I commit it?
I'd welcome it if some of the many failures in Boost.Math regression list on a few gcc platforms can be avoided. Paul PS Perhaps adding a new section of 'Work in progress' on https://svn.boost.org/trac/boost/wiki/Guidelines would be the best place for GCC C++ language specification in relation to Boost? I have taken the liberty of adding Chris's 'knowledge' to https://svn.boost.org/trac/boost/wiki/Guidelines/GCCBoost This is a wiki so others can add in their two-pennyworth... --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

At present any test in Boost.Math that depends on Boost.Test fails for GCC prior to 4.5 because the build script for Boost.Test has:
<toolset>gcc:<cxxflags>-std=gnu++0x
Is this really required?
It looks wrong headed to me:
* We already have testers that test both C++03 and C++11 modes - so we don't need this to test C++11 support. * It's presence makes testing gcc in C++03 mode impossible if the library uses Boost.Test - so there may be C++03 breakages that we don't know about because of this. * As mentioned above, this is a hard error for GCC prior to 4.5, so those compilers can't be tested either.
Can this be safely removed?
I have experimenting regression that disappear when this line is commented. This line must be removed. Could I commit it?
Confirmed. As Gennadiy hasn't responded I've gone ahead and committed the change. John.

At present any test in Boost.Math that depends on Boost.Test fails for GCC prior to 4.5 because the build script for Boost.Test has:
<toolset>gcc:<cxxflags>-std=gnu++0x
Is this really required? It looks wrong headed to me:
<snip>
Can this be safely removed? Many thanks, John.
These command line switches are a nightmare, but quite useful. I took the time to summarize my own personal guidelines pertaining to GCC C++ language specification in relation to Boost. If anyone would like to extend and/or correct these guidelines for Boost and publish them on the net, it may decrease mixups in this confusing matter. Please don't flame me if I got the guidelines wrong. Rather correct them instead. Sincerely, Chris -------------------------------------------------------------------------- Guidelines on: Selecting the C++ language specification with GCC GCC supports finely granulated selection of the underlying C++ language specification With command line options. The command line option -std=c++98 selects language conformance with ISO/IEC 14882:1998, also known as C++98. The command line option -std=c++03 selects language conformance with ISO/IEC 14882:2003, also known as C++03. The command line option -std=c++11 selects language conformance with ISO/IEC 14882:2011, also known as C++11. In general, Boost libraries should be compatible with C++03 and use -std=c++03 accordingly. Important: Please avoid using -std=c++11, -std=gnu++11, and -std=gnu++0x. These command line arguments activate GCC's experimental support for C++11. There is not yet a consensus on using C++11 in Boost libraries off-the-rack. GCC also has the similar language options -std=gnu++98, -std=gnu++03, -std=gnu++11, and -std=gnu++0x. These command line options activate certain GNU-specific language extensions. Please avoid using them because their use can lead to non-portability issues. The GCC command line option -std=c++0x was an interim solution used for preliminary support support for C++11 features before these were published by ISO. As of GCC 4.7, the command line option -std=c++0x has been replaced with -std=c++11. If possible, preferentially use -std=C++11 instead of -std=c++0x when testing for C++11 compatibility. This rational for this is that -std=c++0x can easily be confused with, for example, -std=c++03. Do note, however, that Boost libraries should not yet rely on C++11 via the -std=c++11 switch for their build and/or usage. In general, then, please use -std=c++03.
participants (4)
-
Christopher Kormanyos
-
John Maddock
-
Paul A. Bristow
-
Vicente J. Botet Escriba