Skip to content

Commit

Permalink
[ci] Fix a jthread bug with clang 18
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 3, 2024
1 parent 4b93c8b commit 64f3256
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ossia/detail/jthread.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#pragma once
#include <version>

#if __cpp_lib_jthread >= 201911L
#define OSSIA_HAS_STD_JTHREAD 1

#elif _LIBCPP_VERSION >= 18100
#if defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
#error Rebuild with -fexperimental-library, clang 18 ships headers which are incompatible with this file but hides half of them behind that flag
#else
#define OSSIA_HAS_STD_JTHREAD 1
#endif
#endif

#if OSSIA_HAS_STD_JTHREAD
#include <stop_token>
#include <thread>
#else
Expand Down

0 comments on commit 64f3256

Please sign in to comment.