[libcxx-commits] [PATCH] D104458: [libc++] Make feature-test macros consistent with availability macros

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 17 06:31:36 PDT 2021


ldionne created this revision.
Herald added subscribers: jfb, arichardson.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Before this patch, feature-test macros didn't take special availability
markup into account, which means that feature-test macros can sometimes
appear to "lie". For example, if you compile in C++20 mode and target
macOS 10.13, the __cpp_lib_filesystem feature-test macro will be provided
even though the <filesystem> declarations are marked as unavailable.
This patch fixes that.

rdar://68142369

(cherry picked from commit 76fc35752d19ac605c1c1fd757af9c7c3bb4a906 <https://reviews.llvm.org/rG76fc35752d19ac605c1c1fd757af9c7c3bb4a906>)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104458

Files:
  libcxx/include/__availability
  libcxx/include/version
  libcxx/test/std/input.output/filesystems/fs.req.macros/feature_macro.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104458.352702.patch
Type: text/x-patch
Size: 43736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210617/0b4c2ab0/attachment-0001.bin>


More information about the libcxx-commits mailing list