1501 |
15 Sep 08 |
peter |
1 |
#ifndef _theplu_yat_utility_deprecate_ |
3295 |
25 Jul 14 |
peter |
2 |
#define _theplu_yat_utility_deprecate_ |
1500 |
15 Sep 08 |
peter |
3 |
|
1500 |
15 Sep 08 |
peter |
// $Id$ |
1500 |
15 Sep 08 |
peter |
5 |
|
1500 |
15 Sep 08 |
peter |
6 |
/* |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2008, 2009 Peter Johansson |
1500 |
15 Sep 08 |
peter |
8 |
|
2124 |
19 Dec 09 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
1500 |
15 Sep 08 |
peter |
10 |
|
1500 |
15 Sep 08 |
peter |
The yat library is free software; you can redistribute it and/or |
1500 |
15 Sep 08 |
peter |
modify it under the terms of the GNU General Public License as |
1500 |
15 Sep 08 |
peter |
published by the Free Software Foundation; either version 3 of the |
1500 |
15 Sep 08 |
peter |
License, or (at your option) any later version. |
1500 |
15 Sep 08 |
peter |
15 |
|
1500 |
15 Sep 08 |
peter |
The yat library is distributed in the hope that it will be useful, |
1500 |
15 Sep 08 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1500 |
15 Sep 08 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1500 |
15 Sep 08 |
peter |
General Public License for more details. |
1500 |
15 Sep 08 |
peter |
20 |
|
1500 |
15 Sep 08 |
peter |
You should have received a copy of the GNU General Public License |
1500 |
15 Sep 08 |
peter |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
1500 |
15 Sep 08 |
peter |
23 |
*/ |
1500 |
15 Sep 08 |
peter |
24 |
|
1500 |
15 Sep 08 |
peter |
25 |
/// |
1500 |
15 Sep 08 |
peter |
/// \file utility/deprecate.h |
1500 |
15 Sep 08 |
peter |
27 |
/// |
1500 |
15 Sep 08 |
peter |
28 |
|
1500 |
15 Sep 08 |
peter |
29 |
#include "config_public.h" |
1500 |
15 Sep 08 |
peter |
30 |
|
1707 |
12 Jan 09 |
peter |
// allow user to define YAT_DEPRECATE and thereby turn off warning |
1707 |
12 Jan 09 |
peter |
// about deprecation |
1707 |
12 Jan 09 |
peter |
33 |
#ifndef YAT_DEPRECATE |
1500 |
15 Sep 08 |
peter |
34 |
#ifdef YAT_HAVE_GCC_DEPRECATED |
1500 |
15 Sep 08 |
peter |
/// if supported by compiler define attribute deprecated |
1500 |
15 Sep 08 |
peter |
36 |
#define YAT_DEPRECATE __attribute__((deprecated)) |
1500 |
15 Sep 08 |
peter |
37 |
#else |
1500 |
15 Sep 08 |
peter |
/// otherwise define it as empty |
1500 |
15 Sep 08 |
peter |
39 |
#define YAT_DEPRECATE |
1500 |
15 Sep 08 |
peter |
40 |
#endif |
1707 |
12 Jan 09 |
peter |
41 |
#endif |
1500 |
15 Sep 08 |
peter |
42 |
|
2058 |
11 Sep 09 |
peter |
// With GCC version < 4.3 deprecation of classes yields no |
2062 |
14 Sep 09 |
peter |
// warning. Therefore, we deprecate the constructors of those classes |
2058 |
11 Sep 09 |
peter |
// with this macro YAT_DEPRECATE_GCC_PRE4_3, which is mute for |
2058 |
11 Sep 09 |
peter |
// compiler GCC 4.3 and newer and for others compilers than GCC. |
2058 |
11 Sep 09 |
peter |
47 |
#ifndef YAT_DEPRECATE_GCC_PRE4_3 |
4200 |
19 Aug 22 |
peter |
48 |
#if defined(__GNUC__) && ((__GNUC__<4) || (__GNUC__==4 && __GNUC_MINOR__<3)) |
2058 |
11 Sep 09 |
peter |
/// if GCC version before 4.3 define as YAT_DEPRECATE defined above |
2058 |
11 Sep 09 |
peter |
50 |
#define YAT_DEPRECATE_GCC_PRE4_3 YAT_DEPRECATE |
2058 |
11 Sep 09 |
peter |
51 |
#else |
2058 |
11 Sep 09 |
peter |
/// with GCC 4.3 and newer (or other compilers) define it as empty |
2058 |
11 Sep 09 |
peter |
53 |
#define YAT_DEPRECATE_GCC_PRE4_3 |
1500 |
15 Sep 08 |
peter |
54 |
#endif |
2058 |
11 Sep 09 |
peter |
55 |
#endif |
2058 |
11 Sep 09 |
peter |
56 |
|
2058 |
11 Sep 09 |
peter |
57 |
#endif |