AsmGrader 0.0.0
Loading...
Searching...
No Matches
remove_all_pointers.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <concepts>
4
5namespace asmgrader {
6
7// NOLINTBEGIN(readability-identifier-naming)
8
10template <typename T>
12{
13 using type = T;
14};
15
17template <typename T>
22
23template <typename T>
25
26// NOLINTEND(readability-identifier-naming)
27
28static_assert(std::same_as<remove_all_pointers_t<int>, int>);
29static_assert(std::same_as<remove_all_pointers_t<int*>, int>);
30static_assert(std::same_as<remove_all_pointers_t<int**>, int>);
31static_assert(std::same_as<remove_all_pointers_t<int***>, int>);
32// NOLINTBEGIN(*c-arrays)
33static_assert(std::same_as<remove_all_pointers_t<int[]>, int[]>);
34static_assert(std::same_as<remove_all_pointers_t<int (*)[]>, int[]>);
35static_assert(std::same_as<remove_all_pointers_t<int (**)[]>, int[]>);
36static_assert(std::same_as<remove_all_pointers_t<int*[]>, int*[]>);
37static_assert(std::same_as<remove_all_pointers_t<int*[]>, int*[]>);
38// NOLINTEND(*c-arrays)
39
40} // namespace asmgrader
Definition asm_buffer.hpp:19
remove_all_pointers< T >::type remove_all_pointers_t
Definition remove_all_pointers.hpp:24
remove_all_pointers< T >::type type
Definition remove_all_pointers.hpp:20
Removes all levels of pointers on a type.
Definition remove_all_pointers.hpp:12
T type
Definition remove_all_pointers.hpp:13