Iros
Loading...
Searching...
No Matches
addressof.h
Go to the documentation of this file.
1
#pragma once
2
3
#ifndef DI_NO_USE_STD
4
#include <memory>
5
#else
6
namespace
std
{
7
// This uses a compiler builtin because user-defined types can overload operator&.
8
template
<
typename
T>
9
constexpr
auto
addressof(T& value) ->
T
* {
10
return
__builtin_addressof(value);
11
}
12
13
// Disallow getting the address of a temporary.
14
template
<
class
T>
15
auto
addressof(T
const
&&) ->
T
* =
delete
;
16
}
17
#endif
18
19
namespace
di::util
{
20
using
std::addressof;
21
}
22
23
namespace
di
{
24
using
util::addressof;
25
}
di::util
Definition
vocab.h:96
di
Definition
zstring_parser.h:9
std
Definition
enable_generate_structed_bindings.h:46
ttx::Key::T
@ T
Definition
key.h:29
libs
di
include
di
util
addressof.h
Generated by
1.13.0