Bugs item #747552, was opened at 2003-06-02 07:21
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=747552&group_id=7586

Category: graph
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Jeremy Siek (jsiek)
Summary: Bug in edge.hpp:99 std::ostream is NOT a template

Initial Comment:
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<Char, Traits>&
         ^
…

The problem is in graph/detail/edge.hpp:99:
  template <class Char, class Traits, class D, class V>
  std::ostream<Char, Traits>&
  operator<<(std::ostream<Char, Traits>& os,
             const boost::detail::edge_desc_impl<D,V>& e)

You should have known that std::stream is not a 
template - it is simply an end-user type defined as:
typedef basic_ostream<char, char_traits<char> > 
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 <class Char, class Traits, class D, class V>
!   std::ostream<Char, Traits>&
!   operator<<(std::ostream<Char, Traits>& os,
               const boost::detail::edge_desc_impl<D,V>& 
e)
    {
      return os << "(" << e.m_source << "," << 
e.m_target << ")";
--- 96,103 ----
    }
  #else
    template <class Char, class Traits, class D, class V>
!   std::basic_ostream<Char, Traits>&
!   operator<<(std::basic_ostream<Char, Traits>& os,
               const boost::detail::edge_desc_impl<D,V>& 
e)
    {
      return os << "(" << e.m_source << "," << 
e.m_target << ")";

You may contact me via 
[EMAIL PROTECTED]


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=747552&group_id=7586


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Boost-bugs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to