Skip to content

Commit c19a819

Browse files
authored
[libc++] protect absent atomic types with ifdef (#82351)
Otherwise modules.std-module.sh.cpp test fails with following error: error: no member named 'atomic_signed_lock_free' in namespace 'std' when the types are not available.
1 parent c88beb4 commit c19a819

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxx/modules/std/atomic.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ export namespace std {
111111
using std::atomic_uintmax_t;
112112
using std::atomic_uintptr_t;
113113

114+
#ifndef _LIBCPP_NO_LOCK_FREE_TYPES
114115
using std::atomic_signed_lock_free;
115116
using std::atomic_unsigned_lock_free;
117+
#endif
116118

117119
// [atomics.flag], flag type and operations
118120
using std::atomic_flag;

0 commit comments

Comments
 (0)