cpp-common: remove unused include
[babeltrace.git] / src / cpp-common / bt2 / raw-value-proxy.hpp
CommitLineData
b3f060ed
PP
1/*
2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP
8#define BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP
9
b3f060ed
PP
10namespace bt2 {
11
12template <typename ObjT>
13class RawValueProxy
14{
15private:
16 using _RawVal = typename ObjT::Value;
17
18public:
19 explicit RawValueProxy(const ObjT obj) : _mObj {obj}
20 {
21 }
22
23 RawValueProxy& operator=(const _RawVal& rawVal)
24 {
25 _mObj.value(rawVal);
26 return *this;
27 }
28
29 operator _RawVal() const noexcept
30 {
31 return _mObj.value();
32 }
33
34private:
35 ObjT _mObj;
36};
37
b3f060ed
PP
38} /* namespace bt2 */
39
40#endif /* BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP */
This page took 0.026256 seconds and 4 git commands to generate.