Boost logo

Boost :

From: Jürgen Hunold (hunold_at_[hidden])
Date: 2002-04-17 09:03:57

Hash: SHA1

Hi !

I'm trying replace some LEDA-Graph with the BGL-Graph-Data-Structures.
In order to do this, I've decided to use the BGL LEDA_Graph adaptor at
first, convert my handwritten algorithms to the BGL interface and then
replace the underlying representation.

Unfortunately, the implementation of <boost/graph/leda_graph.hpp> is not
quite useful in the current state.
The problem is rooted in LEDA's use of the preprocessor, as mentioned in
the docs and the BGL book, in order to prefix nearly _everything_ with
the prefix leda_ . For example, "string" is preprocessed to
"leda_string". The use of a simple "#undef string" is possible, but
quite error prone
The newer LEDA version (at least 4.1) provides support to disable the
prefix macros with the LEDA_PREFIX define, which we did.

Now the compiler complains about knowing nothing about "edge","node" and
"node_map" appearing in <boost/graph/leda_graph.hpp>.
These should read "leda_edge","leda_node" and "leda_node_map" instead.,
For the time being I've patched <boost/graph/leda_graph.hpp> so that
the file contains "leda_edge" instead of "edge" and so on.

I've attached the unified diff against today's cvs.

There are three possible solutions:
1) I disable/enable the LEDA_PREFIX around the boost header
2) patch each boost release.
3) fix <boost/graph/leda_graph.hpp>

1) is possible, but not preferred
2) same as 1
3) preferred.

Any comments ?


- --
* Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau
* voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover
* fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover
* hunold_at_[hidden] !
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


Boost list run by bdawes at, gregod at, cpdaniel at, john at