next up previous contents index
Next: Platforms Up: Technical Information Previous: DLL's for MS Visual   Contents   Index

Namespaces and Interaction with other Libraries

If users want to use other software packages like STL together with LEDA in one project avoiding naming conflicts is an issue.

LEDA defines all names (types, functions, constants, ...) in the namespace leda. This makes the former macro-based prefixing scheme obsolete. Note, however, that the prefixed names leda_... still can be used for backward compatibility. Application programs have to use namespace leda globally (by saying "using namespace leda;") or must prefix every LEDA symbol with "leda::".

The second issue of interaction concerns the data type bool which is part of the new C++ standard. However not all compilers currently support a bool type. LEDA offers bool either compiler provided or defined within LEDA if the compiler lacks the support. Some STL packages follow a similar scheme. To solve the existance conflict of two different bool type definitions we suggest to use LEDA's bool as STL is a pure template library only provided by header files and its defined bool type can be easily replaced.