VisionCpp
0.0.1
include
framework
tools
type_dereferencer.hpp
Go to the documentation of this file.
1
// This file is part of VisionCpp, a lightweight C++ template library
2
// for computer vision and image processing.
3
//
4
// Copyright (C) 2016 Codeplay Software Limited. All Rights Reserved.
5
//
6
// Contact: visioncpp@codeplay.com
7
//
8
// Licensed under the Apache License, Version 2.0 (the "License");
9
// you may not use this file except in compliance with the License.
10
// You may obtain a copy of the License at
11
//
12
// http://www.apache.org/licenses/LICENSE-2.0
13
//
14
// Unless required by applicable law or agreed to in writing, software
15
// distributed under the License is distributed on an "AS IS" BASIS,
16
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
// See the License for the specific language governing permissions and
18
// limitations under the License.
19
20
/// \file type_dereferencer.hpp
21
/// \brief These methods are used to remove all the & const and * from a type.
22
23
#ifndef VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_TYPE_DEREFERENCER_HPP_
24
#define VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_TYPE_DEREFERENCER_HPP_
25
26
namespace
visioncpp
{
27
namespace
internal {
28
namespace
tools {
29
/// \struct RemoveAll
30
/// \brief These methods are used to remove all the & const and * from a type.
31
/// template parameters
32
/// \tparam T : the type we are interested in
33
template
<
typename
T>
34
struct
RemoveAll
{
35
typedef
T
Type
;
36
};
37
/// specialisation of RemoveAll when the type contains &
38
template
<
typename
T>
39
struct
RemoveAll
<T &> {
40
typedef
typename
RemoveAll<T>::Type
Type
;
41
};
42
/// specialisation of RemoveAll when the type contains *
43
template
<
typename
T>
44
struct
RemoveAll
<T *> {
45
typedef
typename
RemoveAll<T>::Type
Type
;
46
};
47
/// specialisation of RemoveAll when the type contains const
48
template
<
typename
T>
49
struct
RemoveAll
<const T> {
50
typedef
typename
RemoveAll<T>::Type
Type
;
51
};
52
53
/// specialisation of RemoveAll when the type contains const and &
54
template
<
typename
T>
55
struct
RemoveAll
<const T &> {
56
typedef
typename
RemoveAll<T>::Type
Type
;
57
};
58
/// specialisation of RemoveAll when the type contains volatile
59
template
<
typename
T>
60
struct
RemoveAll
<T volatile> {
61
typedef
typename
RemoveAll<T>::Type
Type
;
62
};
63
/// specialisation of RemoveAll when the type contains const volatile
64
template
<
typename
T>
65
struct
RemoveAll
<T const volatile> {
66
typedef
typename
RemoveAll<T>::Type
Type
;
67
};
68
/// specialisation of RemoveAll when the type contains const and *
69
template
<
typename
T>
70
struct
RemoveAll
<const T *> {
71
typedef
typename
RemoveAll<T>::Type
Type
;
72
};
73
}
// tools
74
}
// internal
75
}
// visioncpp
76
#endif
// VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_TYPE_DEREFERENCER_HPP_
visioncpp
VisionCpp namespace.
Definition:
sycl/device.hpp:24
visioncpp::internal::tools::RemoveAll< T * >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:45
visioncpp::internal::tools::RemoveAll< T & >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:40
visioncpp::internal::tools::RemoveAll< T const volatile >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:66
visioncpp::internal::tools::RemoveAll< T volatile >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:61
visioncpp::internal::tools::RemoveAll< const T >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:50
visioncpp::internal::tools::RemoveAll< const T * >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:71
visioncpp::internal::tools::RemoveAll< const T & >::Type
RemoveAll< T >::Type Type
Definition:
type_dereferencer.hpp:56
visioncpp::internal::tools::RemoveAll
These methods are used to remove all the & const and * from a type.
Definition:
type_dereferencer.hpp:34
visioncpp::internal::tools::RemoveAll::Type
T Type
Definition:
type_dereferencer.hpp:35
Generated on Thu Apr 18 2024 09:07:15 for VisionCpp by
1.9.1