What is remove_pointer_t
Remove pointer from type
#include <iostream>
#include <type_traits>
using namespace std;
int main() {
if (is_same_v <int, remove_pointer_t <int*>>)
cout << "Removed1 \n";
if (is_same_v <int*, remove_pointer_t <int**>>)
cout << "Removed2 \n";
if (is_same_v <int, remove_pointer_t <int>>)
cout << "Removed3\n";
if (is_same_v <int, remove_pointer_t <int* const>>)
cout << "Removed4 \n";
if (is_same_v <int, remove_pointer_t <int* volatile>>)
cout << "Removed5";
}
/*
Removed1
Removed2
Removed3
Removed4
Removed5
*/