Unable to access graph concepts

Hi I'm new to Boost (using 1.41.0) and specifcally the BGL and am having a small problem with accessing graph concepts. My IDE (Eclipse/CDT) and compiler (GCC 3.4.5) are having trouble seeing definitions of graph concepts, although I have included boost/graph/graph_concepts.hpp. When I type the boost namespace specifier, autocomplete can find e.g. EqualityComparable, but it cannot find VertexAndEdgeListGraph (among others... but this the one I need). I can see the basic BCCL concepts from boost/concept_check.hpp just fine, making this all the more confusing. My paths are correct, as for example adjacency_list (residing in the same path) works fine. PS. Try to have mercy on me, I'm not only returning to C++ after a number of years but I'm also in the process of reacquainting myself fully with generic programming (and the STL), something I was never too great at... so a lot of things still meet with a blank stare from me. I've just been learning these things slowly by example and by trial-and-error so far. TIA, -- Nick Wiggill skype: nickwiggill nick.wiggill@gmail.com www.handcraftedgames.net -- "He uses statistics as a drunken man uses lamp-posts... for support rather than illumination." -Andrew Lang (1844-1912)

On Sun, 13 Dec 2009, Nick Wiggill wrote:
Hi
I'm new to Boost (using 1.41.0) and specifcally the BGL and am having a small problem with accessing graph concepts. My IDE (Eclipse/CDT) and compiler (GCC 3.4.5) are having trouble seeing definitions of graph concepts, although I have included boost/graph/graph_concepts.hpp.
When I type the boost namespace specifier, autocomplete can find e.g. EqualityComparable, but it cannot find VertexAndEdgeListGraph (among others... but this the one I need).
I can see the basic BCCL concepts from boost/concept_check.hpp just fine, making this all the more confusing. My paths are correct, as for example adjacency_list (residing in the same path) works fine.
PS. Try to have mercy on me, I'm not only returning to C++ after a number of years but I'm also in the process of reacquainting myself fully with generic programming (and the STL), something I was never too great at... so a lot of things still meet with a blank stare from me. I've just been learning these things slowly by example and by trial-and-error so far.
It looks like the BGL concepts are in boost::concepts, not just the boost namespace. Try using that name qualification and try auto-competion again. -- Jeremiah Willcock

It looks like the BGL concepts are in boost::concepts, not just the boost namespace. Try using that name qualification and try auto-competion again.
Hi Jeremiah, Yes, I forgot to mention that I had tried that after looking into graph_concepts.hpp. In my code: boost:: boost::concepts:: concepts:: ..all came up with diddly-squat in terms of graph concepts. Any thoughts?

On Sun, 13 Dec 2009, Nick Wiggill wrote:
It looks like the BGL concepts are in boost::concepts, not just the boost namespace. Try using that name qualification and try auto-competion again.
Hi Jeremiah,
Yes, I forgot to mention that I had tried that after looking into graph_concepts.hpp. In my code:
boost:: boost::concepts:: concepts::
..all came up with diddly-squat in terms of graph concepts.
Any thoughts?
If you type the name by hand does the compiler find it? It looks like those concepts are defined by a macro that auto-complete might not be able to understand. -- Jeremiah Willcock

Jeremiah, I got this working about an hour ago. Essentially, I found that BOOST_CONCEPT_ASSERT was doing it's job of giving the "beautified" errors when testing something simple like EqualityComparable<int>. I then tried it with the fully-qualified namespace boost::concepts::VertexAndEdgeListGraph, and it worked. I think I was making the foolish assumption that autocomplete would see everything the compiler would. Pretty fundamental mistake.
If you type the name by hand does the compiler find it? It looks like those concepts are defined by a macro that auto-complete might not be able to understand.
As you say, Eclipse didn't seem to see the macro. Thanks again!
participants (2)
-
Jeremiah Willcock
-
Nick Wiggill