yat  0.14.5pre
deprecate.h
Go to the documentation of this file.
1 #ifndef _theplu_yat_utility_deprecate_
2 #define _theplu_yat_utility_deprecate_
3 
4 // $Id: deprecate.h 3295 2014-07-25 04:24:39Z peter $
5 
6 /*
7  Copyright (C) 2008, 2009, 2014 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
28 
29 #include "config_public.h"
30 
31 // allow user to define YAT_DEPRECATE and thereby turn off warning
32 // about deprecation
33 #ifndef YAT_DEPRECATE
34 #ifdef YAT_HAVE_GCC_DEPRECATED
35 #define YAT_DEPRECATE __attribute__((deprecated))
37 #else
38 #define YAT_DEPRECATE
40 #endif
41 #endif
42 
43 // With GCC version < 4.3 deprecation of classes yields no
44 // warning. Therefore, we deprecate the constructors 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 #define YAT_DEPRECATE_GCC_PRE4_3 YAT_DEPRECATE
51 #else
52 #define YAT_DEPRECATE_GCC_PRE4_3
54 #endif
55 #endif
56 
57 #endif

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5