diff --git a/include/bitcoin/system/define.hpp b/include/bitcoin/system/define.hpp index a41beced11..c47c3acf5a 100644 --- a/include/bitcoin/system/define.hpp +++ b/include/bitcoin/system/define.hpp @@ -79,16 +79,4 @@ namespace bc = libbitcoin; namespace libbitcoin { constexpr auto with_arm = false; }; #endif -/// Workarounds for C++ noncompliance. -/// --------------------------------------------------------------------------- - -/// C++17 (partial), see HAVE_EXECUTION. -#if defined(HAVE_EXECUTION) - namespace libbitcoin { constexpr auto par_unseq = std::execution::par_unseq; } - namespace libbitcoin { constexpr auto seq = std::execution::seq; } -#else - namespace libbitcoin { constexpr auto par_unseq = false; } - namespace libbitcoin { constexpr auto seq = false; } -#endif - #endif diff --git a/include/bitcoin/system/impl/hash/scrypt.ipp b/include/bitcoin/system/impl/hash/scrypt.ipp index b18dd11de1..4b74537bb1 100644 --- a/include/bitcoin/system/impl/hash/scrypt.ipp +++ b/include/bitcoin/system/impl/hash/scrypt.ipp @@ -45,9 +45,9 @@ CONSTEVAL auto& CLASS:: concurrency() NOEXCEPT { if constexpr (Concurrent) - return bc::par_unseq; + return std::execution::par; else - return bc::seq; + return std::execution::seq; } // protected @@ -499,7 +499,7 @@ CLASS::hash(data_array& out, const data_slice& password, // B[i] = scryptROMix (r, B[i], N) // end for std::atomic_bool success{ true }; - std_for_each(concurrency(), prblocks.begin(), prblocks.end(), + std::for_each(concurrency(), prblocks.begin(), prblocks.end(), [&](rblock_t& rblock) NOEXCEPT { success = success && romix(rblock); diff --git a/include/bitcoin/system/preprocessor.hpp b/include/bitcoin/system/preprocessor.hpp index ccade62d24..bd0b1f6202 100644 --- a/include/bitcoin/system/preprocessor.hpp +++ b/include/bitcoin/system/preprocessor.hpp @@ -214,18 +214,9 @@ /// C++17 (partial) #if defined(HAVE_EXECUTION) #include - #define std_any_of(p, b, e, l) std::any_of((p), (b), (e), (l)) - #define std_all_of(p, b, e, l) std::all_of((p), (b), (e), (l)) - #define std_for_each(p, b, e, l) std::for_each((p), (b), (e), (l)) - #define std_reduce(p, b, e, i, l) std::reduce((p), (b), (e), (i), (l)) - #define std_transform(p, b, e, t, l) std::transform((p), (b), (e), (t), (l)) #else + #define POOLSTL_STD_SUPPLEMENT #include - #define std_any_of(p, b, e, l) std::any_of((b), (e), (l)) - #define std_all_of(p, b, e, l) std::all_of((b), (e), (l)) - #define std_for_each(p, b, e, l) std::for_each((b), (e), (l)) - #define std_reduce(p, b, e, i, l) std::reduce((b), (e), (i), (l)) - #define std_transform(p, b, e, t, l) std::transform((b), (e), (t), (l)) #endif /// C++20 (partial) diff --git a/test/hacks.cpp b/test/hacks.cpp index 4c521e17d6..fb940d1ad2 100644 --- a/test/hacks.cpp +++ b/test/hacks.cpp @@ -19,7 +19,7 @@ #include "test.hpp" #include -#if defined(DISABLED) && defined(HAVE_EXECUTION) +#if defined(DISABLED) BOOST_AUTO_TEST_SUITE(skip_parser_tests)