Changeset 2058


Ignore:
Timestamp:
Sep 11, 2009, 5:04:35 AM (11 years ago)
Author:
Peter
Message:

deprecate constructors conditionally. Deprecation is active only for gcc and only for gcc older than 4.3. For 4.3 and newer the class deprecation should results in a warning. refs #521

Location:
trunk/yat/utility
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/OptionInFile.h

    r2057 r2058  
    5555    */
    5656    OptionInFile(CommandLine& cmd, std::string name, std::string desc,
    57                  bool required=false);
     57                 bool required=false) YAT_DEPRECATE_GCC_PRE4_3;
    5858
    5959    /**
  • trunk/yat/utility/OptionOutFile.h

    r2057 r2058  
    5656    */
    5757    OptionOutFile(CommandLine& cmd, std::string name, std::string desc,
    58                bool required=false) YAT_DEPRECATE;
     58               bool required=false) YAT_DEPRECATE_GCC_PRE4_3;
    5959
    6060    /**
  • trunk/yat/utility/deprecate.h

    r1707 r2058  
    4141#endif
    4242
     43// With GCC version < 4.3 deprecation of classes yields no
     44// warning. Therefore, we deprecate the compilers of those classes
     45// with this macro YAT_DEPRECATE_GCC_PRE4_3, which is mute for
     46// compiler GCC 4.3 and newer and for others compilers than GCC.
     47#ifndef YAT_DEPRECATE_GCC_PRE4_3
     48#if defined(__GNUC__) && ((__GNUC__<4) || (__GNUC__==4 && __GNUC_MINOR__<3))
     49/// if GCC version before 4.3 define as YAT_DEPRECATE defined above
     50#define YAT_DEPRECATE_GCC_PRE4_3 YAT_DEPRECATE
     51#else
     52/// with GCC 4.3 and newer (or other compilers) define it as empty
     53#define YAT_DEPRECATE_GCC_PRE4_3
    4354#endif
     55#endif
     56
     57#endif
Note: See TracChangeset for help on using the changeset viewer.