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
6namespace std {
7// This uses a compiler builtin because user-defined types can overload operator&.
8template<typename T>
9constexpr auto addressof(T& value) -> T* {
10 return __builtin_addressof(value);
11}
12
13// Disallow getting the address of a temporary.
14template<class T>
15auto addressof(T const&&) -> T* = delete;
16}
17#endif
18
19namespace di::util {
20using std::addressof;
21}
22
23namespace di {
24using util::addressof;
25}
Definition vocab.h:96
Definition zstring_parser.h:9
Definition enable_generate_structed_bindings.h:46
@ T
Definition key.h:29