[libcxx-commits] [PATCH] D106763: [libc++][RFC] Disable incomplete library features.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 27 12:52:08 PDT 2021
Quuxplusone added a comment.
FWIW, my general reaction is that this patch does more harm (to end-users) than good. But (1) it's above my pay grade, and (2) from the end-user's perspective, Clang 13 won't be any //less// featureful than Clang 12; it'll just be more self-deprecatingly whiny about its continued lack of features.
Consider that `__has_include(<format>)` will now return the "wrong" value; it would be better and simpler if you could just figure out a way to stop the build system from installing that header in `include/c++/v1/` at all. However, this is not a new problem: e.g., `__has_include(<variant>)` already has the "wrong" value in C++03/11/14 mode; we definitely have no way to fix that.
================
Comment at: libcxx/include/format:64
+#if defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# error "The Format library is not supported by this configuration of libc++"
+#endif
----------------
Mordante wrote:
> ldionne wrote:
> > Maybe this should say something like `The Format library is not complete and stable yet, so this configuration of libc++ does not allow its usage.`. Or anything else that explains a bit _why_ it's not supported (otherwise users tend to be angry).
> I'm not objecting against making the text a bit more verbose. I just looked at what similar code did. I'll make a separate patch to improve these places.
`#error "This configuration of libc++ was built without support for C++20 <format> because its ABI is not yet stable."`
and below
`#error "This configuration of libc++ was built without support for C++20 <ranges> because its ABI is not yet stable."`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106763/new/
https://reviews.llvm.org/D106763
More information about the libcxx-commits
mailing list