Opened 11 years ago
Closed 9 years ago
#6729 closed Bugs (invalid)
boost/type_traits.hpp 1.49.0 does not compile with gcc 4.5.2
Reported by: | Owned by: | bronf | |
---|---|---|---|
Milestone: | To Be Determined | Component: | type_traits |
Version: | Boost 1.49.0 | Severity: | Regression |
Keywords: | Cc: |
Description
Programs including boost::multi_array do not compile with gcc 4.5.2. This can be reproduced by simply trying to include boost/multi_array.hpp
. Minimal example:
#include <boost/multi_array.hpp> int main() { return 0; }
This produces a lot of compiler errors such as
In file included from /home/janitor/usr/include/boost/type_traits/has_bit_and.hpp:43:0, from /home/janitor/usr/include/boost/type_traits/has_operator.hpp:12, from /home/janitor/usr/include/boost/type_traits.hpp:35, from /home/janitor/usr/include/boost/multi_array.hpp:30, from /home/janitor/cascade/testing/binningClass/src/main.cpp:4: /home/janitor/usr/include/boost/type_traits/detail/has_binary_operator.hpp:221:29: error: expected constructor, destructor, or type conversion before ‘(’ token
gcc version is 4.5.2: gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
System information: x86_64 GNU/Linux (2.6.38-13-generic)
Using boost 1.42 the problem does not exist. Also the same code compiles with boost 1.49.0 and gcc 4.4.4
Change History (9)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Yes, you are right. The problem occurs when I include <boost/type_traits.hpp>. Sorry, that I missed this in the compiler messages. Can you reassign it to the correct component?
comment:3 by , 11 years ago
Component: | multi_array → type_traits |
---|---|
Owner: | changed from | to
Summary: | boost::multi_array 1.49.0 does not compile with gcc 4.5.2 → boost/type_traits.hpp 1.49.0 does not compile with gcc 4.5.2 |
follow-up: 6 comment:5 by , 10 years ago
The problem persists in boost 1_51_0, compiling with g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1... No fix yet? Since it's a several-line macro-call which obviously generates something deemed incorrect by g++, I have no reasonable way of debugging this myself... BTW. the error occurred trying to compile CGAL.
follow-up: 7 comment:6 by , 10 years ago
Changing to g++ and gcc version 4.4.6 didn't help in my case!
comment:7 by , 10 years ago
What did fix it in my case was completely deleting and re-installing the boost headers. Actually looking there, it must have been an old file which didn't define the macro needed... Strange stuff.
comment:9 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
What happens if instead of multi_array.hpp you #include <boost/type_traits.hpp>
? Based on the error message, it looks like the problem might be isolated there.