- 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.