|
WG14 result
|
(C) 2024 - 2026 Niall Douglas http://www.nedproductions.biz/
Reference API docs: https://ned14.github.io/wg14_result/
Can be configured to be a standard library implementation for your standard C library runtime. Licensed permissively.
This is a 100% C reimplementation of https://ned14.github.io/outcome/experimental/, created as Outcome.Experimental is now on the WG14 C standardisation track and I no longer participate on WG21 (C++ standards). Features:
virtual function into a C implementation, or vice versa.This library should work well on any POSIX implementation, as well as Microsoft Windows. You will need a minimum of C 11 in your toolchain to compile the library, however its header files work in all standards of C right back to C 90 (NOTE that some macros do use features from later C standards, if on an earlier C then don't use that macro).
Current CI test targets:
Current compilers:
You can find a number of user definable macros to override in config.h. They have sensible defaults on the major platforms and toolchains.
status_code_errored, without Contracts it doesn't really make sense.status_code mixins, which require template trait based inheritance to be easy to use.quick_status_code_from_enum would need C compiler magic to work I think. Not ruling that out at all, but it's definitely a later proposal paper.system_code_from_exception makes no sense without C++ exceptions.todo
todo
todo
status_code_domainstatus_code<void> as status_code_untypedstatus_code_genericstatus_code(T)status_code_posixstatus_code_systemresult(T)TRY macrosstatus_code_nestedstatus_code_getaddrinfostatus_code_httpstatus_code_win32status_code_ntstatus_code_comstatus_code_cxx_error_codestatus_code_boost_error_code