Skip to content
Snippets Groups Projects
Commit 49e6913c authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

added remove_cvref_t type-traits

parent 753849bf
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,24 @@
namespace AMDiS
{
/// \brief Remove cv and ref qualifiers of type T.
/**
* If the type T is a reference type, provides the member typedef type which
* is the type referred to by T with its topmost cv-qualifiers removed.
* Otherwise type is T with its topmost cv-qualifiers removed.
*
* Note: This is a backport of c++20 std::remove_cvref
**/
template< class T >
struct remove_cvref
{
using type = std::remove_cv_t<std::remove_reference_t<T>>;
};
/// Helper alias template for \ref remove_cvref
template< class T >
using remove_cvref_t = typename remove_cvref<T>::type;
namespace Impl
{
template <class T>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment