[libcxx-commits] [libcxx] [libc++] Use availability to rely on key functions for bad_expected_access and bad_function_call (PR #87390)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 5 02:38:07 PDT 2024
================
@@ -27,10 +28,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Err>
class bad_expected_access;
+# if !_LIBCPP_AVAILABILITY_HAS_BAD_EXPECTED_ACCESS_KEY_FUNCTION
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
+# endif
----------------
philnik777 wrote:
```suggestion
_LIBCPP_DIAGNOSTIC_PUSH
# if !_LIBCPP_AVAILABILITY_HAS_BAD_EXPECTED_ACCESS_KEY_FUNCTION
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
# endif
```
Then we also don't have to guard the pop after the class.
https://github.com/llvm/llvm-project/pull/87390
More information about the libcxx-commits
mailing list