Remove Qualifiers

#include <m3ta/removequalifiers>

Removes any qualifiers from a given type.

Any const, volatile and reference qualifiers are removed. As such, the types T, T &&, const T &, and so on, will all resolve to T.

Arrays and pointers are preserved.

Traits

m3ta::RemoveQualifiers
template<typename T>
struct RemoveQualifiers
Template Parameters:
 
  • T – Type to remove the qualifiers from.

Member Types

type

The type T without any qualifier.

Aliases

m3ta::RemoveQualifiersT
template<typename T>
using RemoveQualifiersT = typename RemoveQualifiers<T>::type;

Usage Examples

using Type1 = m3ta::RemoveQualifiersT<int>; // int
using Type2 = m3ta::RemoveQualifiersT<const volatile int &>; // int
using Type3 = m3ta::RemoveQualifiersT<int &&>; // int
using Type4 = m3ta::RemoveQualifiersT<int *&>; // int *
using Type5 = m3ta::RemoveQualifiersT<int[32]>; // int[32]