Commit 49e6913c authored by Praetorius, Simon's avatar Praetorius, Simon

added remove_cvref_t type-traits

parent 753849bf
Pipeline #1766 failed with stage
in 1 minute and 45 seconds
......@@ -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>
......
Markdown is supported
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