Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
Execution.h
Go to the documentation of this file.
1
#pragma once
2
3
// std::execution policies where the standard library provides them, and sequential stand-ins
4
// where it does not. libc++ ships <execution> without the policies unless its experimental
5
// PSTL is enabled, which is what Emscripten builds against. The engine only ever asks for seq
6
// (see the note above FxScene::step), so the stand-in loses nothing.
7
#include <version>
8
9
#if defined(__cpp_lib_execution)
10
#include <execution>
11
#define FX2D_HAS_EXECUTION_POLICIES 1
12
#else
13
#include <algorithm>
14
#define FX2D_HAS_EXECUTION_POLICIES 0
15
namespace
std::execution {
16
struct
sequenced_policy {};
17
inline
constexpr
sequenced_policy seq{};
18
}
// namespace std::execution
19
#endif
include
Fx2D
Execution.h
Generated by
1.9.8