tres.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
tmay.hpp
"
5
6
namespace
by {
7
13
template
<
typename
T,
typename
R>
class
tres
:
public
tmay
<T> {
14
typedef
tres<T, R>
__me__
;
15
BY(ME(
__me__
,
tmay<T>
))
16
17
public
:
18
tres
() =
default
;
19
explicit
tres
(
const
T& value);
20
explicit
tres
(
const
R& value);
21
22
public
:
23
R& getErr();
24
const
R& getErr()
const
BY_CONST_FUNC(getErr())
25
26
void
rel()
override
;
27
28
void
set(
const
T& arg)
override
;
29
void
setErr(
const
R& arg);
30
31
private
:
32
std::optional<R> _err;
33
};
34
}
by::tmay
Optional value wrapper with byeol-style interface.
Definition:
tmay.hpp:18
by::tres
Template result container with error handling capabilities.
Definition:
tres.hpp:13
tmay.hpp