Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2003-06-02 09:21:49


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
Vyatcheslav.Sysoltsev_at_[hidden]

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

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
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk