Opened 11 years ago
Closed 10 years ago
#5627 closed Bugs (duplicate)
Compilation error when including range/algorithm.hpp before range/join.hpp
| Reported by: | Owned by: | Neil Groves | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | range |
| Version: | Boost 1.47.0 | Severity: | Regression |
| Keywords: | Cc: |
Description
The following code fails to compile (tested with gcc 4.5.2):
#include <boost/range/algorithm/search_n.hpp>
#include <boost/range/join.hpp>
int main() {}
with the error:
/usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected template-name before ‘<’ token
/usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected ‘{’ before ‘<’ token
/usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected unqualified-id before ‘<’ token
It seems that the issue is that there is a boost::range::range_detail namespace in search_n.hpp and a boost::range_detail namespace in other files included, which confuses the compiler.
Change History (8)
comment:1 by , 11 years ago
| Version: | Boost Release Branch → Boost 1.47.0 |
|---|
comment:2 by , 11 years ago
Is there a workaround by any chance? (Until it's actually fixed in a release.)
comment:4 by , 11 years ago
| Status: | new → assigned |
|---|
comment:6 by , 10 years ago
With the fix being trivial I'm a little suprised that is problem still exists in boost 1.51.
The workaround is to include boost/range/join.hpp before any includes of boost/range/algorigthm..., but that is quite cumbersome.
comment:8 by , 10 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Any chance for this issue to be fixed for boost 1.47.0 ?