Skip to content
Snippets Groups Projects
Commit 22e8153d authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Switch to C++14 deprecation warnings

Our own wrappers was only used in one place anyway and did not all allow for specify a reason string.
parent e97ed713
No related merge requests found
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file Deprecated.h
//! \ingroup core
//! \author Christian Godenschwager <christian.godenschwager@fau.de>
//
//======================================================================================================================
#pragma once
/*******************************************************************************************************************//**
* \brief Macro to mark a function as deprecated
*
* To mark a function as deprecated wrap its signature with the WALBERLA_DEPRECATED macro at the definition.
* E.g. to mark int f(const & foo) const; as deprecated use WALBERLA_DEPRECATED(int f(const & foo) const);
* Note that this won't work for functions with a comma in their return type definition! E.g. to mark
* std::pair<int,int> f(); as deprecated add a typedef std::pair<int, int> PairInt; first an then deprecate
* via WALBERLA_DEPRECATE(PairInt f());
* Deprecation of a function will produce a compiler warning if the function is used despite it's deprecation.
*
* \param func The function to be marked deprecated.
**********************************************************************************************************************/
#ifdef __GNUC__
# define WALBERLA_DEPRECATED(func) func __attribute__ ((deprecated))
#elif defined(_MSC_VER)
# define WALBERLA_DEPRECATED(func) __declspec(deprecated) func
#elif defined(__IBMCPP__)
# define WALBERLA_DEPRECATED(func) func // xlc++ (12.1) has no obvious possibility for deprecation
#elif defined(_SX)
# define WALBERLA_DEPRECATED(func) __declspec(deprecated) func
#else
# pragma message("WARNING: You need to implement WALBERLA_DEPRECATED for this compiler!")
# define WALBERLA_DEPRECATED(func) func
#endif
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "AllSet.h" #include "AllSet.h"
#include "Array.h" #include "Array.h"
#include "DataTypes.h" #include "DataTypes.h"
#include "Deprecated.h"
#include "EndianIndependentSerialization.h" #include "EndianIndependentSerialization.h"
#include "Environment.h" #include "Environment.h"
#include "FunctionTraits.h" #include "FunctionTraits.h"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "SimpleFCD.h" #include "SimpleFCD.h"
#include "blockforest/BlockDataHandling.h" #include "blockforest/BlockDataHandling.h"
#include "core/Deprecated.h"
namespace walberla{ namespace walberla{
namespace pe{ namespace pe{
...@@ -35,9 +34,9 @@ public: ...@@ -35,9 +34,9 @@ public:
SimpleFCD<BodyTypeTuple> * initialize( IBlock * const /*block*/ ) {return new SimpleFCD<BodyTypeTuple>();} SimpleFCD<BodyTypeTuple> * initialize( IBlock * const /*block*/ ) {return new SimpleFCD<BodyTypeTuple>();}
}; };
/// \attention This function is deprecated. Use createGenericFCDDataHandling<BodyTypeTuple, AnalyticCollideFunctor>() instead! [[deprecated("Use createGenericFCDDataHandling<BodyTypeTuple, AnalyticCollideFunctor>() instead")]]
template <typename BodyTypeTuple> template <typename BodyTypeTuple>
WALBERLA_DEPRECATED(shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling()); shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling();
template <typename BodyTypeTuple> template <typename BodyTypeTuple>
shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling() shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment