[Dune] Using a dune project create with v2.1 with the trunk

Andreas Dedner A.S.Dedner at warwick.ac.uk
Tue Mar 20 14:46:54 CET 2012


> c) You can add preprocessor macros to use the one ore the other code,
>     when you need to introduce incompatible changes. In you config.h
>     will find definitions like:
>     #define DUNE_COMMON_VERSION_MAJOR 2
>     #define DUNE_COMMON_VERSION_MINOR 2

In  dune-common/dune/common/version.hh
there are some utility macros that you can use
You can enclose code that only works with the trunk with
#if DUNE_VERSION_NEWER(DUNE_GRID,2,2)
// new goes here
#else
// old goes here
#endif

Andreas




More information about the Dune mailing list