Iros
Loading...
Searching...
No Matches
to_address.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/meta/language.h
"
4
5
namespace
di::util
{
6
namespace
detail
{
7
struct
ToAddressFunction
{
8
template
<
typename
T>
9
requires
(!
concepts::LanguageFunction<T>
)
10
constexpr
auto
operator
()(T* pointer)
const
-> T* {
11
return
pointer;
12
}
13
14
template
<
typename
T>
15
requires
(
requires
(T
const
& pointer) { pointer.operator->(); })
16
constexpr
auto
operator
()(T
const
& pointer)
const
{
17
return
(*
this
)(pointer.operator->());
18
}
19
};
20
}
21
22
constexpr
inline
auto
to_address
=
detail::ToAddressFunction
{};
23
}
24
25
namespace
di
{
26
using
util::to_address
;
27
}
di::concepts::LanguageFunction
Definition
language.h:64
language.h
di::util::detail
Definition
clamp.h:9
di::util
Definition
vocab.h:96
di::util::to_address
constexpr auto to_address
Definition
to_address.h:22
di
Definition
zstring_parser.h:9
di::util::detail::ToAddressFunction
Definition
to_address.h:7
libs
di
include
di
util
to_address.h
Generated by
1.13.0