philnik777 wrote:

> I can see WG21 solving this either by removing `unreachable` from `cstddef` 
> or by requiring `utility` to guard against the macro via implementation magic 
> (personally, I think `utility` should guard against it because of users 
> including `stddef.h` directly) and it would be nice to know which direction 
> the committee is leaning before we get too far into a solution.

I'm not sure whether you mean it, but I'd expect that it's handled like 
`signbit` and friends - they are functions instead of macros. For libc++ that 
would simply be `#undef unreachable`,  `#include <__utility/unreachable.h>` and 
`using std::unreachable`.


https://github.com/llvm/llvm-project/pull/86748
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to