- Outcome.Experimental has had C representation support since the beginning, however it had
been mainly intended that C++ would originate Results, they would pass through C, and back
into C++. It hadn't really been expected that C would want to do much with Results other than
inspect them for happy or sad path.
It turns out there is more demand than expected for a more functional Result from within C,
so this release adds the power to create Results in success and two types of failure, semantic
comparison of Results, and printing of Result messages. You can also wrap a C enum into a
quick status code from enum, allowing easy custom C error coding from 100% within C.
[The documentation for the C support]({{% relref "../experimental/c-api" %}}) has been updated
to reflect the new facilities.
2024-07-16 21:03:04 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
been mainly intended that C++ would originate Results, they would pass through C, and back
into C++. It hadn't really been expected that C would want to do much with Results other than
inspect them for happy or sad path.
It turns out there is more demand than expected for a more functional Result from within C,
so this release adds the power to create Results in success and two types of failure, semantic
comparison of Results, and printing of Result messages. You can also wrap a C enum into a
quick status code from enum, allowing easy custom C error coding from 100% within C.
[The documentation for the C support]({{% relref "../experimental/c-api" %}}) has been updated
to reflect the new facilities.
2024-07-16 21:39:48 +01:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
Fixes#293
- Some users wished that Outcome would be clean with `-Wpedantic`, this is now turned on for
the test suite.
Fixes#294
- All use of `assert()` has been replaced with `OUTCOME_ASSERT`, which can be user overridden
at compile time.
Fixes#295
- In git commit 12b14e1533 (Aug 11 2022) status code had its
paths changed due to its headers not previously having the right path convention. It was not
realised at the time that in Boost.Outcome this resulted in
`<boost/outcome/experimental/status-code/status-code/headers.hpp>` which is not desirable.
This has now been remedied to remove the double `status-code`, which will obviously break
any Boost.Outcome code which relies on the double `status-code`. Standalone Outcome is unaffected.
2023-12-16 21:13:43 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
- Some users wished that Outcome would be clean with `-Wpedantic`, this is now turned on for
the test suite.
Fixes#294
- All use of `assert()` has been replaced with `OUTCOME_ASSERT`, which can be user overridden
at compile time.
Fixes#295
- In git commit 12b14e1533 (Aug 11 2022) status code had its
paths changed due to its headers not previously having the right path convention. It was not
realised at the time that in Boost.Outcome this resulted in
`<boost/outcome/experimental/status-code/status-code/headers.hpp>` which is not desirable.
This has now been remedied to remove the double `status-code`, which will obviously break
any Boost.Outcome code which relies on the double `status-code`. Standalone Outcome is unaffected.
2023-12-16 20:51:26 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
A Result or Outcome with `void` value type and move-only non-value type was only usable in
const use cases, due to the lack of provision of non-const member functions in relevant observers
injection layers for the `void` specialisation. The missing non-const member functions have now
been added. Fixes#291.
2023-11-17 09:20:02 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
const use cases, due to the lack of provision of non-const member functions in relevant observers
injection layers for the `void` specialisation. The missing non-const member functions have now
been added. Fixes#291.
Restore Experimental Outcome constexpr compatibility in C++ 20 which was an undocumented property of the Outcome v2.1 series, and which had been dropped in the v2.2 series (issue #255)
2021-10-29 13:30:18 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
Fix previous commit of CMakeLists.txt for Boost.Outcome test. Also workaround Boost conversion for test issue0203, and disable for Boost test issue0182.
2021-07-17 13:39:36 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
BREAKING CHANGE [#247](https://github.com/ned14/outcome/issues/247)
Previously the value of "spare_storage(const basic_result|basic_outcome *) noexcept" was
not propagated over `OUTCOME_TRY`, which causes things like stack backtraces captured at the point of
construction of an errored result to get dropped at every `TRY` point. This has been fixed by adding
an optional `spare_storage` to "success_type<T>" and "failure_type<T>"}, as well
as to "auto success(T &&, ...)" and "auto failure(T &&, ...)".
You should not notice this in your code, except that where before spare storage values did not
propagate through TRY, now they do, which is a breaking change.
2021-02-23 22:41:03 +00:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)