KASKADE 7 development version
typeTraits.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the library KASKADE 7 */
4/* https://www.zib.de/research/projects/kaskade7-finite-element-toolbox */
5/* */
6/* Copyright (C) 2016-2016 Zuse Institute Berlin */
7/* */
8/* KASKADE 7 is distributed under the terms of the ZIB Academic License. */
9/* see $KASKADE/academic.txt */
10/* */
11/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13#ifndef UTILITIES_TYPE_TRAITS
14#define UTILITIES_TYPE_TRAITS
15
16namespace Kaskade
17{
29 template <class T>
30 T& removeConst(T const& t)
31 {
32 return const_cast<T&>(t);
33 }
34
35 template <class T>
36 T* removeConst(T const* t)
37 {
38 return const_cast<T*>(t);
39 }
40
41}
42
43#endif
T & removeConst(T const &t)
A convenience template for removing the const qualifier from references and pointers.
Definition: typeTraits.hh:30