[libc-commits] [PATCH] D139939: [libc] Make string functions buildable with GCC

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Dec 19 05:39:27 PST 2022


gchatelet added a comment.

In D139939#4004243 <https://reviews.llvm.org/D139939#4004243>, @sivachandra wrote:

> In D139939#4000931 <https://reviews.llvm.org/D139939#4000931>, @gchatelet wrote:
>
>> @sivachandra let me know if you prefer this version or the previous one.
>
> LGTM; Could we make the alternate paths simply a failing `static_assert`?

I wish I could but this would result in a compilation failure.
There's a proposal to support this use case but it's not currently implemented.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2593r0.html

Let me know if you prefer the preprocessor solution that adds more safety at the cost of less readable code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139939/new/

https://reviews.llvm.org/D139939



More information about the libc-commits mailing list