00001 #ifndef _theplu_yat_utility_deprecate_ 00002 #define _theplu_yat_utility_deprecate_ 00003 00004 // $Id: deprecate.h 2124 2009-12-19 22:43:03Z peter $ 00005 00006 /* 00007 Copyright (C) 2008, 2009 Peter Johansson 00008 00009 This file is part of the yat library, http://dev.thep.lu.se/yat 00010 00011 The yat library is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License as 00013 published by the Free Software Foundation; either version 3 of the 00014 License, or (at your option) any later version. 00015 00016 The yat library is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with yat. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00028 00029 #include "config_public.h" 00030 00031 // allow user to define YAT_DEPRECATE and thereby turn off warning 00032 // about deprecation 00033 #ifndef YAT_DEPRECATE 00034 #ifdef YAT_HAVE_GCC_DEPRECATED 00036 #define YAT_DEPRECATE __attribute__((deprecated)) 00037 #else 00039 #define YAT_DEPRECATE 00040 #endif 00041 #endif 00042 00043 // With GCC version < 4.3 deprecation of classes yields no 00044 // warning. Therefore, we deprecate the constructors of those classes 00045 // with this macro YAT_DEPRECATE_GCC_PRE4_3, which is mute for 00046 // compiler GCC 4.3 and newer and for others compilers than GCC. 00047 #ifndef YAT_DEPRECATE_GCC_PRE4_3 00048 #if defined(__GNUC__) && ((__GNUC__<4) || (__GNUC__==4 && __GNUC_MINOR__<3)) 00050 #define YAT_DEPRECATE_GCC_PRE4_3 YAT_DEPRECATE 00051 #else 00053 #define YAT_DEPRECATE_GCC_PRE4_3 00054 #endif 00055 #endif 00056 00057 #endif