boost thread.hpp does not compile with -std=c++0x (Natty's gcc is not a supported compiler of Natty's boost)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
boost1.42 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This is a regression from libboost1.40-dev in Lucid (gcc version 4.4.3), where this test works.
The version of gcc that ships with Natty is not a supported compiler of the boost that ships with Natty (see http://
boost started supporting gcc 4.5 series in v1.44, And the gcc 4.5.2 of natty is a "primary" test compiler since v1.46.
A newer boost package should be made available. 1.42 is from Feb,2010 -- 15 months old (see bug #754231).
Steps to reproduce:
$ cat test.cpp
#include <boost/thread.hpp>
$ g++ -std=c++0x -c test.cpp
In file included from /usr/include/
/usr/include/
/usr/include/
In file included from /usr/include/
/usr/include/
/usr/include/
/usr/include/
/usr/include/
In file included from /usr/include/
/usr/include/
/usr/include/
/usr/include/
/usr/include/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: libboost1.42-dev 1.42.0-4ubuntu2 [modified: usr/include/
ProcVersionSign
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Wed May 4 12:39:03 2011
ProcEnviron:
LANGUAGE=en_AU:
LANG=en_AU.UTF-8
SHELL=/bin/bash
SourcePackage: boost1.42
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in boost1.42 (Ubuntu): | |
status: | New → Confirmed |
oh, regarding: boost/config/ compiler/ gcc.hpp]
Package: libboost1.42-dev 1.42.0-4ubuntu2 [modified: usr/include/
*After* generating the compile error, I commented out `# define BOOST_HAS_ RVALUE_ REFS` in
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined( __GXX_EXPERIMEN TAL_CXX0X_ _) TAL_CXX0X_ _. RVALUE_ REFS STATIC_ ASSERT VARIADIC_ TMPL
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
// passed on the command line, which in turn defines
// __GXX_EXPERIMEN
# define BOOST_HAS_DECLTYPE
//# define BOOST_HAS_
# define BOOST_HAS_
# define BOOST_HAS_
#else
With this change, test.cpp compiles.
Sadly, there's no compile flag I can pass in along with `-std=c++0x` to achieve a similar effect (i.e. without editing gcc.hpp).