*/
#ifndef _GLIBCXX_LATCH
-#define _GLIBCXX_LATCH
+#define _GLIBCXX_LATCH 1
#pragma GCC system_header
#if __cplusplus > 201703L
-#define __cpp_lib_latch 201907L
#include <bits/atomic_base.h>
#include <ext/numeric_traits.h>
+#if defined _GLIBCXX_HAS_GTHREADS || _GLIBCXX_HAVE_LINUX_FUTEX
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#define __cpp_lib_latch 201907L
+
class latch
{
public:
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+#endif // GTHREADS || LINUX_FUTEX
#endif // __cplusplus > 201703L
#endif // _GLIBCXX_LATCH
#ifdef _GLIBCXX_HAS_GTHREADS
# define __cpp_lib_jthread 201911L
#endif
-#define __cpp_lib_latch 201907L
+#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
+# define __cpp_lib_latch 201907L
+#endif
#define __cpp_lib_list_remove_return_type 201806L
#if __cpp_lib_concepts
# define __cpp_lib_make_obj_using_allocator 201811L
#if __cpp_lib_concepts
# define __cpp_lib_ranges 201911L
#endif
-#if defined _GLIBCXX_HAS_GTHREADS || _GLIBCXX_HAVE_LINUX_FUTEX
+#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
# define __cpp_lib_semaphore 201907L
#endif
#define __cpp_lib_shift 201806L