diff --git a/include/boost/graph/graph_traits.hpp b/include/boost/graph/graph_traits.hpp index f31554e7..c1ffaa06 100644 --- a/include/boost/graph/graph_traits.hpp +++ b/include/boost/graph/graph_traits.hpp @@ -82,4 +82,14 @@ T source(std::pair p, const G&) { return p.first; } template T target(std::pair p, const G&) { return p.second; } +#if defined(__GNUC__) && defined(__SGI_STL_PORT) +// For some reason g++ with STLport does not see the above definition +// of source() and target() unless we bring them into the boost +// namespace. +namespace boost { + using ::source; + using ::target; +} +#endif + #endif /* BOOST_GRAPH_TRAITS_HPP*/