capydi
Loading...
Searching...
No Matches
Reference.hpp
Go to the documentation of this file.
1#ifndef REFERENCE_HPP_
2#define REFERENCE_HPP_
3
4#include <concepts>
5
6namespace capy::meta
7{
8
9template<typename Reference_, typename Referent>
10concept Reference =
11 requires() {
12 typename Reference_::ReferentType;
13 typename Reference_::ReferenceType;
14 typename Reference_::ConstReferenceType;
15 }
16 && std::same_as<typename Reference_::ReferentType, Referent>
17 && std::same_as<typename Reference_::ReferenceType, Referent&>
18 && std::same_as<typename Reference_::ConstReferenceType, const Referent&>
19 && std::convertible_to<Reference_, typename Reference_::ReferenceType>
20 && std::convertible_to<Reference_, typename Reference_::ConstReferenceType>;
21
22}
23
24#endif // !REFERENCE_HPP_
Definition Reference.hpp:10
Definition Rebind.hpp:7