From 230e30aee34fbc469dacbeca2a8530c750fac2d5 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 27 Feb 2001 06:33:08 +0000 Subject: [PATCH] fixed g++ with STLport problem with source(std::pair,G) [SVN r9354] --- include/boost/graph/graph_traits.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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*/