Boost C++ Libraries: Ticket #155: Bug in edge.hpp:99 std::ostream is NOT a template https://svn.boost.org/trac10/ticket/155 <pre class="wiki">Compiling boost with Intel compiler I’ve got such an error: g++ -c -Wall -ftemplate-depth-100 - DBOOST_PYTHON_DYNAMIC_LIB - DBOOST_PYTHON_SOURCE -g -O0 -fno-inline -fPIC - I"libs/python/build" -I "/usr/include/python2.2" - I "/home/users/vsysoltx/boost_loki/boost_1_30_0" - o "libs/python/build/bin/libboost_python.so/gcc/debug/run time-link-dynamic/shared-linkable- true/inheritance.o" "libs/python/build/../src/object/inherit ance.cpp" … /home/users/vsysoltx/boost_loki/boost_1_30_0/boost/gra ph/detail/edge.hpp(99): error: type "std::ostream" may not have a template argument list std::ostream&lt;Char, Traits&gt;&amp; ^ … The problem is in graph/detail/edge.hpp:99: template &lt;class Char, class Traits, class D, class V&gt; std::ostream&lt;Char, Traits&gt;&amp; operator&lt;&lt;(std::ostream&lt;Char, Traits&gt;&amp; os, const boost::detail::edge_desc_impl&lt;D,V&gt;&amp; e) You should have known that std::stream is not a template - it is simply an end-user type defined as: typedef basic_ostream&lt;char, char_traits&lt;char&gt; &gt; ostream; So template arguments are not suitable for it. Gcc 3.2 accepts the code because of an ugly bug in compiler, gcc 3.4 has this bug fixed, so it emits the same error as Intel compiler emits. The code in boost must be changed, I suppose you meant basic_ostream instead of ostream, with this assumption I’ve done the patch: *** boost/graph/detail/edge.hpp.orig 2003-06-02 17:05:49.000000000 +0400 --- boost/graph/detail/edge.hpp 2003-06-02 17:20:34.000000000 +0400 *************** *** 96,103 **** } #else template &lt;class Char, class Traits, class D, class V&gt; ! std::ostream&lt;Char, Traits&gt;&amp; ! operator&lt;&lt;(std::ostream&lt;Char, Traits&gt;&amp; os, const boost::detail::edge_desc_impl&lt;D,V&gt;&amp; e) { return os &lt;&lt; "(" &lt;&lt; e.m_source &lt;&lt; "," &lt;&lt; e.m_target &lt;&lt; ")"; --- 96,103 ---- } #else template &lt;class Char, class Traits, class D, class V&gt; ! std::basic_ostream&lt;Char, Traits&gt;&amp; ! operator&lt;&lt;(std::basic_ostream&lt;Char, Traits&gt;&amp; os, const boost::detail::edge_desc_impl&lt;D,V&gt;&amp; e) { return os &lt;&lt; "(" &lt;&lt; e.m_source &lt;&lt; "," &lt;&lt; e.m_target &lt;&lt; ")"; You may contact me via Vyatcheslav.Sysoltsev@intel.com </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/155 Trac 1.4.3 Douglas Gregor Sun, 31 Oct 2004 18:41:53 GMT status changed https://svn.boost.org/trac10/ticket/155#comment:1 https://svn.boost.org/trac10/ticket/155#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket