Boost C++ Libraries: Ticket #4136: Boost.Range : put "using namespace boost::adaptors" creates conflict. https://svn.boost.org/trac10/ticket/4136 <p> Hi,<br /> </p> <p> With the current version on the trunk, I get compilation errors with the following program (MSCV10 RC1). </p> <pre class="wiki">#include &lt;boost/range/adaptors.hpp&gt; using namespace boost::adaptors; int main() { } </pre><p> Message error : "1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C2039: 'type' : is not a member of 'boost::mpl::eval_if_c&lt;C,F1,F2&gt;'" ... </p> <p> See <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> to get the full message error. </p> <p> I narrowed down the problem to the three adaptors "copied, sliced and tokenized". See below : </p> <pre class="wiki">// Uncomment one the three adaptors below to get the same compilation error // #include &lt;boost/range/adaptor/copied.hpp&gt; // #include &lt;boost/range/adaptor/sliced.hpp&gt; // #include &lt;boost/range/adaptor/tokenized.hpp&gt; // these one are fine #include &lt;boost/range/adaptor/adjacent_filtered.hpp&gt; #include &lt;boost/range/adaptor/filtered.hpp&gt; #include &lt;boost/range/adaptor/indexed.hpp&gt; #include &lt;boost/range/adaptor/indirected.hpp&gt; #include &lt;boost/range/adaptor/map.hpp&gt; #include &lt;boost/range/adaptor/replaced.hpp&gt; #include &lt;boost/range/adaptor/replaced_if.hpp&gt; #include &lt;boost/range/adaptor/reversed.hpp&gt; #include &lt;boost/range/adaptor/strided.hpp&gt; #include &lt;boost/range/adaptor/transformed.hpp&gt; #include &lt;boost/range/adaptor/uniqued.hpp&gt; using namespace boost::adaptors; int main() { } </pre><p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> full error message </p> <pre class="wiki">1&gt; Creating "Release\TestRangeEx.unsuccessfulbuild" because "AlwaysCreate" was specified. 1&gt;ClCompile: 1&gt; main.cpp 1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C2039: 'type' : is not a member of 'boost::mpl::eval_if_c&lt;C,F1,F2&gt;' 1&gt; with 1&gt; [ 1&gt; C=false, 1&gt; F1=boost::range_const_iterator&lt;unsigned int&gt;, 1&gt; F2=boost::range_mutable_iterator&lt;unsigned int&gt; 1&gt; ] 1&gt; F:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstring(1920) : see reference to class template instantiation 'boost::range_iterator&lt;C&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; C=unsigned int 1&gt; ] 1&gt; F:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstring(1919) : while compiling class template member function 'void std::basic_string&lt;_Elem,_Traits,_Ax&gt;::_Copy(unsigned int,unsigned int)' 1&gt; with 1&gt; [ 1&gt; _Elem=wchar_t, 1&gt; _Traits=std::char_traits&lt;wchar_t&gt;, 1&gt; _Ax=std::allocator&lt;wchar_t&gt; 1&gt; ] 1&gt; F:\Program Files\Microsoft Visual Studio 10.0\VC\include\xfunctional(900) : see reference to class template instantiation 'std::basic_string&lt;_Elem,_Traits,_Ax&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; _Elem=wchar_t, 1&gt; _Traits=std::char_traits&lt;wchar_t&gt;, 1&gt; _Ax=std::allocator&lt;wchar_t&gt; 1&gt; ] 1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C2146: syntax error : missing ';' before identifier 'type' 1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C2602: 'boost::range_iterator&lt;C&gt;::type' is not a member of a base class of 'boost::range_iterator&lt;C&gt;' 1&gt; with 1&gt; [ 1&gt; C=unsigned int 1&gt; ] 1&gt; F:\Program Files\boost\boost/range/iterator.hpp(63) : see declaration of 'boost::range_iterator&lt;C&gt;::type' 1&gt; with 1&gt; [ 1&gt; C=unsigned int 1&gt; ] 1&gt;F:\Program Files\boost\boost/range/iterator.hpp(63): error C2868: 'boost::range_iterator&lt;C&gt;::type' : illegal syntax for using-declaration; expected qualified-name 1&gt; with 1&gt; [ 1&gt; C=unsigned int 1&gt; ] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4136 Trac 1.4.3 raysalem@… Tue, 11 May 2010 17:23:10 GMT <link>https://svn.boost.org/trac10/ticket/4136#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4136#comment:1</guid> <description> <p> I am facing the same issue, and I observe the problem with both MSVC 9.0 and 10.0. My code base run with gcc version 4.3.4. So seems to be strictly a MSVC problem. </p> <p> Has a solution been found and if no, Whats the time frame. If yes is it in a branch? </p> <p> thanks Ray </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sat, 17 Jul 2010 19:53:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4136#comment:2 https://svn.boost.org/trac10/ticket/4136#comment:2 <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> Ticket philip.koester@… Fri, 12 Oct 2012 12:59:30 GMT <link>https://svn.boost.org/trac10/ticket/4136#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4136#comment:3</guid> <description> <p> Hm, so this was closed two years ago? I face this issue today. A regression? </p> </description> <category>Ticket</category> </item> </channel> </rss>