stdgpu/type_traits.h Source File

stdgpu/type_traits.h Source File#

stdgpu: stdgpu/type_traits.h Source File
stdgpu Latest
Efficient STL-like Data Structures on the GPU
type_traits.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 Patrick Stotko
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef STDGPU_TYPE_TRAITS_H
17#define STDGPU_TYPE_TRAITS_H
18
28#include <type_traits>
29
30namespace stdgpu
31{
32
38template <typename T>
40{
41 using type = std::remove_cv_t<std::remove_reference_t<T>>;
42};
43
45template <typename T>
46using remove_cvref_t = typename remove_cvref<T>::type;
48
49} // namespace stdgpu
50
51#include <stdgpu/impl/type_traits_detail.h>
52
53#endif // STDGPU_TYPE_TRAITS_H
std::remove_cv_t< std::remove_reference_t< T > > type
Definition: type_traits.h:41
Type trait to remove const, volative, and reference qualifiers from the given type.
Definition: type_traits.h:40