mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add FOAM_DEPRECATED macros
This commit is contained in:
@ -129,6 +129,8 @@ namespace Foam
|
|||||||
#define FOAMbuild foamVersion::build.c_str()
|
#define FOAMbuild foamVersion::build.c_str()
|
||||||
#define FOAMbuildArch foamVersion::buildArch
|
#define FOAMbuildArch foamVersion::buildArch
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,7 @@ Namespace
|
|||||||
stdFoam
|
stdFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Global templates and macros used by OpenFOAM and some standard
|
Global macros and templates used by OpenFOAM and some standard
|
||||||
C++ headers.
|
C++ headers.
|
||||||
|
|
||||||
Some of the templates defined here correspond to useful
|
Some of the templates defined here correspond to useful
|
||||||
@ -47,6 +47,8 @@ SeeAlso
|
|||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Mirror OPENFOAM define in other variants
|
// Mirror OPENFOAM define in other variants
|
||||||
#ifdef OPENFOAM
|
#ifdef OPENFOAM
|
||||||
// Code base from www.openfoam.com
|
// Code base from www.openfoam.com
|
||||||
@ -61,6 +63,22 @@ SeeAlso
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Compile-time warning for use of deprecated methods (compiler-dependent).
|
||||||
|
// Use within the class declaration.
|
||||||
|
|
||||||
|
#if defined(__cplusplus) && (__cplusplus >= 201402L)
|
||||||
|
# define FOAM_DEPRECATED(since) [[deprecated("Since " #since)]]
|
||||||
|
# define FOAM_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# define FOAM_DEPRECATED(since) __attribute__((__deprecated__("Since " #since)))
|
||||||
|
# define FOAM_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement)))
|
||||||
|
#else
|
||||||
|
# define FOAM_DEPRECATED(since)
|
||||||
|
# define FOAM_DEPRECATED_FOR(since, replacement)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Namespace for OpenFOAM
|
//- Namespace for OpenFOAM
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user