Changeset 1416 for trunk/yat


Ignore:
Timestamp:
Aug 19, 2008, 12:00:05 AM (13 years ago)
Author:
Peter
Message:

adding pp macro to conveinently compare version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/version.h.in

    r1383 r1416  
    8484#define YAT_DEV_BUILD @YAT_DEV_BUILD@
    8585
     86/**
     87   Check at compile time if the version of yat is at least a certain
     88   level.
     89   @param major The major version component of the version checked
     90   for (e.g., the "0" of "0.5.1").
     91   @param minor The minor version component of the version checked
     92   for (e.g., the "5" of "0.5.1").
     93   @param patch The patch level component of the version checked
     94   for (e.g., the "1" of "0.5.1").
     95
     96   \since New in yat 0.5
     97 */
     98#define YAT_VERSION_AT_LEAST(major,minor,patch)                    \
     99(((major) < YAT_MAJOR_VERSION) ||                                    \
     100 ((major) == YAT_MAJOR_VERSION && (minor) < YAT_MINOR_VERSION) || \
     101 ((major) == YAT_MAJOR_VERSION && (minor) == YAT_MINOR_VERSION &&\
     102  (patch) <= YAT_PATCH_VERSION))
     103
    86104#include <string>
    87105
Note: See TracChangeset for help on using the changeset viewer.