summaryrefslogtreecommitdiff
path: root/asl/meta/internal/quals.hpp
blob: 869cc89c0f96dc849d26a830575ef92bfcb96254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include "asl/meta/types.hpp"

namespace asl::internal {

template<typename T> struct const_helper { using add = const T; using remove = T; };
template<typename T> struct const_helper<const T> { using add = const T; using remove = T; };

template<typename T> concept is_const = same<T, typename internal::const_helper<T>::add>;

template<typename T> struct volatile_helper { using add = volatile T; using remove = T; };
template<typename T> struct volatile_helper<volatile T> { using add = volatile T; using remove = T; };

} // namespace asl::internal