mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
ArrowProxy.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <utility>
6
7
namespace
mini_llvm
{
8
9
template
<
typename
T>
10
class
ArrowProxy
{
11
public
:
12
explicit
constexpr
ArrowProxy
(T value)
13
: value_(std::move(value)) {}
14
15
template
<
typename
... Args>
16
explicit
constexpr
ArrowProxy
(std::in_place_t, Args &&...args)
17
: value_(std::forward<Args>(args)...) {}
18
19
constexpr
T *
operator->
() {
20
return
&value_;
21
}
22
23
template
<
typename
... Args>
24
static
constexpr
ArrowProxy<T>
make
(Args &&...args) {
25
return
ArrowProxy<T>
(std::in_place, std::forward<Args>(args)...);
26
}
27
28
private
:
29
T value_;
30
};
31
32
}
// namespace mini_llvm
mini_llvm::ArrowProxy::ArrowProxy
constexpr ArrowProxy(T value)
Definition
ArrowProxy.h:12
mini_llvm::ArrowProxy::operator->
constexpr T * operator->()
Definition
ArrowProxy.h:19
mini_llvm::ArrowProxy::ArrowProxy
constexpr ArrowProxy(std::in_place_t, Args &&...args)
Definition
ArrowProxy.h:16
mini_llvm::ArrowProxy::make
static constexpr ArrowProxy< T > make(Args &&...args)
Definition
ArrowProxy.h:24
mini_llvm
Definition
GraphColoringAllocator.h:13
include
mini-llvm
utils
ArrowProxy.h
Generated by
1.17.0