Feature detection placeholders

This commit is contained in:
Denis Blank 2018-01-24 23:05:23 +01:00
parent ca5d0a6e29
commit 9286cfa8cc
2 changed files with 12 additions and 6 deletions

View File

@ -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

View File

@ -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;