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

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Mar 20 14:56:33 CET 2012


Actually, for compatibility with DUNE 2.1 you should use

#if DUNE_VERSION_NEWER_REV(DUNE_GRID,2,2,0)
   // new code
#else
   // old code
#endif

The DUNE_VERSION_NEWER macro contained an extra unused template argument for 
the revision, which is now gone.

Best,

Martin

On 03/20/2012 02:46 PM, Andreas Dedner wrote:
>> 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
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list