Skip to content
Snippets Groups Projects
Commit a83057ba authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Move final.hh to std.

DUNE_FINAL is a helper macro for C++11 and should be placed in
std, where now all compatibility has to be placed.
Beautify Doxygen documentation.
parent 8d53340f
Branches
Tags
No related merge requests found
......@@ -41,7 +41,6 @@ commoninclude_HEADERS = \
enumset.hh \
exceptions.hh \
fassign.hh \
final.hh \
float_cmp.cc \
float_cmp.hh \
fmatrix.hh \
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_COMMON_FINAL_HH
#define DUNE_COMMON_FINAL_HH
/** \file
* \brief Definition of the DUNE_FINAL macro, which encapsulates
* the 'final' keyword from C++11
*/
#if ! HAVE_KEYWORD_FINAL
#define DUNE_FINAL
#else
#define DUNE_FINAL final
#endif
#endif // DUNE_COMMON_FINAL_HH
install(FILES
constexpr.hh
final.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/common/std)
stdincludedir = $(includedir)/dune/common/std
stdinclude_HEADERS = \
constexpr.hh
constexpr.hh \
final.hh
EXTRA_DIST = CMakeLists.txt
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_COMMON_STD_FINAL_HH
#define DUNE_COMMON_STD_FINAL_HH
/** \file
* \brief Definition of the DUNE_FINAL macro
*/
#if HAVE_KEYWORD_FINAL || defined(DOXYGEN)
/**
* \brief Set method or expression <code>final</code> if
* supported by the compiler.
*
* \code
#include <dune/common/std/final.hh>
* \endcode
*
* This is a preprocessor define which can be used to
* member functions or classes as <code>final</code>,
* this keyword was introduced by C++11.
*/
#define DUNE_FINAL final
#else
#define DUNE_FINAL
#endif
#endif // DUNE_COMMON_STD_FINAL_HH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment