|
Common System 0.2.0
Common interfaces and patterns for system integration
|
C++20 module partition for Result<T> core types. More...
#include <optional>#include <sstream>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <variant>
Go to the source code of this file.
Classes | |
| struct | kcenon::common::source_location |
| C++17-compatible source_location implementation using compiler builtins. More... | |
| struct | kcenon::common::error_info |
| Standard error information used by Result<T>. More... | |
| class | kcenon::common::Result< T > |
| Result type for error handling with member function support. More... | |
| class | kcenon::common::Optional< T > |
| Optional type similar to std::optional with Rust-like API. More... | |
Namespaces | |
| namespace | kcenon |
| namespace | kcenon::common |
| Core interfaces. | |
Macros | |
| #define | KCENON_MODULE_HAS_SOURCE_LOCATION 0 |
Enumerations | |
| enum class | kcenon::common::result_state { kcenon::common::uninitialized , kcenon::common::ok , kcenon::common::error , kcenon::common::uninitialized , kcenon::common::ok , kcenon::common::error } |
| Result state enum for tracking initialization. More... | |
Functions | |
| template<typename T > | |
| Optional< T > | kcenon::common::Some (T value) |
| Create an Optional with value. | |
| template<typename T > | |
| Optional< T > | kcenon::common::None () |
| Create an empty Optional. | |
| VoidResult | kcenon::common::ok () |
| Create a successful void result. | |
| VoidResult | kcenon::common::err (const error_info &error) |
| Factory function to create error VoidResult. | |
| VoidResult | kcenon::common::err (int code, const std::string &message, const std::string &module="") |
| Factory function to create error VoidResult. | |
C++20 module partition for Result<T> core types.
This module partition exports core Result pattern types:
Part of the kcenon.common module.
Definition in file core.cppm.