[libcxx-commits] [PATCH] D108630: [libc++] Remove _LIBCPP_HAS_NO_LONG_LONG in favour of using_if_exists

Dimitry Andric via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 2 04:20:22 PDT 2021


dim accepted this revision.
dim added a comment.

In D108630#2979220 <https://reviews.llvm.org/D108630#2979220>, @dim wrote:

> Hmm I have applied this on top of our existing libc++ headers, but if I compile a simple program using e.g. `-std=c++98` I immediately get errors due to missing declarations:

...

> But I think this is because my current clang is still 12.0.1? Was `using_if_exists` only added after 13.0.0 ?

Ah yes indeed, with clang 13 it does work (it's a pity there's no fallback attribute). In any case, if FreeBSD updates to the next version of libc++ it will always be in combination with the corresponding version of clang (and the rest of llvm-project), so in practice it shouldn't be problem, at least for clang users.

Maybe this could give issues for gcc users though, as we sometimes tell people to use libc++ headers so as to avoid incompatibilities between linking libstdc++ and libc++ compiled code (which is isn't supported). Does gcc have any `using_if_exists` attribute? @emaste is the gcc user case important enough? (I can imagine ports maintainers complaining about this)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108630



More information about the libcxx-commits mailing list