emlabcpp
modern opinionated embedded C++ library
result.h
Go to the documentation of this file.
1
#pragma once
23
24
#include "
./algorithm.h
"
25
#include "
./status.h
"
26
27
#include <cstdint>
28
29
namespace
emlabcpp
30
{
31
32
enum class
result_e
: uint8_t
33
{
34
SUCCESS
= 0,
35
ERROR
= 1,
36
};
37
41
struct
[[nodiscard]]
result
:
status
< result, result_e >
42
{
43
constexpr
result
(
result_e
s ) noexcept
44
:
status
( s )
45
{
46
}
47
using
enum
result_e
;
48
};
49
50
}
// namespace emlabcpp
algorithm.h
emlabcpp
MIT License.
Definition:
impl.h:31
emlabcpp::result_e
result_e
Definition:
result.h:33
emlabcpp::result_e::ERROR
@ ERROR
emlabcpp::result_e::SUCCESS
@ SUCCESS
status.h
emlabcpp::result
result represents an result of some operation, as an alternative to returning just bool with true/fal...
Definition:
result.h:42
emlabcpp::result::result
constexpr result(result_e s) noexcept
Definition:
result.h:43
emlabcpp::status
Definition:
status.h:31
include
emlabcpp
result.h
Generated on Sun Jul 27 2025 20:01:11 for emlabcpp by
1.9.1