
On May 31, 2006, at 12:25 PM, <dave@boost-consulting.com> <dave@boost- consulting.com> wrote:
I think there's probably a better way: put all the concepts in a nested namespace of boost and then add a using-directive to expose them in boost... Although I'd really like to see the whole test program first, because it's not obvious where/how the collision occurs.
Hmmm, that doesn't work for me. The following patch does work, but it's pretty ugly :( Doug Index: graph_concepts.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/graph/graph_concepts.hpp,v retrieving revision 1.43 diff -u -r1.43 graph_concepts.hpp --- graph_concepts.hpp 2 May 2006 15:06:06 -0000 1.43 +++ graph_concepts.hpp 31 May 2006 18:14:09 -0000 @@ -22,6 +22,26 @@ namespace boost { +// dwa 2003/7/11 -- This clearly shouldn't be necessary, but if +// you want to use vector_as_graph, it is! I'm sure the graph +// library leaves these out all over the place. Probably a +// redesign involving specializing a template with a static +// member function is in order :( +// +// It is needed in order to allow us to write using boost::vertices as +// needed for ADL when using vector_as_graph below. +#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \ + && !BOOST_WORKAROUND(__GNUC__, <= 2) \ + && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK +#endif + +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK +template <class T> +typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); +#endif + + namespace concepts { BOOST_concept(MultiPassInputIterator,(T)) { ~MultiPassInputIterator() { BOOST_CONCEPT_ASSERT((InputIterator<T>)); @@ -143,25 +163,6 @@ G g; }; -// dwa 2003/7/11 -- This clearly shouldn't be necessary, but if -// you want to use vector_as_graph, it is! I'm sure the graph -// library leaves these out all over the place. Probably a -// redesign involving specializing a template with a static -// member function is in order :( -// -// It is needed in order to allow us to write using boost::vertices as -// needed for ADL when using vector_as_graph below. -#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \ - && !BOOST_WORKAROUND(__GNUC__, <= 2) \ - && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -# define BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK -#endif - -#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK -template <class T> -typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); -#endif - BOOST_concept(VertexListGraph,(G)) : Graph<G> { @@ -471,6 +472,31 @@ I i, j; }; + } // end namespace concepts + + using boost::concepts::MultiPassInputIteratorConcept; + using boost::concepts::GraphConcept; + using boost::concepts::IncidenceGraphConcept; + using boost::concepts::BidirectionalGraphConcept; + using boost::concepts::AdjacencyGraphConcept; + using boost::concepts::VertexListGraphConcept; + using boost::concepts::EdgeListGraphConcept; + using boost::concepts::VertexAndEdgeListGraphConcept; + using boost::concepts::EdgeMutableGraphConcept; + using boost::concepts::VertexMutableGraphConcept; + using boost::concepts::MutableGraphConcept; + using boost::concepts::MutableIncidenceGraphConcept; + using boost::concepts::MutableBidirectionalGraphConcept; + using boost::concepts::MutableEdgeListGraphConcept; + using boost::concepts::VertexMutablePropertyGraphConcept; + using boost::concepts::EdgeMutablePropertyGraphConcept; + using boost::concepts::AdjacencyMatrixConcept; + using boost::concepts::ReadablePropertyGraphConcept; + using boost::concepts::PropertyGraphConcept; + using boost::concepts::LvaluePropertyGraphConcept; + using boost::concepts::BufferConcept; + using boost::concepts::ColorValueConcept; + using boost::concepts::BasicMatrixConcept; } // namespace boost #include <boost/concept/detail/concept_undef.hpp>