로딩중...
검색중...
일치하는것 없음
tres.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include "tmay.hpp"
5
6namespace by {
7
34 template <typename T, typename R> class tres: public tmay<T> {
35 typedef tres<T, R> __me__;
36 BY(ME(__me__, tmay<T>))
37
38 public:
39 tres() = default;
40 explicit tres(const T& value);
41 explicit tres(const R& value);
42
43 public:
51 const R& getErr() const BY_CONST_FUNC(getErr())
55 void rel() override;
63 void setErr(const R& arg);
64
65 private:
66 std::optional<R> _err;
67 };
68}
Optional value wrapper for error indication without exceptions
Definition tmay.hpp:50
Template result container with typed error information
Definition tres.hpp:34
const R & getErr() const BY_CONST_FUNC(getErr()) void rel() override
Releases/clears both the contained value and the error, making the instance empty.
void setErr(const R &arg)
Sets the contained error and clears any existing value.
R & getErr()
Gets the contained error.
void set(const T &arg) override
Sets the contained value and clears any existing error.
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34