summaryrefslogtreecommitdiffstats
blob: 6d9baaa1a61c16a81b5e7b74b08c95efd2537862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (c) 2012 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#pragma once

#if defined(__clang__)
# if __has_feature(cxx_override_control) || __has_extension(cxx_override_control)
#  define SWIFTEN_OVERRIDE override
# else
#  define SWIFTEN_OVERRIDE
# endif

#elif defined(__GNUC__)
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) && defined(__GXX_EXPERIMENTAL_CXX0X__)
#  define SWIFTEN_OVERRIDE override
# else
#  define SWIFTEN_OVERRIDE
# endif

#elif defined(_MSC_VER)
// Actually, 1700 is the first version that supports the C++11 override, but
// older versions apparently support a similar keyword.
# if _MSC_VER >= 1400
#  define SWIFTEN_OVERRIDE override
# else
#  define SWIFTEN_OVERRIDE
# endif

#else
# define SWIFTEN_OVERRIDE
#endif