mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Feature detection placeholders
This commit is contained in:
parent
ca5d0a6e29
commit
9286cfa8cc
@ -55,10 +55,17 @@
|
|||||||
#undef CONTINUABLE_WITH_EXCEPTIONS
|
#undef CONTINUABLE_WITH_EXCEPTIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// TODO Enable this
|
#if defined(__has_feature)
|
||||||
#undef CONTINUABLE_HAS_CXX17_CONSTEXPR_IF
|
#if __has_feature(cxx_if_constexpr)
|
||||||
/// TODO Enable this
|
// PR not merged into the clang master yet
|
||||||
#undef CONTINUABLE_HAS_CXX17_FOLD_EXPRESSION
|
#define CONTINUABLE_HAS_CXX17_CONSTEXPR_IF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __has_feature(cxx_fold_expressions)
|
||||||
|
// PR not merged into the clang master yet
|
||||||
|
#define CONTINUABLE_HAS_CXX17_FOLD_EXPRESSION
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/// This is enabled by the CMake project
|
/// This is enabled by the CMake project
|
||||||
// #undef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
// #undef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
||||||
|
|||||||
@ -207,8 +207,7 @@ auto make_step(T* me, unsigned& current, unsigned step) {
|
|||||||
|
|
||||||
#if !defined(CONTINUABLE_WITH_NO_EXCEPTIONS)
|
#if !defined(CONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||||
struct test_exception : std::exception {
|
struct test_exception : std::exception {
|
||||||
explicit test_exception() {
|
explicit test_exception() = default;
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(test_exception const&) const noexcept {
|
bool operator==(test_exception const&) const noexcept {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user