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
8namespace capy::meta
9{
10
11template<typename T, const T& Ref>
12 requires std::is_const_v<T>
14{
15public:
16 using ReferentType = T;
17 using ReferenceType = const T&;
18 using ConstReferenceType = const T&;
19
20public:
21 constexpr operator ConstReferenceType() const noexcept
22 {
23 return Ref;
24 }
25};
26
27}
28
29#endif // !CONSTEXPR_REF_HPP_
Definition Rebind.hpp:7
Definition ConstexprRef.hpp:14
const T & ReferenceType
Definition ConstexprRef.hpp:17
T ReferentType
Definition ConstexprRef.hpp:16
const T & ConstReferenceType
Definition ConstexprRef.hpp:18