Support Class Library
A set of tools providing classes and utility
include
scl
tools
meta
real_const.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
scl/tools/meta/enable_if.h
>
4
#include <
scl/tools/meta/type_mod.h
>
5
#include <
scl/tools/meta/type_check.h
>
6
#include <
scl/macros.h
>
7
8
namespace
scl
{
9
namespace
tools {
10
namespace
meta{
15
template
<
class
T,
class
=
void
>
16
struct
real_const
{
21
using
type
=
const
decay_t<remove_cv_ref_t<T>
>;
22
};
23
28
template
<
class
T>
29
struct
real_const
<T*,
void
>{
30
using
type
=
realConst
(T*);
31
};
32
33
/*template <class T>
34
struct real_const<T, enable_if_t<
35
is_pointer<remove_cv_ref_t<T>>()
36
>>{
37
using type = realConst(remove_cv_ref_t<T>);
38
};*/
39
40
41
template
<
class
T>
42
using
real_const_t
=
typename
real_const<T>::type
;
43
}
44
}
45
}
scl::tools::meta::real_const
Get the appropriate const version of a type.
Definition:
real_const.h:16
scl::tools::meta::decay_t
typename std::decay< T >::type decay_t
Definition:
type_mod.h:33
scl::tools::meta::real_const< T *, void >::type
const T *const type
Definition:
real_const.h:30
scl::tools::meta::real_const::type
const decay_t< remove_cv_ref_t< T > > type
The const version of the argument type.
Definition:
real_const.h:21
scl
Global namespace of the SCL.
Definition:
alias.hpp:3
realConst
#define realConst(type)
Definition:
macros.h:3
scl::tools::meta::real_const_t
typename real_const< T >::type real_const_t
Definition:
real_const.h:42
macros.h
type_mod.h
type_check.h
enable_if.h
Generated by
1.8.13