Boost C++ Libraries: Ticket #6103: boost::range_detail vs. boost::range::range_detail compiler error https://svn.boost.org/trac10/ticket/6103 <p> The following code: </p> <pre class="wiki">#include &lt;boost/range/algorithm/search_n.hpp&gt; #include &lt;boost/range/join.hpp&gt; </pre><p> Produces the following compiler errors: </p> <pre class="wiki">boost/range/join.hpp:44:39: error: expected template-name before '&lt;' token boost/range/join.hpp:44:39: error: expected '{' before '&lt;' token boost/range/join.hpp:44:39: error: expected unqualified-id before '&lt;' token </pre><p> The reason is that: </p> <ul><li>boost/range/algorithm/search_n.hpp introduces the namespace boost::range::range_detail </li><li>boost/range/join.hpp defines joined_type in boost::range_detail </li><li>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) </li></ul><p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6103 Trac 1.4.3 anonymous Fri, 30 Dec 2011 08:28:51 GMT <link>https://svn.boost.org/trac10/ticket/6103#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6103#comment:1</guid> <description> <p> also see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6110" title="#6110: Patches: range::join namespaces issue (closed: duplicate)">#6110</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5627" title="#5627: Bugs: Compilation error when including range/algorithm.hpp before range/join.hpp (closed: duplicate)">#5627</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mr. Vagina</dc:creator> <pubDate>Wed, 25 Jul 2012 13:32:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6103#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6103#comment:2</guid> <description> <p> VAGINA </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 18 Dec 2012 09:22:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6103#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6103#comment:3</guid> <description> <p> Since search_n.hpp is the only header that uses the namespace boost::range::range_detail (everything else uses just boost::range_detail), I think the more principled solution is to change search_n.hpp to use boost::range_detail instead of boost::range::range_detail. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 18 Dec 2012 09:25:12 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6103#comment:4 https://svn.boost.org/trac10/ticket/6103#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82071" title="[range] corrected undesirable namespace nesting in ...">[82071]</a>) [range] corrected undesirable namespace nesting in algorithm/search_n.hpp; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6103" title="#6103: Bugs: boost::range_detail vs. boost::range::range_detail compiler error (closed: fixed)">#6103</a> </p> Ticket Nathan Ridge Fri, 21 Dec 2012 08:47:17 GMT <link>https://svn.boost.org/trac10/ticket/6103#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6103#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82139" title="[range] merged bug fixes (r81890, refs #5603; r82071, refs #6103) from ...">[82139]</a>) [range] merged bug fixes (<a class="changeset" href="https://svn.boost.org/trac10/changeset/81890" title="[range] added missing includes to any_range.hpp and related files; ...">r81890</a>, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5603" title="#5603: Bugs: the &#34;range/any_range.hpp&#34; header is not self-sufficient (closed: fixed)">#5603</a>; <a class="changeset" href="https://svn.boost.org/trac10/changeset/82071" title="[range] corrected undesirable namespace nesting in ...">r82071</a>, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6103" title="#6103: Bugs: boost::range_detail vs. boost::range::range_detail compiler error (closed: fixed)">#6103</a>) from trunk </p> </description> <category>Ticket</category> </item> </channel> </rss>