[Boost-bugs] [Boost C++ Libraries] #6103: boost::range_detail vs. boost::range::range_detail compiler error

Subject: [Boost-bugs] [Boost C++ Libraries] #6103: boost::range_detail vs. boost::range::range_detail compiler error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-08 01:14:29


#6103: boost::range_detail vs. boost::range::range_detail compiler error
------------------------------------+---------------------------------------
 Reporter: zeratul976@… | Owner: neilgroves
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
------------------------------------+---------------------------------------
 The following code:


 {{{
 #include <boost/range/algorithm/search_n.hpp>
 #include <boost/range/join.hpp>
 }}}

 Produces the following compiler errors:

 {{{
 boost/range/join.hpp:44:39: error: expected template-name before '<' token
 boost/range/join.hpp:44:39: error: expected '{' before '<' token
 boost/range/join.hpp:44:39: error: expected unqualified-id before '<'
 token
 }}}

 The reason is that:
   * boost/range/algorithm/search_n.hpp introduces the namespace
 boost::range::range_detail
   * boost/range/join.hpp defines joined_type in boost::range_detail
   * boost/range/join.hpp then references range_detail::joined_type in
 boost::range, expecting it to resolve to boost::range_detail::joined_type,
 but due to the declaration in search_n.hpp, it resolves to
 boost::range::range_detail::joined_type (which does not exist)

 This is easily fixable by fully qualifying
 boost::range_detail::joined_type in join.hpp, or by getting rid of the
 namespace boost::range::range_detail in search_n.hpp and using
 boost::range_detail instead.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6103>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC