Subject: [Boost-users] [graph] How to find out at compile time if a graph has some concrete internal property?
From: Juan Antonio Farré Basurte (jafb_at_[hidden])
Date: 2009-03-15 19:15:23


Hi,
I need to use the topological_sort BGL algorithm.
This algorithm needs either that the graph has an internal vertex index property or
that you provide a property map for it.
I'd like to perform conditional compilation, so that I only build and provide the vertex index property
map when it's needed,
and the internal index property of the graph when it has it.
For example, for an adjacency_list with vecS for
VertexList,
the property already exists in the graph and I wouldn't like to provide a property map for it.
But if I choose listS for
VertexList, there isn't such internal property and I need to provide the property map.
As I don't know what Graph implementation my template
will be provided,
I need to find a way to know at compile time if that graph has the internal index property or not.
Is there any
(documented?) way to do it?
This is the concrete information I need right now, but, if possible,
I'd like to know how to find out if the
graph has any concrete internal property, and not only the index one.
Thanks,

Juan