Boost logo

Boost :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2021-03-25 16:04:17


On 25/03/2021 15:45, Marshall Clow wrote:
> On Mar 25, 2021, at 8:06 AM, Niall Douglas via Boost <boost_at_[hidden]> wrote:
>>
>> On 16/03/2021 20:24, Marshall Clow via Boost wrote:
>>> The master branch is is now open for post-beta merges, but only as described in the Post-Beta Merge Policy.
>>> See <https://github.com/boostorg/boost/wiki/Releases%3A-Beta-Merge-Policy>
>>
>> I would like to fix https://github.com/ned14/outcome/issues/249 by
>> improving the logic at
>> https://github.com/ned14/outcome/blob/develop/include/outcome/convert.hpp#L35
>> please.
>
> Do you have a commit that fixes this?

The change is trivial. Current:

```c++
#if !defined(_MSC_VER) && !defined(__clang__) && (__GNUC__ < 9 ||
__cpp_concepts < 201907L)
#define OUTCOME_GCC6_CONCEPT_BOOL bool
#else
#define OUTCOME_GCC6_CONCEPT_BOOL
#endif
```

To be replaced with:

```c++
#if (defined(_MSC_VER) || defined(__clang__) || (defined(__GNUC__) &&
__cpp_concepts >= 201707) || OUTCOME_FORCE_STD_CXX_CONCEPTS) &&
!OUTCOME_FORCE_LEGACY_GCC_CXX_CONCEPTS
#define OUTCOME_GCC6_CONCEPT_BOOL
#else
#define OUTCOME_GCC6_CONCEPT_BOOL bool
#endif
```

To explain, GCC expects bool with concept, or not, in varying
configuration combinations which have evolved over GCC versions,
including apparently point releases, which is deeply unhelpful. This has
led to repeated bug reports for not just Outcome, but also for ASIO and
many other C++ projects.

If this above fix doesn't permanently shut this constant source of bug
reports, I'll be permanently disabling legacy GCC concepts support in
Outcome. I couldn't be arsed with supporting how unpredictably broken
GCC is with this.

Niall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk