[libcxx-commits] [PATCH] D146228: [libc++] Granularize __mutex_base
Mikhail Maltsev via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 23 08:36:11 PDT 2023
miyuki added a comment.
Hi. This change causes failures in one of our configurations, compiled with `_LIBCPP_HAS_NO_THREADS`. Compilation of mutex.cpp fails with the following error:
[2023-03-22T20:37:03.871Z] In file included from /workspace/workspace/armcompiler/next/toolchain/src/llvm-project/libcxx/src/mutex.cpp:11:
[2023-03-22T20:37:03.871Z] In file included from /workspace/workspace/armcompiler/next/toolchain/build/libcxx_libcxxabi_libunwind/armv8.1m.main_hard_nofp_mve_armlibc/src/libcxx_libcxxabi_libunwind_armv8.1m.main_hard_nofp_mve_armlibc-build/include/c++/v1/mutex:192:
[2023-03-22T20:37:03.871Z] /workspace/workspace/armcompiler/next/toolchain/build/libcxx_libcxxabi_libunwind/armv8.1m.main_hard_nofp_mve_armlibc/src/libcxx_libcxxabi_libunwind_armv8.1m.main_hard_nofp_mve_armlibc-build/include/c++/v1/__condition_variable/condition_variable.h:94:44: error: no template named 'is_floating_point'; did you mean 'std::is_floating_point'?
[2023-03-22T20:37:03.871Z] inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<is_floating_point<_Rep>::value, chrono::nanoseconds>
[2023-03-22T20:37:03.871Z] ^~~~~~~~~~~~~~~~~
[2023-03-22T20:37:03.871Z] std::is_floating_point
This happens because in the file __condition_variable/condition_variable.h, the `_LIBCPP_BEGIN_NAMESPACE_STD` line is guarded with `#ifndef _LIBCPP_HAS_NO_THREADS` so when the file is used with `_LIBCPP_HAS_NO_THREADS` the function `__safe_nanosecond_cast` gets defined in the global namespace (instead of `std`) from which `is_floating_point` is not accessible via unqualified lookup.
Could you please fix this issue?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146228/new/
https://reviews.llvm.org/D146228
More information about the libcxx-commits
mailing list