capydi
Loading...
Searching...
No Matches
ConstexprRef.hpp
Go to the documentation of this file.
1
#ifndef CONSTEXPR_REF_HPP_
2
#define CONSTEXPR_REF_HPP_
3
4
#include "
Reference.hpp
"
5
6
#include <type_traits>
7
8
namespace
capy::meta
9
{
10
11
template
<
typename
T, const T& Ref>
12
requires
std::is_const_v<T>
13
struct
ConstexprRef
14
{
15
public
:
16
using
ReferentType
= T;
17
using
ReferenceType
=
const
T&;
18
using
ConstReferenceType
=
const
T&;
19
20
public
:
21
constexpr
operator
ConstReferenceType
() const noexcept
22
{
23
return
Ref;
24
}
25
};
26
27
}
28
29
#endif
// !CONSTEXPR_REF_HPP_
Reference.hpp
capy::meta
Definition
Rebind.hpp:7
capy::meta::ConstexprRef
Definition
ConstexprRef.hpp:14
capy::meta::ConstexprRef::ReferenceType
const T & ReferenceType
Definition
ConstexprRef.hpp:17
capy::meta::ConstexprRef::ReferentType
T ReferentType
Definition
ConstexprRef.hpp:16
capy::meta::ConstexprRef::ConstReferenceType
const T & ConstReferenceType
Definition
ConstexprRef.hpp:18
core
capymeta
include
capymeta
primitives
referencing
ConstexprRef.hpp
Generated by
1.15.0