Boost C++ Libraries: Ticket #5627: Compilation error when including range/algorithm.hpp before range/join.hpp https://svn.boost.org/trac10/ticket/5627 <p> The following code fails to compile (tested with gcc 4.5.2): </p> <pre class="wiki">#include &lt;boost/range/algorithm/search_n.hpp&gt; #include &lt;boost/range/join.hpp&gt; int main() {} </pre><p> with the error: </p> <pre class="wiki">/usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected template-name before ‘&lt;’ token /usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected ‘{’ before ‘&lt;’ token /usr/local/mkt-dev/src/boost/boost/range/join.hpp:44: error: expected unqualified-id before ‘&lt;’ token </pre><p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5627 Trac 1.4.3 Nicolas Savoire <nicos@…> Thu, 07 Jul 2011 12:00:59 GMT version changed https://svn.boost.org/trac10/ticket/5627#comment:1 https://svn.boost.org/trac10/ticket/5627#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost Release Branch</span> → <span class="trac-field-new">Boost 1.47.0</span> </li> </ul> <p> Any chance for this issue to be fixed for boost 1.47.0 ? </p> Ticket Dmitriy <boost@…> Sat, 06 Aug 2011 19:30:43 GMT <link>https://svn.boost.org/trac10/ticket/5627#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5627#comment:2</guid> <description> <p> Is there a workaround by any chance? (Until it's actually fixed in a release.) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 30 Dec 2011 08:29:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5627#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5627#comment:3</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/6103" title="#6103: Bugs: boost::range_detail vs. boost::range::range_detail compiler error (closed: fixed)">#6103</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sun, 18 Mar 2012 22:30:02 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/5627#comment:4 https://svn.boost.org/trac10/ticket/5627#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket anonymous Mon, 02 Jul 2012 18:06:47 GMT <link>https://svn.boost.org/trac10/ticket/5627#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5627#comment:5</guid> <description> <p> Any work around? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 23 Aug 2012 08:54:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5627#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5627#comment:6</guid> <description> <p> With the fix being trivial I'm a little suprised that is problem still exists in boost 1.51. </p> <p> The workaround is to include boost/range/join.hpp before any includes of boost/range/algorigthm..., but that is quite cumbersome. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 18 Dec 2012 09:27:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5627#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5627#comment:7</guid> <description> <p> Duplicate of <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> (which was just fixed). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 18 Dec 2012 09:27:37 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5627#comment:8 https://svn.boost.org/trac10/ticket/5627#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket