Dune Core Modules (2.7.1)

deprecated.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_DEPRECATED_HH
4 #define DUNE_DEPRECATED_HH
5 
13 #if defined(DOXYGEN) || !defined(HAS_ATTRIBUTE_DEPRECATED)
15 
84 #define DUNE_DEPRECATED
85 #else // defined(HAS_ATTRIBUTE_DEPRECATED)
86 #define DUNE_DEPRECATED __attribute__((deprecated))
87 #endif
88 
89 #if defined(DOXYGEN) || !defined(HAS_ATTRIBUTE_DEPRECATED_MSG)
91 
169 #define DUNE_DEPRECATED_MSG(text) DUNE_DEPRECATED
170 #else // defined(HAS_ATTRIBUTE_DEPRECATED_MSG)
171 #define DUNE_DEPRECATED_MSG(text) __attribute__((deprecated(# text)))
172 #endif
173 
174 #ifdef DOXYGEN
192 #define DUNE_NO_DEPRECATED_BEGIN ...
198 #define DUNE_NO_DEPRECATED_END ...
199 #else
200 # if defined __clang__
201 # define DUNE_NO_DEPRECATED_BEGIN \
202  _Pragma("clang diagnostic push") \
203  _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
204 # define DUNE_NO_DEPRECATED_END _Pragma("clang diagnostic pop")
205 # elif defined __INTEL_COMPILER
206 # define DUNE_NO_DEPRECATED_BEGIN \
207  _Pragma("warning push") \
208  _Pragma("warning(disable:1478)") \
209  _Pragma("warning(disable:1786)")
210 # define DUNE_NO_DEPRECATED_END _Pragma("warning pop")
211 # elif defined __GNUC__
212 # define DUNE_NO_DEPRECATED_BEGIN \
213  _Pragma("GCC diagnostic push") \
214  _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
215 # define DUNE_NO_DEPRECATED_END _Pragma("GCC diagnostic pop")
216 # else
217 # define DUNE_NO_DEPRECATED_BEGIN /* Noop. */
218 # define DUNE_NO_DEPRECATED_END /* Noop. */
219 # endif
220 #endif
221 
223 
224 #endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 15, 22:30, 2024)