{"sha":"2f4037b5454a53f3cfb9c201d8cac8edf7b33655","node_id":"C_kwDOAiB0YNoAKDJmNDAzN2I1NDU0YTUzZjNjZmI5YzIwMWQ4Y2FjOGVkZjdiMzM2NTU","commit":{"author":{"name":"Sean Parent","email":"sean.parent@stlab.cc","date":"2024-03-15T00:12:55Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2024-03-15T00:12:55Z"},"message":"namespace version bump (#541)\n\nBumping the inline namespace version to v2 to avoid ODR violations.\r\nThe pre_exit code remains at v1 (it must be bumped more carefully).\r\nThe portable default executor is moving to v2 - which may lead to more than one thread pool for the portable instance. Pinning the version here is more difficult.\r\nRemoved dead reset() operations in future shared_base\r\nDocumented (and assert) precondition that future::exception() is only invoked on a ready exception.\r\nMade more of the tuple meta-facilities public to avoid detail:: namespace usage in unit tests.\r\nRestructured unit tests to avoid sleep-wait-loops.","tree":{"sha":"08c51dafae3d26bccb20983d9240e819f05ca549","url":"https://api.github.com/repos/stlab/stlab/git/trees/08c51dafae3d26bccb20983d9240e819f05ca549"},"url":"https://api.github.com/repos/stlab/stlab/git/commits/2f4037b5454a53f3cfb9c201d8cac8edf7b33655","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJl85KHCRC1aQ7uu5UhlAAAaQgQACPEgbzztVZ4PTT1k7MNP+mz\nVryXXsDdXuHbvQ3uuaIjJzD1pmw9pO4u1gFpnYjVYnxPMm6KolQeUYGAaysIW8ZE\ntz8ZtSKCSxBGNgiqxDDwYFOPYYuqim0MVM6ewMlOhbQCKY0NJSyvMsklFa7eYZXk\nKtyqucJ0XDFG141/I/M6DI7bwhuTmRMZOCTomV8gY+xhvy9ZGNLOw9oHTMAe6Bkk\nea/WHtGrKmnFmWrfkQOQpfW3/hR7Z/yzaymJKO6/sUj/BDXNKroiSPSMcOlEk2xZ\n6AVoeacGNlldPtWAMqzevTEEM591NCl3q2BHcwh1ZrWPEn2bsRUQyOuoVferazs8\ntZuI2zfVH17xeY+Lb/38G9JB3EuMe7eQ/xT8pZHZOJIh/9h2/1E/Q6F3B6nNsg+k\n3gRLlQ30Tekk2BIhhct1M1vkU70ERuqsLIGFx/PB5QSuLWVwM5N8RhPhMUZhr2jH\nKtKRUp8dWPo+8+m91zBS8MN50z4Q29jhGZ7N2MROT4kbCm9TLyUYqAU3u72gqw7i\ns/KRK8E+qH91e8InbyBCFUZuGzGvhC4cF8IXOJQnCm+gA5infdaxyXoKjiFw1ZAz\ntP3rBegmjy1u/Q+B8+pRGV7D9A0vW/uofJXYe41mIvOHW+owSsnac/yNZK+6jRXa\n8W5POTrveII1S7xeTscu\n=jybp\n-----END PGP SIGNATURE-----\n","payload":"tree 08c51dafae3d26bccb20983d9240e819f05ca549\nparent 3409d0eaede2f78bc80a3ecbc4e6aa9b4a1e2e48\nauthor Sean Parent <sean.parent@stlab.cc> 1710461575 -0700\ncommitter GitHub <noreply@github.com> 1710461575 -0700\n\nnamespace version bump (#541)\n\nBumping the inline namespace version to v2 to avoid ODR violations.\r\nThe pre_exit code remains at v1 (it must be bumped more carefully).\r\nThe portable default executor is moving to v2 - which may lead to more than one thread pool for the portable instance. Pinning the version here is more difficult.\r\nRemoved dead reset() operations in future shared_base\r\nDocumented (and assert) precondition that future::exception() is only invoked on a ready exception.\r\nMade more of the tuple meta-facilities public to avoid detail:: namespace usage in unit tests.\r\nRestructured unit tests to avoid sleep-wait-loops.","verified_at":"2024-11-07T16:47:51Z"}},"url":"https://api.github.com/repos/stlab/stlab/commits/2f4037b5454a53f3cfb9c201d8cac8edf7b33655","html_url":"https://github.com/stlab/stlab/commit/2f4037b5454a53f3cfb9c201d8cac8edf7b33655","comments_url":"https://api.github.com/repos/stlab/stlab/commits/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/comments","author":{"login":"sean-parent","id":2279724,"node_id":"MDQ6VXNlcjIyNzk3MjQ=","avatar_url":"https://avatars.githubusercontent.com/u/2279724?v=4","gravatar_id":"","url":"https://api.github.com/users/sean-parent","html_url":"https://github.com/sean-parent","followers_url":"https://api.github.com/users/sean-parent/followers","following_url":"https://api.github.com/users/sean-parent/following{/other_user}","gists_url":"https://api.github.com/users/sean-parent/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-parent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-parent/subscriptions","organizations_url":"https://api.github.com/users/sean-parent/orgs","repos_url":"https://api.github.com/users/sean-parent/repos","events_url":"https://api.github.com/users/sean-parent/events{/privacy}","received_events_url":"https://api.github.com/users/sean-parent/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"3409d0eaede2f78bc80a3ecbc4e6aa9b4a1e2e48","url":"https://api.github.com/repos/stlab/stlab/commits/3409d0eaede2f78bc80a3ecbc4e6aa9b4a1e2e48","html_url":"https://github.com/stlab/stlab/commit/3409d0eaede2f78bc80a3ecbc4e6aa9b4a1e2e48"}],"stats":{"total":867,"additions":405,"deletions":462},"files":[{"sha":"ba070de97f8dc08113af1fd615c9afcbe43fe5fc","filename":"README.md","status":"modified","additions":1,"deletions":0,"changes":1,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/README.md","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/README.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/README.md?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -74,6 +74,7 @@ cmake -S . -B ../BUILD -GNinja -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Releas\n If you organize the build directory into subdirectories you can support multiple configurations.\n \n ```\n+rm -rf ../builds/portable\n cmake -S . -B ../builds/portable -GXcode -DCMAKE_CXX_STANDARD=17 -DBUILD_TESTING=ON -DSTLAB_TASK_SYSTEM=portable -DCMAKE_OSX_DEPLOYMENT_TARGET=14.4  -DCMAKE_OSX_DEPLOYMENT_TARGET=macosx14.4\n ```\n "},{"sha":"0d2885e6a38cc0e47a57b816dcdf52f843c91a53","filename":"stlab/concurrency/await.hpp","status":"modified","additions":5,"deletions":10,"changes":15,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fawait.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fawait.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fawait.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -31,10 +31,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -203,18 +200,16 @@ template <class T>\n }\n \n template <class T>\n-[[deprecated(\"Use await_for instead.\")]] auto blocking_get(future<T> x,\n-                                                           const std::chrono::nanoseconds& timeout)\n-    -> decltype(x.get_try()) {\n+[[deprecated(\"Use await_for instead.\")]] auto blocking_get(\n+    future<T> x, const std::chrono::nanoseconds& timeout) -> decltype(x.get_try()) {\n     return blocking_get_for(std::move(x), timeout).get_try();\n }\n \n /**************************************************************************************************/\n \n-} // namespace v1\n+} // namespace STLAB_VERSION_NAMESPACE()\n+} // namespace stlab\n \n /**************************************************************************************************/\n \n-} // namespace stlab\n-\n #endif // STLAB_CONCURRENCY_AWAIT_HPP"},{"sha":"d7d07ceae0930a1d468a7794441f709a168cded8","filename":"stlab/concurrency/channel.hpp","status":"modified","additions":11,"deletions":15,"changes":26,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fchannel.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fchannel.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fchannel.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,6 +9,8 @@\n #ifndef STLAB_CONCURRENCY_CHANNEL_HPP\n #define STLAB_CONCURRENCY_CHANNEL_HPP\n \n+#include <stlab/config.hpp>\n+\n #include <algorithm>\n #include <array>\n #include <atomic>\n@@ -33,10 +35,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -192,7 +191,9 @@ using avoid = std::conditional_t<std::is_same<void, T>::value, avoid_, T>;\n /**************************************************************************************************/\n \n template <typename F, std::size_t... I, typename... T>\n-auto invoke_(F&& f, std::tuple<std::variant<T, std::exception_ptr>...>& t, std::index_sequence<I...>) {\n+auto invoke_(F&& f,\n+             std::tuple<std::variant<T, std::exception_ptr>...>& t,\n+             std::index_sequence<I...>) {\n     return std::forward<F>(f)(std::move(std::get<I>(t))...);\n }\n \n@@ -484,14 +485,12 @@ struct round_robin_queue_strategy {\n     queue_t _queue;\n \n     bool empty() const {\n-        return get_i(\n-            _queue, _index, [](const auto& c) { return c.empty(); }, true);\n+        return get_i(_queue, _index, [](const auto& c) { return c.empty(); }, true);\n     }\n \n     auto front() {\n         assert(!empty() && \"front on an empty container is a very bad idea!\");\n-        return std::make_tuple(get_i(\n-            _queue, _index, [](auto& c) { return c.front(); }, item_t{}));\n+        return std::make_tuple(get_i(_queue, _index, [](auto& c) { return c.front(); }, item_t{}));\n     }\n \n     void pop_front() {\n@@ -546,8 +545,8 @@ struct unordered_queue_strategy {\n     auto front() {\n         assert(!empty() && \"front on an empty container is a very bad idea!\");\n         _index = tuple_find(_queue, [](const auto& c) { return !c.empty(); });\n-        return std::make_tuple(get_i(\n-            _queue, _index, [](auto& c) { return std::move(c.front()); }, item_t{}));\n+        return std::make_tuple(\n+            get_i(_queue, _index, [](auto& c) { return std::move(c.front()); }, item_t{}));\n     }\n \n     void pop_front() {\n@@ -1705,10 +1704,7 @@ struct function_process<R(Args...)> {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"eb26673dba5c81fb003183603918d18bb6283a9e","filename":"stlab/concurrency/default_executor.hpp","status":"modified","additions":2,"deletions":8,"changes":10,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fdefault_executor.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fdefault_executor.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fdefault_executor.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -40,10 +40,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -500,10 +497,7 @@ constexpr auto high_executor = detail::executor_type<detail::executor_priority::\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"a5fec42a524291acf24d81c45176a697e1585120","filename":"stlab/concurrency/executor_base.hpp","status":"modified","additions":4,"deletions":7,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fexecutor_base.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fexecutor_base.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fexecutor_base.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,6 +9,8 @@\n #ifndef STLAB_CONCURRENCY_EXECUTOR_BASE_HPP\n #define STLAB_CONCURRENCY_EXECUTOR_BASE_HPP\n \n+#include <stlab/config.hpp>\n+\n #include <chrono>\n #include <functional>\n \n@@ -18,12 +20,10 @@\n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n using executor_t = std::function<void(stlab::task<void() noexcept>)>;\n \n /*\n@@ -82,10 +82,7 @@ executor_task_pair<F> operator&(F&& f, executor e) {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"e4aac893a3cd0cf3386a7738f68e8b2283c65ad7","filename":"stlab/concurrency/future.hpp","status":"modified","additions":18,"deletions":18,"changes":36,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ffuture.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ffuture.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ffuture.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -38,10 +38,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -274,8 +271,6 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n \n     explicit shared_base(executor_t s) : _executor(std::move(s)) {}\n \n-    void reset() { _then.clear(); } // NEEDS MUTEX\n-\n     template <typename F>\n     auto recover(future<T>&& p, F&& f) {\n         return recover(std::move(p), _executor, std::forward<F>(f));\n@@ -389,8 +384,6 @@ struct shared_base<T, enable_if_not_copyable<T>> : std::enable_shared_from_this<\n \n     explicit shared_base(executor_t s) : _executor(std::move(s)) {}\n \n-    void reset() { _then.second = task<void() noexcept>{}; }\n-\n     template <typename F>\n     auto recover(future<T>&& p, F&& f) {\n         return recover(std::move(p), _executor, std::forward<F>(f));\n@@ -474,8 +467,6 @@ struct shared_base<void> : std::enable_shared_from_this<shared_base<void>> {\n \n     explicit shared_base(executor_t s) : _executor(std::move(s)) {}\n \n-    void reset() { _then.clear(); }\n-\n     template <typename F>\n     auto recover(future<result_type>&& p, F&& f) {\n         return recover(std::move(p), _executor, std::forward<F>(f));\n@@ -750,7 +741,11 @@ class STLAB_NODISCARD() future<T, enable_if_copyable<T>> {\n         return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} : std::nullopt;\n     }\n \n-    std::exception_ptr exception() const& { return _p->_exception; }\n+    // Precondition: is_ready()\n+    std::exception_ptr exception() const& {\n+        assert(is_ready());\n+        return _p->_exception;\n+    }\n };\n \n /**************************************************************************************************/\n@@ -897,7 +892,11 @@ class STLAB_NODISCARD() future<void, void> {\n         return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} : std::nullopt;\n     }\n \n-    std::exception_ptr exception() const& { return _p->_exception; }\n+    // Precondition: is_ready()\n+    std::exception_ptr exception() const& {\n+        assert(is_ready());\n+        return _p->_exception;\n+    }\n };\n \n /**************************************************************************************************/\n@@ -1001,7 +1000,11 @@ class STLAB_NODISCARD() future<T, enable_if_not_copyable<T>> {\n         return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} : std::nullopt;\n     }\n \n-    std::exception_ptr exception() const& { return _p->_exception; }\n+    // Precondition: is_ready()\n+    std::exception_ptr exception() const& {\n+        assert(is_ready());\n+        return _p->_exception;\n+    }\n };\n \n template <typename Sig, typename E, typename F>\n@@ -1233,7 +1236,7 @@ template <typename E, typename F, typename... Ts>\n auto when_all(E executor, F f, future<Ts>... args) {\n     using vt_t = voidless_tuple<Ts...>;\n     using opt_t = optional_placeholder_tuple<Ts...>;\n-    using result_t = decltype(detail::apply_tuple(std::declval<F>(), std::declval<vt_t>()));\n+    using result_t = decltype(apply_ignore_placeholders(std::declval<F>(), std::declval<vt_t>()));\n \n     auto shared = std::make_shared<detail::when_all_shared<F, opt_t>>();\n     auto p = package<result_t()>(\n@@ -1816,10 +1819,7 @@ auto shared_base<void>::recover(future<result_type>&& p, E executor, F&& f) {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"015b2d4358de304c6ed5353c1fa209d381af329e","filename":"stlab/concurrency/immediate_executor.hpp","status":"modified","additions":4,"deletions":7,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fimmediate_executor.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fimmediate_executor.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fimmediate_executor.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,17 +9,17 @@\n #ifndef STLAB_CONCURRENCY_IMMEDIATE_EXECUTOR_HPP\n #define STLAB_CONCURRENCY_IMMEDIATE_EXECUTOR_HPP\n \n+#include <stlab/config.hpp>\n+\n #include <type_traits>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n namespace detail {\n \n /**************************************************************************************************/\n@@ -41,10 +41,7 @@ constexpr auto immediate_executor = detail::immediate_executor_type{};\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"c7ad8d3d8db8bde491703ad2d052020e89ccb139","filename":"stlab/concurrency/main_executor.hpp","status":"modified","additions":5,"deletions":5,"changes":10,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fmain_executor.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fmain_executor.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fmain_executor.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -35,10 +35,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -170,8 +167,11 @@ struct main_executor_type {\n \n constexpr auto main_executor = detail::main_executor_type{};\n \n-} // namespace v1\n+/**************************************************************************************************/\n \n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n+/**************************************************************************************************/\n+\n #endif // STLAB_CONCURRENCY_MAIN_EXECUTOR_HPP"},{"sha":"f68a619ef830d1caae4120cd48a5e79081440fe7","filename":"stlab/concurrency/ready_future.hpp","status":"modified","additions":5,"deletions":7,"changes":12,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fready_future.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fready_future.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fready_future.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,6 +9,8 @@\n #ifndef STLAB_CONCURRENCY_READY_FUTURE_HPP\n #define STLAB_CONCURRENCY_READY_FUTURE_HPP\n \n+#include <stlab/config.hpp>\n+\n #include <exception>\n #include <type_traits>\n #include <utility>\n@@ -18,10 +20,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -72,10 +71,9 @@ future<T> make_exceptional_future(std::exception_ptr error, E executor) {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n+} // namespace STLAB_VERSION_NAMESPACE()\n+} // namespace stlab\n \n /**************************************************************************************************/\n \n-} // namespace stlab\n-\n #endif // STLAB_CONCURRENCY_READY_FUTURE_HPP"},{"sha":"21d80cbaa2b5d3ae60c43de770b1a1b257e5cdc9","filename":"stlab/concurrency/serial_queue.hpp","status":"modified","additions":4,"deletions":2,"changes":6,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fserial_queue.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fserial_queue.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fserial_queue.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -11,6 +11,8 @@\n \n /**************************************************************************************************/\n \n+#include <stlab/config.hpp>\n+\n #include <deque>\n #include <mutex>\n #include <tuple>\n@@ -29,7 +31,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -164,7 +166,7 @@ class serial_queue_t {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"60cf71f53051bf3ea70fbebb94ad8eea3d86e9c0","filename":"stlab/concurrency/system_timer.hpp","status":"modified","additions":8,"deletions":12,"changes":20,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fsystem_timer.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Fsystem_timer.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fsystem_timer.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -34,10 +34,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -58,8 +55,8 @@ struct system_timer_type {\n     }\n \n     template <typename F, typename Rep, typename Per = std::ratio<1>>\n-    auto operator()(std::chrono::duration<Rep, Per> duration, F f) const\n-        -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n+    auto operator()(std::chrono::duration<Rep, Per> duration,\n+                    F f) const -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n         using namespace std::chrono;\n \n         using f_t = decltype(f);\n@@ -110,8 +107,8 @@ class system_timer {\n     }\n \n     template <typename F, typename Rep, typename Per = std::ratio<1>>\n-    auto operator()(std::chrono::duration<Rep, Per> duration, F&& f)\n-        -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n+    auto operator()(std::chrono::duration<Rep, Per> duration,\n+                    F&& f) -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n         using namespace std::chrono;\n         auto timer = CreateThreadpoolTimer(&timer_callback_impl<F>, new F(std::forward<F>(f)),\n                                            &_callBackEnvironment);\n@@ -228,8 +225,8 @@ class system_timer {\n     }\n \n     template <typename F, typename Rep, typename Per = std::ratio<1>>\n-    auto operator()(std::chrono::duration<Rep, Per> duration, F&& f)\n-        -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n+    auto operator()(std::chrono::duration<Rep, Per> duration,\n+                    F&& f) -> std::enable_if_t<std::is_nothrow_invocable_v<F>> {\n         lock_t lock(_timed_queue_mutex);\n         _timed_queue.emplace_back(std::chrono::steady_clock::now() + duration, std::forward<F>(f));\n         std::push_heap(std::begin(_timed_queue), std::end(_timed_queue), greater_first());\n@@ -272,10 +269,9 @@ struct system_timer_type {\n \n constexpr auto system_timer = detail::system_timer_type{};\n \n-} // namespace v1\n-\n /**************************************************************************************************/\n \n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"9cfff2ae73a3b21a00c81bdeb12908fe5968f5b5","filename":"stlab/concurrency/task.hpp","status":"modified","additions":2,"deletions":8,"changes":10,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftask.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftask.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ftask.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -23,10 +23,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -285,10 +282,7 @@ using task = typename noexcept_deducer<task_, F>::type;\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"1aed3d71a9b4cef4d3e787fe0366e83d6d05abe0","filename":"stlab/concurrency/traits.hpp","status":"modified","additions":6,"deletions":6,"changes":12,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftraits.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftraits.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ftraits.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,28 +9,28 @@\n #ifndef STLAB_CONCURRENCY_TRAITS_HPP\n #define STLAB_CONCURRENCY_TRAITS_HPP\n \n+#include <stlab/config.hpp>\n+\n #include <type_traits>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n template <bool...>\n struct bool_pack;\n template <bool... v>\n using all_true = std::is_same<bool_pack<true, v...>, bool_pack<v..., true>>;\n \n /**************************************************************************************************/\n \n-template<template<typename> class test, typename T>\n+template <template <typename> class test, typename T>\n struct smart_test : test<T> {};\n \n-template<typename T>\n+template <typename T>\n using smart_is_copy_constructible = smart_test<std::is_copy_constructible, T>;\n \n template <typename T>\n@@ -92,7 +92,7 @@ using detected_t = typename detector<nonesuch, void, Op, Args...>::type;\n \n /**************************************************************************************************/\n \n-} // namespace v1\n+} // namespace STLAB_VERSION_NAMESPACE()\n \n /**************************************************************************************************/\n "},{"sha":"c0afe8524d836c965ce038a39b0d9dc1f4b6c6c8","filename":"stlab/concurrency/tuple_algorithm.hpp","status":"modified","additions":40,"deletions":31,"changes":71,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftuple_algorithm.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconcurrency%2Ftuple_algorithm.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ftuple_algorithm.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -10,17 +10,21 @@\n #ifndef STLAB_CONCURRENCY_TUPLE_ALGORITHM_HPP\n #define STLAB_CONCURRENCY_TUPLE_ALGORITHM_HPP\n \n+#include <stlab/config.hpp>\n+\n // stdc++\n #include <optional>\n #include <tuple>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n+class placeholder {};\n+\n /**************************************************************************************************/\n \n namespace detail {\n@@ -124,7 +128,8 @@ void tuple_for_each(T& t, Op op) {\n  */\n template <typename T, typename F, typename D>\n auto get_i(T& t, std::size_t index, F f, D&& default_v) {\n-    return detail::get_i_impl<0, std::tuple_size<T>::value>::go(t, index, std::move(f), std::forward<D>(default_v));\n+    return detail::get_i_impl<0, std::tuple_size<T>::value>::go(t, index, std::move(f),\n+                                                                std::forward<D>(default_v));\n }\n \n /*\n@@ -153,26 +158,13 @@ constexpr decltype(auto) apply_optional_indexed_impl(F&& f, Tuple&& t, std::inde\n \n /**************************************************************************************************/\n \n-template <class Seq, class F, class Tuple>\n-constexpr decltype(auto) apply_indexed(F&& f, Tuple&& t) {\n-    return detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t), Seq());\n-}\n-\n-template <class F, class Tuple>\n-constexpr decltype(auto) apply_tuple(F&& f, Tuple&& t) {\n-    return detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t),\n-                              std::make_index_sequence<std::tuple_size<Tuple>::value>());\n-}\n-\n template <class Seq, class F, class Tuple>\n constexpr decltype(auto) apply_optional_indexed(F&& f, Tuple&& t) {\n     return detail::apply_optional_indexed_impl(std::forward<F>(f), std::forward<Tuple>(t), Seq());\n }\n \n /**************************************************************************************************/\n \n-class placeholder {};\n-\n template <class T, std::size_t N>\n struct map_placeholder {\n     using type = std::index_sequence<N>;\n@@ -188,14 +180,6 @@ struct map_placeholder<std::optional<placeholder>, N> {\n     using type = std::index_sequence<>;\n };\n \n-template <class Tuple>\n-struct remove_placeholder {\n-    template <std::size_t Index>\n-    struct function {\n-        using type = typename map_placeholder<std::tuple_element_t<Index, Tuple>, Index>::type;\n-    };\n-};\n-\n /**************************************************************************************************/\n \n } // namespace detail\n@@ -207,32 +191,57 @@ using tuple_cat_t = decltype(std::tuple_cat(std::declval<Ts>()...));\n \n /**************************************************************************************************/\n // type-function that takes a parameter pack and returns a std::tuple<Ts...>\n-// where all T[i] = void have been removed.\n+// where all T[i] == void have been removed.\n template <typename... Ts>\n using voidless_tuple = tuple_cat_t<typename std::conditional<std::is_same<void, Ts>::value,\n                                                              std::tuple<>,\n                                                              std::tuple<Ts>>::type...>;\n \n /**************************************************************************************************/\n // type-function that takes a parameter pack and returns a std::tuple<Ts...>\n-// where all T[i] = void have been replaced with stlab::placeholder.\n+// where all T[i] == void have been replaced with stlab::placeholder.\n template <typename... Ts>\n-using placeholder_tuple = std::tuple<\n-    typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type...>;\n+using placeholder_tuple =\n+    std::tuple<typename std::conditional<std::is_same<void, Ts>::value, placeholder, Ts>::type...>;\n \n /**************************************************************************************************/\n-// type-function that takes a parameter pack and returns a std::tuple<Ts...>\n-// where all T[i] = void have been replaced with stlab::placeholder.\n+// type-function that takes a parameter pack and returns a std::tuple<std::optional<Ts>...>\n+// where all T[i] == void have been replaced with stlab::placeholder.\n template <typename... Ts>\n using optional_placeholder_tuple = std::tuple<std::optional<\n-    typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type>...>;\n+    typename std::conditional<std::is_same<void, Ts>::value, placeholder, Ts>::type>...>;\n+\n+/**************************************************************************************************/\n+// apply the tuple `t`as arguments to the function `f`. Placeholders are ignored.\n+template <class F, class Tuple>\n+constexpr decltype(auto) apply_ignore_placeholders(F&& f, Tuple&& t) {\n+    return detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t),\n+                              std::make_index_sequence<std::tuple_size<Tuple>::value>());\n+}\n \n /**************************************************************************************************/\n+// remove_placeholder::function<Index>::type returns a std::index_sequence<Index> if the type at\n+// Index is not a placeholder, otherwise it returns an empty std::index_sequence.\n+template <class Tuple>\n+struct remove_placeholder {\n+    template <std::size_t Index>\n+    struct function {\n+        using type =\n+            typename detail::map_placeholder<std::tuple_element_t<Index, Tuple>, Index>::type;\n+    };\n+};\n \n-} // namespace v1\n+/**************************************************************************************************/\n+// apply_indexed applies the tuple `t` as arguments to the function `f` using the index sequence\n+// `Seq` to select the arguments.\n+template <class Seq, class F, class Tuple>\n+constexpr decltype(auto) apply_indexed(F&& f, Tuple&& t) {\n+    return detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t), Seq());\n+}\n \n /**************************************************************************************************/\n \n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"09b39843208dbf07d094134d61d4976283c9461d","filename":"stlab/config.hpp.in","status":"modified","additions":33,"deletions":31,"changes":64,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconfig.hpp.in","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fconfig.hpp.in","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconfig.hpp.in?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -7,6 +7,9 @@\n #ifndef STLAB_CONFIG_HPP\n #define STLAB_CONFIG_HPP\n \n+// Release version macro - used for inline namespace increment on each release\n+#define STLAB_VERSION_NAMESPACE() v2\n+\n // Configuration generated from CMake\n \n #cmakedefine STLAB_NO_STD_COROUTINES\n@@ -42,44 +45,43 @@\n \n #if __APPLE__\n \n-    #if defined(__has_feature)\n-        #if __has_feature(objc_arc)\n-            #undef STLAB_FEATURE_PRIVATE_OBJC_ARC\n-            #define STLAB_FEATURE_PRIVATE_OBJC_ARC() 1\n-        #endif\n-    #endif\n-\n+#if defined(__has_feature)\n+#if __has_feature(objc_arc)\n+#undef STLAB_FEATURE_PRIVATE_OBJC_ARC\n+#define STLAB_FEATURE_PRIVATE_OBJC_ARC() 1\n+#endif\n+#endif\n \n #elif _MSC_VER\n \n-    #if _MSVC_LANG == 201103L\n-        #define STLAB_CPP_VERSION_PRIVATE() 11\n-    #elif _MSVC_LANG == 201402L\n-        #define STLAB_CPP_VERSION_PRIVATE() 14\n-    #elif _MSC_FULL_VER >= 191225830 && _MSVC_LANG == 201703L\n-        #define STLAB_CPP_VERSION_PRIVATE() 17\n-    #elif _MSVC_LANG == 202002L\n-        #define STLAB_CPP_VERSION_PRIVATE() 20\n-    #else\n-        #pragma message(\"Unknown version of C++, assuming C++20.\")\n-        #define STLAB_CPP_VERSION_PRIVATE() 20\n-    #endif\n+#if _MSVC_LANG == 201103L\n+#define STLAB_CPP_VERSION_PRIVATE() 11\n+#elif _MSVC_LANG == 201402L\n+#define STLAB_CPP_VERSION_PRIVATE() 14\n+#elif _MSC_FULL_VER >= 191225830 && _MSVC_LANG == 201703L\n+#define STLAB_CPP_VERSION_PRIVATE() 17\n+#elif _MSVC_LANG == 202002L\n+#define STLAB_CPP_VERSION_PRIVATE() 20\n+#else\n+#pragma message(\"Unknown version of C++, assuming C++20.\")\n+#define STLAB_CPP_VERSION_PRIVATE() 20\n+#endif\n \n #endif\n \n #if !defined(STLAB_CPP_VERSION_PRIVATE)\n-    #if __cplusplus == 201103L\n-        #define STLAB_CPP_VERSION_PRIVATE() 11\n-    #elif __cplusplus == 201402L\n-        #define STLAB_CPP_VERSION_PRIVATE() 14\n-    #elif __cplusplus == 201703L\n-        #define STLAB_CPP_VERSION_PRIVATE() 17\n-    #elif __cplusplus == 202002L\n-        #define STLAB_CPP_VERSION_PRIVATE() 20\n-    #else\n-        //#warning Unknown version of C++, assuming C++23.\n-        #define STLAB_CPP_VERSION_PRIVATE() 23\n-    #endif\n+#if __cplusplus == 201103L\n+#define STLAB_CPP_VERSION_PRIVATE() 11\n+#elif __cplusplus == 201402L\n+#define STLAB_CPP_VERSION_PRIVATE() 14\n+#elif __cplusplus == 201703L\n+#define STLAB_CPP_VERSION_PRIVATE() 17\n+#elif __cplusplus == 202002L\n+#define STLAB_CPP_VERSION_PRIVATE() 20\n+#else\n+// #warning Unknown version of C++, assuming C++23.\n+#define STLAB_CPP_VERSION_PRIVATE() 23\n+#endif\n #endif\n \n // STLAB_NODISCARD macro"},{"sha":"c7999c9f9dc0e1dd0f9418a84dd91219515af58d","filename":"stlab/functional.hpp","status":"modified","additions":4,"deletions":7,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Ffunctional.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Ffunctional.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Ffunctional.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -11,18 +11,18 @@\n \n /**************************************************************************************************/\n \n+#include <stlab/config.hpp>\n+\n #include <functional>\n #include <type_traits>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n template <class T>\n struct unwrap_reference {\n     using type = T;\n@@ -70,10 +70,7 @@ const T& unwrap(const std::reference_wrapper<T>& val) {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"f0a9ed60bee2f3cb97da32161204f049d8e62cfa","filename":"stlab/memory.hpp","status":"modified","additions":3,"deletions":7,"changes":10,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fmemory.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fmemory.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fmemory.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -12,27 +12,23 @@\n /**************************************************************************************************/\n \n #include <memory>\n+#include <stlab/config.hpp>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n template <typename T>\n auto make_weak_ptr(const std::shared_ptr<T>& x) {\n     return std::weak_ptr<T>(x);\n }\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"6fbc1c29afae5cf1bd3cfb11e5bcd34b38bda290","filename":"stlab/pre_exit.hpp","status":"modified","additions":6,"deletions":0,"changes":6,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fpre_exit.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fpre_exit.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fpre_exit.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -16,9 +16,13 @@\n \n /**************************************************************************************************/\n \n+// The namespace for pre_exit cannot be changed without an ABI break. If making an ABI breaking\n+// change in this file it needs to be done in a way supporting this version as well.\n namespace stlab {\n inline namespace v1 {\n \n+/**************************************************************************************************/\n+\n /// Pre-exit handler type.\n #if __cpp_noexcept_function_type >= 201510L\n using pre_exit_handler = void (*)() noexcept;\n@@ -85,6 +89,8 @@ inline void pre_exit() {\n /// is required to be `noexcept`.\n inline void at_pre_exit(pre_exit_handler f) { detail::_pre_exit_stack().push(f); }\n \n+/**************************************************************************************************/\n+\n } // namespace v1\n } // namespace stlab\n "},{"sha":"1d33b0c0c5295d7f4cd108f5b74951d17049b5c7","filename":"stlab/scope.hpp","status":"modified","additions":4,"deletions":7,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fscope.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Fscope.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fscope.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -11,19 +11,19 @@\n \n /**************************************************************************************************/\n \n+#include <stlab/config.hpp>\n+\n #include <mutex>\n #include <tuple>\n #include <utility>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n namespace detail {\n \n template <typename T, typename Tuple, size_t... S>\n@@ -55,10 +55,7 @@ inline auto scope(std::mutex& m, F&& f) {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"21e9eb0b82b2e967c093b370f6588afda74c1e28","filename":"stlab/test/model.hpp","status":"modified","additions":4,"deletions":2,"changes":6,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Ftest%2Fmodel.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Ftest%2Fmodel.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Ftest%2Fmodel.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -11,6 +11,8 @@\n \n /**************************************************************************************************/\n \n+#include <stlab/config.hpp>\n+\n #include <atomic>\n #include <condition_variable>\n #include <iostream>\n@@ -19,7 +21,7 @@\n /**************************************************************************************************/\n \n namespace stlab {\n-inline namespace v1 {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n@@ -161,7 +163,7 @@ class move_only {\n \n /**************************************************************************************************/\n \n-} // namespace v1\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"714d48c6c34f8e3b22a1f37b5aba91d076853602","filename":"stlab/utility.hpp","status":"modified","additions":4,"deletions":7,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Futility.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/stlab%2Futility.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Futility.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -11,18 +11,18 @@\n \n /**************************************************************************************************/\n \n+#include <stlab/config.hpp>\n+\n #include <array>\n #include <type_traits>\n \n /**************************************************************************************************/\n \n namespace stlab {\n+inline namespace STLAB_VERSION_NAMESPACE() {\n \n /**************************************************************************************************/\n \n-inline namespace v1 {\n-/**************************************************************************************************/\n-\n namespace detail {\n \n /**************************************************************************************************/\n@@ -126,10 +126,7 @@ constexpr std::decay_t<T> copy(T&& value) noexcept(noexcept(std::decay_t<T>{\n \n /**************************************************************************************************/\n \n-} // namespace v1\n-\n-/**************************************************************************************************/\n-\n+} // namespace STLAB_VERSION_NAMESPACE()\n } // namespace stlab\n \n /**************************************************************************************************/"},{"sha":"0af8273a45ab1c60aa9edd72235af957253da4e6","filename":"test/executor_test.cpp","status":"modified","additions":29,"deletions":32,"changes":61,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Fexecutor_test.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Fexecutor_test.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Fexecutor_test.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(all_low_prio_tasks_are_executed) {\n             results.push_back(_i);\n         });\n     }\n-    queue.executor()([&done] () noexcept { done = true; });\n+    queue.executor()([&done]() noexcept { done = true; });\n \n     while (!done) {\n         rest();\n@@ -99,12 +99,12 @@ BOOST_AUTO_TEST_CASE(all_default_prio_tasks_get_executed) {\n     atomic_bool done{false};\n \n     for (auto i = 0; i < 10; ++i) {\n-        queue.executor()([_i = i, &m, &results] () noexcept {\n+        queue.executor()([_i = i, &m, &results]() noexcept {\n             unique_lock<mutex> block{m};\n             results.push_back(_i);\n         });\n     }\n-    queue.executor()([&done] () noexcept { done = true; });\n+    queue.executor()([&done]() noexcept { done = true; });\n \n     while (!done) {\n         rest();\n@@ -124,12 +124,12 @@ BOOST_AUTO_TEST_CASE(all_high_prio_tasks_get_executed) {\n     atomic_bool done{false};\n \n     for (auto i = 0; i < 10; ++i) {\n-        queue.executor()([_i = i, &m, &results] () noexcept {\n+        queue.executor()([_i = i, &m, &results]() noexcept {\n             unique_lock<mutex> block{m};\n             results.push_back(_i);\n         });\n     }\n-    queue.executor()([&done] () noexcept { done = true; });\n+    queue.executor()([&done]() noexcept { done = true; });\n \n     while (!done) {\n         rest();\n@@ -147,7 +147,7 @@ BOOST_AUTO_TEST_CASE(task_system_restarts_after_it_went_pending) {\n     mutex m;\n     condition_variable cv;\n \n-    default_executor([&] () noexcept {\n+    default_executor([&]() noexcept {\n         rest();\n         {\n             unique_lock<mutex> block{m};\n@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(task_system_restarts_after_it_went_pending) {\n         }\n     }\n \n-    default_executor([&] () noexcept {\n+    default_executor([&]() noexcept {\n         rest();\n         {\n             unique_lock<mutex> block{m};\n@@ -199,7 +199,9 @@ atomic_int correctLow{0};\n atomic_int correctDefault{0};\n atomic_int correctHigh{0};\n \n-template <stlab::detail::executor_priority P>\n+enum class executor_priority { high, medium, low };\n+\n+template <executor_priority P>\n struct check_task {\n     atomic_int& _correctScheduleCount;\n     atomic_int& _currentPrioCount;\n@@ -209,20 +211,18 @@ struct check_task {\n         ++_currentPrioCount;\n     }\n \n-    template <stlab::detail::executor_priority Q>\n-    auto schedule_increment() -> std::enable_if_t<Q == stlab::detail::executor_priority::low, int> {\n+    template <executor_priority Q>\n+    auto schedule_increment() -> std::enable_if_t<Q == executor_priority::low, int> {\n         return static_cast<int>(highCount <= taskRunning && defaultCount <= taskRunning);\n     }\n \n-    template <stlab::detail::executor_priority Q>\n-    auto schedule_increment()\n-        -> std::enable_if_t<Q == stlab::detail::executor_priority::medium, int> {\n+    template <executor_priority Q>\n+    auto schedule_increment() -> std::enable_if_t<Q == executor_priority::medium, int> {\n         return static_cast<int>(highCount <= taskRunning);\n     }\n \n-    template <stlab::detail::executor_priority Q>\n-    auto schedule_increment()\n-        -> std::enable_if_t<Q == stlab::detail::executor_priority::high, int> {\n+    template <executor_priority Q>\n+    auto schedule_increment() -> std::enable_if_t<Q == executor_priority::high, int> {\n         return 0;\n     }\n \n@@ -237,18 +237,16 @@ struct check_task {\n \n         switch (workToDo % 3) {\n             case 0:\n-                default_executor(check_task<stlab::detail::executor_priority::medium>{\n-                    correctDefault, defaultCount});\n+                default_executor(\n+                    check_task<executor_priority::medium>{correctDefault, defaultCount});\n                 break;\n \n             case 1:\n-                high_executor(\n-                    check_task<stlab::detail::executor_priority::high>{correctHigh, highCount});\n+                high_executor(check_task<executor_priority::high>{correctHigh, highCount});\n                 break;\n \n             case 2:\n-                low_executor(\n-                    check_task<stlab::detail::executor_priority::low>{correctLow, lowCount});\n+                low_executor(check_task<executor_priority::low>{correctLow, lowCount});\n                 break;\n         }\n         --workToDo;\n@@ -265,10 +263,9 @@ BOOST_AUTO_TEST_CASE(all_tasks_will_be_executed_according_to_their_prio) {\n     auto start = chrono::high_resolution_clock::now();\n \n     for (auto i = 0; i < startCount; ++i) {\n-        low_executor(check_task<stlab::detail::executor_priority::low>{correctLow, lowCount});\n-        high_executor(check_task<stlab::detail::executor_priority::high>{correctHigh, highCount});\n-        default_executor(\n-            check_task<stlab::detail::executor_priority::medium>{correctDefault, defaultCount});\n+        low_executor(check_task<executor_priority::low>{correctLow, lowCount});\n+        high_executor(check_task<executor_priority::high>{correctHigh, highCount});\n+        default_executor(check_task<executor_priority::medium>{correctDefault, defaultCount});\n     }\n     while (done < expectedWork) {\n         rest();\n@@ -278,7 +275,8 @@ BOOST_AUTO_TEST_CASE(all_tasks_will_be_executed_according_to_their_prio) {\n     std::cout << \"\\nPerformance measuring: \" << std::chrono::duration<double>(stop - start).count()\n               << \"s\\n\";\n \n-    // REVISIT (sean-parent) - I don't believe that this is measuring the probability of a task executing in order.stl\n+    // REVISIT (sean-parent) - I don't believe that this is measuring the probability of a task\n+    // executing in order.stl\n     cout << \"Correct low ordering:     \"\n          << static_cast<double>(correctLow.load()) / iterations * 100.0 << \"%\\n\";\n     cout << \"Correct default ordering: \"\n@@ -298,25 +296,25 @@ BOOST_AUTO_TEST_CASE(MeasureTiming) {\n     auto start = chrono::high_resolution_clock::now();\n \n     for (auto i = 0; i < iterations; ++i) {\n-        low_executor([_i = i, &results, &counter] () noexcept  {\n+        low_executor([_i = i, &results, &counter]() noexcept {\n             results[_i] = 1;\n             fibonacci<mpre::cpp_int>(fiboN);\n             ++counter;\n         });\n-        default_executor([_i = i + iterations, &results, &counter] () noexcept {\n+        default_executor([_i = i + iterations, &results, &counter]() noexcept {\n             results[_i] = 2;\n             fibonacci<mpre::cpp_int>(fiboN);\n             ++counter;\n         });\n-        high_executor([_i = i + iterations * 2, &results, &counter] () noexcept  {\n+        high_executor([_i = i + iterations * 2, &results, &counter]() noexcept {\n             results[_i] = 3;\n             fibonacci<mpre::cpp_int>(fiboN);\n             ++counter;\n         });\n     }\n \n     mutex block;\n-    low_executor([&] () noexcept  {\n+    low_executor([&]() noexcept {\n         {\n             unique_lock<mutex> lock{block};\n             done = true;\n@@ -336,5 +334,4 @@ BOOST_AUTO_TEST_CASE(MeasureTiming) {\n     auto stop = std::chrono::high_resolution_clock::now();\n     std::cout << \"\\nPerformance measuring: \" << std::chrono::duration<double>(stop - start).count()\n               << \"s\\n\";\n-\n }"},{"sha":"6b5104778062b70ffeebe2727715397c7f09b747","filename":"test/future_recover_tests.cpp","status":"modified","additions":16,"deletions":16,"changes":32,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_recover_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_recover_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_recover_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -960,9 +960,9 @@ BOOST_AUTO_TEST_CASE(\n                 return move_only(42);\n             });\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n     }\n     {\n@@ -979,9 +979,9 @@ BOOST_AUTO_TEST_CASE(\n             return move_only(42);\n         };\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n     }\n }\n@@ -1008,9 +1008,9 @@ BOOST_AUTO_TEST_CASE(future_recover_move_only_types_recover_failure_after_recove\n                 });\n         }\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n     }\n     {\n@@ -1032,9 +1032,9 @@ BOOST_AUTO_TEST_CASE(future_recover_move_only_types_recover_failure_after_recove\n             };\n         }\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n     }\n }\n@@ -1057,9 +1057,9 @@ BOOST_AUTO_TEST_CASE(\n                 return move_only(42);\n             });\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_GE(1, custom_scheduler<1>::usage_counter());\n@@ -1081,9 +1081,9 @@ BOOST_AUTO_TEST_CASE(\n                 return move_only(42);\n             });\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_GE(1, custom_scheduler<1>::usage_counter());\n@@ -1112,9 +1112,9 @@ BOOST_AUTO_TEST_CASE(\n                 });\n         }\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_GE(1, custom_scheduler<1>::usage_counter());\n@@ -1140,9 +1140,9 @@ BOOST_AUTO_TEST_CASE(\n                 });\n         }\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE(error);\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_GE(1, custom_scheduler<1>::usage_counter());"},{"sha":"aa42001b6b5bae9efa9a8bc18622573ecc727a64","filename":"test/future_test_helper.hpp","status":"modified","additions":13,"deletions":36,"changes":49,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_test_helper.hpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_test_helper.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_test_helper.hpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -9,6 +9,7 @@\n #ifndef FUTURE_TEST_HELPER_HPP_\n #define FUTURE_TEST_HELPER_HPP_\n \n+#include <stlab/concurrency/await.hpp>\n #include <stlab/concurrency/default_executor.hpp>\n #include <stlab/concurrency/future.hpp>\n \n@@ -30,15 +31,7 @@ struct custom_scheduler {\n \n     void operator()(stlab::task<void() noexcept> f) const {\n         ++counter();\n-        // The implementation on Windows or the mac uses a scheduler that allows many tasks in the\n-        // pool in parallel\n-#if defined(WIN32) || defined(__APPLE__)\n         stlab::default_executor(std::move(f));\n-#else\n-        // The default scheduler under Linux allows only as many tasks as there are physical cores.\n-        // But this can lead to a dead lock in some of the tests\n-        std::thread(std::move(f)).detach();\n-#endif\n     }\n \n     static int usage_counter() { return counter().load(); }\n@@ -100,31 +93,17 @@ struct test_fixture {\n     stlab::future<T> sut;\n \n     template <typename... F>\n-    void wait_until_future_completed(F&... f) {\n-        (void)std::initializer_list<int>{(wait_until_future_is_ready(f), 0)...};\n-    }\n-\n-    template <typename F>\n-    auto wait_until_future_r_completed(F& f) {\n-        auto result = f.get_try();\n-        while (!result) {\n-            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n-            result = f.get_try();\n-        }\n-        return result;\n+    void wait_until_future_completed(F&&... f) {\n+        (void)std::initializer_list<int>{(wait_until_future_is_ready(std::forward<F>(f)), 0)...};\n     }\n \n     void check_valid_future() {}\n \n-    void check_valid_future(const stlab::future<T>& f) {\n-        BOOST_REQUIRE(f.valid() == true);\n-        BOOST_REQUIRE(!f.exception());\n-    }\n+    void check_valid_future(const stlab::future<T>& f) { BOOST_REQUIRE(f.valid() == true); }\n \n     template <typename F, typename... FS>\n     void check_valid_future(const F& f, const FS&... fs) {\n         BOOST_REQUIRE(f.valid() == true);\n-        BOOST_REQUIRE(!f.exception());\n         check_valid_future(fs...);\n     }\n \n@@ -136,32 +115,30 @@ struct test_fixture {\n     }\n \n     template <typename E, typename... F>\n-    void wait_until_future_fails(F&... f) {\n-        (void)std::initializer_list<int>{(wait_until_this_future_fails<E>(f), 0)...};\n+    void wait_until_future_fails(F&&... f) {\n+        (void)std::initializer_list<int>{\n+            (wait_until_this_future_fails<E>(std::forward<F>(f)), 0)...};\n     }\n \n     void wait_until_all_tasks_completed() {\n         while (_task_counter.load() != 0) {\n-            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n+            stlab::invoke_waiting(\n+                [] { std::this_thread::sleep_for(std::chrono::milliseconds(1)); });\n         }\n     }\n \n     std::atomic_int _task_counter{0};\n \n private:\n     template <typename F>\n-    void wait_until_future_is_ready(F& f) {\n-        while (!f.get_try()) {\n-            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n-        }\n+    void wait_until_future_is_ready(F&& f) {\n+        (void)stlab::await(std::forward<F>(f));\n     }\n \n     template <typename E, typename F>\n-    void wait_until_this_future_fails(F& f) {\n+    void wait_until_this_future_fails(F&& f) {\n         try {\n-            while (!f.get_try()) {\n-                std::this_thread::sleep_for(std::chrono::milliseconds(1));\n-            }\n+            (void)stlab::await(std::forward<F>(f));\n         } catch (const E&) {\n         }\n     }"},{"sha":"30dd39ca107af1a5432ff51c17f3cdc30df9582f","filename":"test/future_tests.cpp","status":"modified","additions":3,"deletions":4,"changes":7,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -230,7 +230,6 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(future_constructed_minimal_fn, T, copyable_test_ty\n     {\n         auto sut = async(make_executor<0>(), []() -> T { return T(0); });\n         BOOST_REQUIRE(sut.valid() == true);\n-        BOOST_REQUIRE(!sut.exception());\n \n         sut.reset();\n         BOOST_REQUIRE(sut.valid() == false);\n@@ -249,12 +248,12 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(future_constructed_minimal_fn_with_parameters,\n     {\n         auto sut = async(make_executor<0>(), [](auto x) -> T { return x + T(0); }, T(42));\n         BOOST_REQUIRE(sut.valid() == true);\n-        BOOST_REQUIRE(!sut.exception());\n \n         while (!sut.get_try()) {\n             std::this_thread::sleep_for(std::chrono::milliseconds(1));\n         }\n \n+        BOOST_REQUIRE(!sut.exception());\n         BOOST_WARN_EQUAL(T(42) + T(0), *sut.get_try());\n     }\n     BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n@@ -265,14 +264,14 @@ BOOST_AUTO_TEST_CASE(future_constructed_minimal_fn_moveonly) {\n \n     test_setup setup;\n     {\n-        auto sut = async(make_executor<0>(), []() -> v1::move_only { return v1::move_only{42}; });\n+        auto sut = async(make_executor<0>(), []() -> stlab::move_only { return stlab::move_only{42}; });\n         BOOST_REQUIRE(sut.valid() == true);\n-        BOOST_REQUIRE(!sut.exception());\n \n         while (!sut.get_try()) {\n             std::this_thread::sleep_for(std::chrono::milliseconds(1));\n         }\n \n+        BOOST_REQUIRE(!sut.exception());\n         BOOST_REQUIRE_EQUAL(42, sut.get_try()->member());\n     }\n     BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());"},{"sha":"88df30b7bf179a8f82cf90fb051d63428d4c7c8c","filename":"test/future_then_tests.cpp","status":"modified","additions":150,"deletions":155,"changes":305,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_then_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_then_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_then_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -27,7 +27,7 @@ BOOST_AUTO_TEST_CASE(future_void_single_task) {\n \n     int p = 0;\n \n-    sut = async(make_executor<0>(), [& _p = p] { _p = 42; });\n+    sut = async(make_executor<0>(), [&_p = p] { _p = 42; });\n \n     check_valid_future(sut);\n     wait_until_future_completed(sut);\n@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(future_void_single_task_detached) {\n \n     atomic_int p{0};\n     {\n-        auto detached = async(make_executor<0>(), [& _p = p] { _p = 42; });\n+        auto detached = async(make_executor<0>(), [&_p = p] { _p = 42; });\n         detached.detach();\n     }\n     while (p.load() != 42) {\n@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_same_scheduler_then_on_rvalue) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }).then([& _p = p] { _p += 42; });\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then([&_p = p] { _p += 42; });\n \n         check_valid_future(sut);\n         wait_until_future_completed(sut);\n@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_same_scheduler_then_on_rvalue) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }) | [& _p = p] { _p += 42; };\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }) | [&_p = p] { _p += 42; };\n \n         check_valid_future(sut);\n         wait_until_future_completed(sut);\n@@ -89,9 +89,9 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_same_scheduler_then_on_lvalue) {\n \n     {\n         atomic_int p{0};\n-        auto interim = async(make_executor<0>(), [& _p = p] { _p = 42; });\n+        auto interim = async(make_executor<0>(), [&_p = p] { _p = 42; });\n \n-        sut = interim.then([& _p = p] { _p += 42; });\n+        sut = interim.then([&_p = p] { _p += 42; });\n \n         check_valid_future(sut);\n         wait_until_future_completed(sut);\n@@ -101,9 +101,9 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_same_scheduler_then_on_lvalue) {\n     }\n     {\n         atomic_int p{0};\n-        auto interim = async(make_executor<0>(), [& _p = p] { _p = 42; });\n+        auto interim = async(make_executor<0>(), [&_p = p] { _p = 42; });\n \n-        sut = interim | [& _p = p] { _p += 42; };\n+        sut = interim | [&_p = p] { _p += 42; };\n \n         check_valid_future(sut);\n         wait_until_future_completed(sut);\n@@ -119,8 +119,7 @@ BOOST_AUTO_TEST_CASE(future_int_void_two_tasks_with_same_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut =\n-            async(make_executor<0>(), [] { return 42; }).then([& _p = p](auto x) { _p = x + 42; });\n+        sut = async(make_executor<0>(), [] { return 42; }).then([&_p = p](auto x) { _p = x + 42; });\n         check_valid_future(sut);\n \n         wait_until_future_completed(sut);\n@@ -131,7 +130,7 @@ BOOST_AUTO_TEST_CASE(future_int_void_two_tasks_with_same_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [] { return 42; }) | [& _p = p](auto x) { _p = x + 42; };\n+        sut = async(make_executor<0>(), [] { return 42; }) | [&_p = p](auto x) { _p = x + 42; };\n         check_valid_future(sut);\n \n         wait_until_future_completed(sut);\n@@ -149,7 +148,7 @@ BOOST_AUTO_TEST_CASE(future_int_void_two_tasks_with_different_scheduler) {\n \n         sut = async(make_executor<0>(), [] {\n                   return 42;\n-              }).then(make_executor<1>(), [& _p = p](auto x) { _p = x + 42; });\n+              }).then(make_executor<1>(), [&_p = p](auto x) { _p = x + 42; });\n         check_valid_future(sut);\n \n         wait_until_future_completed(sut);\n@@ -162,7 +161,7 @@ BOOST_AUTO_TEST_CASE(future_int_void_two_tasks_with_different_scheduler) {\n         atomic_int p{0};\n \n         sut = async(make_executor<0>(), [] { return 42; }) |\n-              (executor{make_executor<1>()} & [& _p = p](auto x) { _p = x + 42; });\n+              (executor{make_executor<1>()} & [&_p = p](auto x) { _p = x + 42; });\n \n         check_valid_future(sut);\n \n@@ -180,9 +179,9 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_different_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] {\n-                  _p = 42;\n-              }).then(make_executor<1>(), [& _p = p] { _p += 42; });\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then(make_executor<1>(), [&_p = p] {\n+            _p += 42;\n+        });\n         check_valid_future(sut);\n \n         wait_until_future_completed(sut);\n@@ -198,8 +197,8 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_with_different_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }) |\n-              (executor{make_executor<1>()} & [& _p = p] { _p += 42; });\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }) |\n+              (executor{make_executor<1>()} & [&_p = p] { _p += 42; });\n \n         check_valid_future(sut);\n \n@@ -226,9 +225,9 @@ BOOST_AUTO_TEST_CASE(future_void_Y_formation_tasks_with_same_scheduler) {\n         int r1 = 0;\n         int r2 = 0;\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; });\n-        auto f1 = sut.then([& _p = p, &_r = r1] { _r = 42 + _p; });\n-        auto f2 = sut.then([& _p = p, &_r = r2] { _r = 4711 + _p; });\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; });\n+        auto f1 = sut.then([&_p = p, &_r = r1] { _r = 42 + _p; });\n+        auto f2 = sut.then([&_p = p, &_r = r2] { _r = 4711 + _p; });\n \n         check_valid_future(sut, f1, f2);\n         wait_until_future_completed(f1, f2);\n@@ -242,9 +241,9 @@ BOOST_AUTO_TEST_CASE(future_void_Y_formation_tasks_with_same_scheduler) {\n         int r1 = 0;\n         int r2 = 0;\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; });\n-        auto f1 = sut | [& _p = p, &_r = r1] { _r = 42 + _p; };\n-        auto f2 = sut | [& _p = p, &_r = r2] { _r = 4711 + _p; };\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; });\n+        auto f1 = sut | [&_p = p, &_r = r1] { _r = 42 + _p; };\n+        auto f2 = sut | [&_p = p, &_r = r2] { _r = 4711 + _p; };\n \n         check_valid_future(sut, f1, f2);\n         wait_until_future_completed(f1, f2);\n@@ -293,10 +292,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_void) {\n         atomic_bool second{false};\n         atomic_int result{0};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return 42;\n-              }).then([& _flag = second, &_result = result](auto x) {\n+              }).then([&_flag = second, &_result = result](auto x) {\n             return async(\n                 default_executor,\n                 [&_flag, &_result](auto x) {\n@@ -318,11 +317,11 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_void) {\n         atomic_int result{0};\n \n         sut = async(default_executor,\n-                    [& _flag = first] {\n+                    [&_flag = first] {\n                         _flag = true;\n                         return 42;\n                     }) |\n-              [& _flag = second, &_result = result](auto x) {\n+              [&_flag = second, &_result = result](auto x) {\n                   return async(\n                       default_executor,\n                       [&_flag, &_result](auto x) {\n@@ -346,10 +345,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_void) {\n         atomic_bool first{false};\n         move_only result;\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _result = result](auto&& x) {\n+              }).then([&_result = result](auto&& x) {\n             return async(\n                 default_executor, [&_result](auto&& x) { _result = std::move(x); },\n                 std::forward<move_only>(x));\n@@ -364,10 +363,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_void) {\n         bool first{false};\n         move_only result;\n \n-        sut = async(immediate_executor, [& _flag = first] {\n+        sut = async(immediate_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _result = result](auto&& x) {\n+              }).then([&_result = result](auto&& x) {\n             return async(\n                 immediate_executor, [&_result](auto&& x) { _result = std::move(x); },\n                 std::forward<move_only>(x));\n@@ -389,17 +388,17 @@ BOOST_AUTO_TEST_CASE(future_non_copyable_single_task) {\n     sut = async(make_executor<0>(), [] { return move_only(42); });\n \n     check_valid_future(sut);\n-    auto result = wait_until_future_r_completed(sut);\n+    auto result = await(std::move(sut));\n \n-    BOOST_REQUIRE_EQUAL(42, result->member());\n+    BOOST_REQUIRE_EQUAL(42, result.member());\n     BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n }\n \n BOOST_AUTO_TEST_CASE(future_then_non_copyable_detach) {\n     BOOST_TEST_MESSAGE(\"running future non copyable, detached\");\n     atomic_bool check{false};\n     {\n-        async(make_executor<0>(), [& _check = check] {\n+        async(make_executor<0>(), [&_check = check] {\n             _check = true;\n             return move_only(42);\n         }).detach();\n@@ -414,12 +413,12 @@ BOOST_AUTO_TEST_CASE(future_non_copyable_capture) {\n \n     move_only m{42};\n \n-    sut = async(make_executor<0>(), [& _m = m] { return move_only(_m.member()); });\n+    sut = async(make_executor<0>(), [&_m = m] { return move_only(_m.member()); });\n \n     check_valid_future(sut);\n-    auto result = wait_until_future_r_completed(sut);\n+    auto result = await(std::move(sut));\n \n-    BOOST_REQUIRE_EQUAL(42, result->member());\n+    BOOST_REQUIRE_EQUAL(42, result.member());\n     BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n }\n \n@@ -433,18 +432,18 @@ BOOST_AUTO_TEST_CASE(\n             async(make_executor<0>(), [] { return 42; }).then([](auto x) { return move_only(x); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n         sut = async(make_executor<0>(), [] { return 42; }) | [](auto x) { return move_only(x); };\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n }\n@@ -460,9 +459,9 @@ BOOST_AUTO_TEST_CASE(\n         });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -475,9 +474,9 @@ BOOST_AUTO_TEST_CASE(\n               (executor{make_executor<1>()} & [](auto x) { return move_only(x); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -494,9 +493,9 @@ BOOST_AUTO_TEST_CASE(\n         sut = interim.then([](auto x) { return move_only(x); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n@@ -505,9 +504,9 @@ BOOST_AUTO_TEST_CASE(\n         sut = interim | [](auto x) { return move_only(x); };\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n }\n@@ -522,9 +521,9 @@ BOOST_AUTO_TEST_CASE(\n         sut = interim.then(make_executor<1>(), [](auto x) { return move_only(x); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -536,9 +535,9 @@ BOOST_AUTO_TEST_CASE(\n         sut = interim | (executor{make_executor<1>()} & [](auto x) { return move_only(x); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -554,19 +553,19 @@ BOOST_AUTO_TEST_CASE(future_non_copyable_as_continuation_with_same_scheduler_the\n         });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42 * 2, result->member());\n+        BOOST_REQUIRE_EQUAL(42 * 2, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n         sut = async(make_executor<0>(), [] { return move_only(42); }) |\n               [](auto&& x) { return move_only(x.member() * 2); };\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42 * 2, result->member());\n+        BOOST_REQUIRE_EQUAL(42 * 2, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n }\n@@ -580,9 +579,9 @@ BOOST_AUTO_TEST_CASE(future_non_copyable_as_continuation_with_different_schedule\n               }).then(make_executor<1>(), [](auto x) { return move_only(x.member() * 2); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42 * 2, result->member());\n+        BOOST_REQUIRE_EQUAL(42 * 2, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -595,9 +594,9 @@ BOOST_AUTO_TEST_CASE(future_non_copyable_as_continuation_with_different_schedule\n               (executor{make_executor<1>()} & [](auto x) { return move_only(x.member() * 2); });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42 * 2, result->member());\n+        BOOST_REQUIRE_EQUAL(42 * 2, result.member());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<0>::usage_counter());\n         BOOST_REQUIRE_EQUAL(1, custom_scheduler<1>::usage_counter());\n     }\n@@ -611,24 +610,22 @@ BOOST_AUTO_TEST_CASE(future_async_move_only_move_captured_to_result) {\n     BOOST_TEST_MESSAGE(\"running future move only move to result\");\n \n     {\n-        sut = async(make_executor<0>(), [] { return move_only{42}; }).then([](auto x) {\n-            return x;\n-        });\n+        sut =\n+            async(make_executor<0>(), [] { return move_only{42}; }).then([](auto x) { return x; });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n-        sut = async(make_executor<0>(), [] { return move_only{42}; }) |\n-              [](auto x) { return x; };\n+        sut = async(make_executor<0>(), [] { return move_only{42}; }) | [](auto x) { return x; };\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n }\n@@ -638,12 +635,12 @@ BOOST_AUTO_TEST_CASE(future_async_moving_move_only_capture_to_result) {\n \n     move_only m{42};\n \n-    sut = async(make_executor<0>(), [& _m = m] { return std::move(_m); });\n+    sut = async(make_executor<0>(), [&_m = m] { return std::move(_m); });\n \n     check_valid_future(sut);\n-    auto result = wait_until_future_r_completed(sut);\n+    auto result = await(std::move(sut));\n \n-    BOOST_REQUIRE_EQUAL(42, result->member());\n+    BOOST_REQUIRE_EQUAL(42, result.member());\n     BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n }\n \n@@ -652,12 +649,12 @@ BOOST_AUTO_TEST_CASE(future_async_mutable_move_move_only_capture_to_result) {\n \n     move_only m{42};\n \n-    sut = async(make_executor<0>(), [& _m = m]() { return std::move(_m); });\n+    sut = async(make_executor<0>(), [&_m = m]() { return std::move(_m); });\n \n     check_valid_future(sut);\n-    auto result = wait_until_future_r_completed(sut);\n+    auto result = await(std::move(sut));\n \n-    BOOST_REQUIRE_EQUAL(42, result->member());\n+    BOOST_REQUIRE_EQUAL(42, result.member());\n     BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n }\n \n@@ -666,14 +663,14 @@ BOOST_AUTO_TEST_CASE(future_continuation_moving_move_only_capture_to_result) {\n \n     move_only m{42};\n \n-    sut = async(make_executor<0>(), [] { return move_only{10}; }).then([& _m = m](auto) {\n+    sut = async(make_executor<0>(), [] { return move_only{10}; }).then([&_m = m](auto) {\n         return std::move(_m);\n     });\n \n     check_valid_future(sut);\n-    auto result = wait_until_future_r_completed(sut);\n+    auto result = await(std::move(sut));\n \n-    BOOST_REQUIRE_EQUAL(42, result->member());\n+    BOOST_REQUIRE_EQUAL(42, result.member());\n     BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n }\n \n@@ -683,26 +680,26 @@ BOOST_AUTO_TEST_CASE(future_continuation_async_mutable_move_move_only_capture_to\n     {\n         move_only m{42};\n \n-        sut = async(make_executor<0>(), []() {\n-                  return move_only{10};\n-              }).then([& _m = m](auto) { return std::move(_m); });\n+        sut = async(make_executor<0>(), []() { return move_only{10}; }).then([&_m = m](auto) {\n+            return std::move(_m);\n+        });\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n         move_only m{42};\n \n         sut = async(make_executor<0>(), []() { return move_only{10}; }) |\n-              [& _m = m](auto) { return std::move(_m); };\n+              [&_m = m](auto) { return std::move(_m); };\n \n         check_valid_future(sut);\n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n-        BOOST_REQUIRE_EQUAL(42, result->member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n }\n@@ -713,10 +710,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _flag = second](auto&& x) {\n+              }).then([&_flag = second](auto&& x) {\n             return async(\n                 default_executor,\n                 [&_flag](auto&& x) {\n@@ -726,20 +723,20 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only) {\n                 std::forward<move_only>(x));\n         });\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n         BOOST_REQUIRE(first);\n         BOOST_REQUIRE(second);\n-        BOOST_REQUIRE_EQUAL(42, (*result).member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n     }\n     {\n         bool first{false};\n         bool second{false};\n \n-        sut = async(immediate_executor, [& _flag = first] {\n+        sut = async(immediate_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _flag = second](auto&& x) {\n+              }).then([&_flag = second](auto&& x) {\n             return async(\n                 immediate_executor,\n                 [&_flag](auto&& x) {\n@@ -749,26 +746,24 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only) {\n                 std::forward<move_only>(x));\n         });\n \n-        auto result = wait_until_future_r_completed(sut);\n+        auto result = await(std::move(sut));\n \n         BOOST_REQUIRE(first);\n         BOOST_REQUIRE(second);\n-        BOOST_REQUIRE_EQUAL(42, (*result).member());\n+        BOOST_REQUIRE_EQUAL(42, result.member());\n     }\n }\n \n BOOST_AUTO_TEST_SUITE_END()\n \n-\n-namespace stlab\n-{\n+namespace stlab {\n \n // specializing std::vector, so that the framework can detect correctly\n // if std::vector<move_only> is copyable or only moveable\n-template<template<typename> class test, typename T, typename A>\n+template <template <typename> class test, typename T, typename A>\n struct smart_test<test, std::vector<T, A>> : test<T> {};\n \n-}\n+} // namespace stlab\n \n BOOST_FIXTURE_TEST_SUITE(future_then_move_only_container, test_fixture<std::vector<move_only>>)\n \n@@ -777,12 +772,12 @@ BOOST_AUTO_TEST_CASE(future_continuation_async_move_only_container) {\n \n     {\n         sut = async(make_executor<0>(), []() {\n-            std::vector<move_only> result;\n-            result.emplace_back(10);\n-            result.emplace_back(42);\n+                  std::vector<move_only> result;\n+                  result.emplace_back(10);\n+                  result.emplace_back(42);\n \n-            return result;\n-        }).then([](auto x) {\n+                  return result;\n+              }).then([](auto x) {\n             x.emplace_back(50);\n             return x;\n         });\n@@ -797,16 +792,18 @@ BOOST_AUTO_TEST_CASE(future_continuation_async_move_only_container) {\n         BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n     }\n     {\n-        sut = async(make_executor<0>(), []() {\n-            std::vector<move_only> result;\n-            result.emplace_back(10);\n-            result.emplace_back(42);\n+        sut = async(make_executor<0>(),\n+                    []() {\n+                        std::vector<move_only> result;\n+                        result.emplace_back(10);\n+                        result.emplace_back(42);\n \n-            return result;\n-        }) | [](auto x) {\n-            x.emplace_back(50);\n-            return x;\n-        };\n+                        return result;\n+                    }) |\n+              [](auto x) {\n+                  x.emplace_back(50);\n+                  return x;\n+              };\n \n         check_valid_future(sut);\n         auto result = stlab::await(std::move(sut));\n@@ -821,8 +818,6 @@ BOOST_AUTO_TEST_CASE(future_continuation_async_move_only_container) {\n \n BOOST_AUTO_TEST_SUITE_END()\n \n-\n-\n BOOST_FIXTURE_TEST_SUITE(future_then_int, test_fixture<int>)\n \n BOOST_AUTO_TEST_CASE(future_int_single_task) {\n@@ -856,7 +851,7 @@ BOOST_AUTO_TEST_CASE(future_int_single_task_detached) {\n     BOOST_TEST_MESSAGE(\"running future int single tasks, detached\");\n     atomic_bool check{false};\n     {\n-        auto detached = async(make_executor<0>(), [& _check = check] {\n+        auto detached = async(make_executor<0>(), [&_check = check] {\n             _check = true;\n             return 42;\n         });\n@@ -938,7 +933,7 @@ BOOST_AUTO_TEST_CASE(future_void_int_two_tasks_with_same_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }).then([& _p = p] {\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then([&_p = p] {\n             _p += 42;\n             return _p.load();\n         });\n@@ -952,7 +947,7 @@ BOOST_AUTO_TEST_CASE(future_void_int_two_tasks_with_same_scheduler) {\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }) | [& _p = p] {\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }) | [&_p = p] {\n             _p += 42;\n             return _p.load();\n         };\n@@ -970,7 +965,7 @@ BOOST_AUTO_TEST_CASE(future_void_int_two_tasks_with_different_scheduler) {\n \n     atomic_int p{0};\n \n-    sut = async(make_executor<0>(), [& _p = p] { _p = 42; }).then(make_executor<1>(), [& _p = p] {\n+    sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then(make_executor<1>(), [&_p = p] {\n         _p += 42;\n         return _p.load();\n     });\n@@ -1057,7 +1052,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_void_to_int) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] { _flag = true; }).then([& _flag = second] {\n+        sut = async(default_executor, [&_flag = first] { _flag = true; }).then([&_flag = second] {\n             return async(default_executor, [&_flag] {\n                 _flag = true;\n                 return 42;\n@@ -1074,7 +1069,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_void_to_int) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] { _flag = true; }) | [& _flag = second] {\n+        sut = async(default_executor, [&_flag = first] { _flag = true; }) | [&_flag = second] {\n             return async(default_executor, [&_flag] {\n                 _flag = true;\n                 return 42;\n@@ -1096,10 +1091,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_int) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return 42;\n-              }).then([& _flag = second](auto x) {\n+              }).then([&_flag = second](auto x) {\n             return async(\n                 default_executor,\n                 [&_flag](auto x) {\n@@ -1120,11 +1115,11 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_int) {\n         atomic_bool second{false};\n \n         sut = async(default_executor,\n-                    [& _flag = first] {\n+                    [&_flag = first] {\n                         _flag = true;\n                         return 42;\n                     }) |\n-              [& _flag = second](auto x) {\n+              [&_flag = second](auto x) {\n                   return async(\n                       default_executor,\n                       [&_flag](auto x) {\n@@ -1165,7 +1160,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_error_in_1st_task_with_same_scheduler\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [] { throw test_exception(\"failure\"); }).then([& _p = p] {\n+        sut = async(make_executor<0>(), [] { throw test_exception(\"failure\"); }).then([&_p = p] {\n             _p = 42;\n         });\n \n@@ -1178,7 +1173,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_error_in_1st_task_with_same_scheduler\n         atomic_int p{0};\n \n         sut = async(make_executor<0>(), [] { throw test_exception(\"failure\"); }) |\n-              [& _p = p] { _p = 42; };\n+              [&_p = p] { _p = 42; };\n \n         wait_until_future_fails<test_exception>(sut);\n         check_failure<test_exception>(sut, \"failure\");\n@@ -1193,7 +1188,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_error_in_2nd_task_with_same_scheduler\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }).then([& _p = p] {\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then([&_p = p] {\n             (void)_p;\n             throw test_exception(\"failure\");\n         });\n@@ -1207,7 +1202,7 @@ BOOST_AUTO_TEST_CASE(future_void_two_tasks_error_in_2nd_task_with_same_scheduler\n     {\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }) | [& _p = p] {\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }) | [&_p = p] {\n             (void)_p;\n             throw test_exception(\"failure\");\n         };\n@@ -1227,7 +1222,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_void_to_void_error) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] { _flag = true; }).then([& _flag = second] {\n+        sut = async(default_executor, [&_flag = first] { _flag = true; }).then([&_flag = second] {\n             return async(default_executor, [&_flag] {\n                 _flag = true;\n                 throw test_exception(\"failure\");\n@@ -1243,7 +1238,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_void_to_void_error) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] { _flag = true; }) | [& _flag = second] {\n+        sut = async(default_executor, [&_flag = first] { _flag = true; }) | [&_flag = second] {\n             return async(default_executor, [&_flag] {\n                 _flag = true;\n                 throw test_exception(\"failure\");\n@@ -1263,10 +1258,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_void_when_inner_future_fails)\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _check = second](auto&& x) {\n+              }).then([&_check = second](auto&& x) {\n             return async(\n                 default_executor,\n                 [&_check](auto&&) {\n@@ -1285,10 +1280,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_void_when_inner_future_fails)\n         bool first{false};\n         bool second{false};\n \n-        sut = async(immediate_executor, [& _flag = first] {\n+        sut = async(immediate_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _check = second](auto&& x) {\n+              }).then([&_check = second](auto&& x) {\n             return async(\n                 immediate_executor,\n                 [&_check](auto&&) {\n@@ -1328,7 +1323,7 @@ BOOST_AUTO_TEST_CASE(future_int_two_tasks_error_in_1st_task_with_same_scheduler)\n \n         sut = async(make_executor<0>(), [] {\n                   throw test_exception(\"failure\");\n-              }).then([& _p = p]() -> int {\n+              }).then([&_p = p]() -> int {\n             _p = 42;\n             return _p;\n         });\n@@ -1344,7 +1339,7 @@ BOOST_AUTO_TEST_CASE(future_int_two_tasks_error_in_1st_task_with_same_scheduler)\n         int p = 0;\n \n         sut = async(make_executor<0>(), [] { throw test_exception(\"failure\"); }) |\n-              [& _p = p]() -> int {\n+              [&_p = p]() -> int {\n             _p = 42;\n             return _p;\n         };\n@@ -1364,7 +1359,7 @@ BOOST_AUTO_TEST_CASE(future_int_two_tasks_error_in_2nd_task_with_same_scheduler)\n         custom_scheduler<0>::reset();\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }).then([]() -> int {\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }).then([]() -> int {\n             throw test_exception(\"failure\");\n         });\n \n@@ -1378,7 +1373,7 @@ BOOST_AUTO_TEST_CASE(future_int_two_tasks_error_in_2nd_task_with_same_scheduler)\n         custom_scheduler<0>::reset();\n         atomic_int p{0};\n \n-        sut = async(make_executor<0>(), [& _p = p] { _p = 42; }) |\n+        sut = async(make_executor<0>(), [&_p = p] { _p = 42; }) |\n               []() -> int { throw test_exception(\"failure\"); };\n \n         wait_until_future_fails<test_exception>(sut);\n@@ -1395,11 +1390,11 @@ BOOST_AUTO_TEST_CASE(future_int_Y_formation_tasks_with_failing_1st_task) {\n     atomic_int p{0};\n \n     sut = async(make_executor<0>(), []() -> int { throw test_exception(\"failure\"); });\n-    auto f1 = sut.then(make_executor<0>(), [& _p = p](auto x) -> int {\n+    auto f1 = sut.then(make_executor<0>(), [&_p = p](auto x) -> int {\n         _p += 1;\n         return x + 42;\n     });\n-    auto f2 = sut.then(make_executor<0>(), [& _p = p](auto x) -> int {\n+    auto f2 = sut.then(make_executor<0>(), [&_p = p](auto x) -> int {\n         _p += 1;\n         return x + 4177;\n     });\n@@ -1446,9 +1441,9 @@ BOOST_AUTO_TEST_CASE(reduction_future_void_to_int_error) {\n     atomic_bool first{false};\n     atomic_bool second{false};\n \n-    sut = async(default_executor, [& _flag = first] {\n+    sut = async(default_executor, [&_flag = first] {\n               _flag = true;\n-          }).then([& _flag = second]() -> future<int> {\n+          }).then([&_flag = second]() -> future<int> {\n         (void)_flag;\n         throw test_exception(\"failure\");\n     });\n@@ -1466,10 +1461,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_int_error) {\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return 42;\n-              }).then([& _flag = second](auto x) {\n+              }).then([&_flag = second](auto x) {\n             return async(\n                 default_executor,\n                 [&_flag](auto) -> int {\n@@ -1489,11 +1484,11 @@ BOOST_AUTO_TEST_CASE(reduction_future_int_to_int_error) {\n         atomic_bool second{false};\n \n         sut = async(default_executor,\n-                    [& _flag = first] {\n+                    [&_flag = first] {\n                         _flag = true;\n                         return 42;\n                     }) |\n-              [& _flag = second](auto x) {\n+              [&_flag = second](auto x) {\n                   return async(\n                       default_executor,\n                       [&_flag](auto) -> int {\n@@ -1520,10 +1515,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only_when_inner_future_f\n         atomic_bool first{false};\n         atomic_bool second{false};\n \n-        sut = async(default_executor, [& _flag = first] {\n+        sut = async(default_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _flag = second](auto&& x) {\n+              }).then([&_flag = second](auto&& x) {\n             return async(\n                 default_executor,\n                 [&_flag](auto&&) -> move_only {\n@@ -1533,7 +1528,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only_when_inner_future_f\n                 std::forward<move_only>(x));\n         });\n \n-        wait_until_future_fails<test_exception>(sut);\n+        wait_until_future_fails<test_exception>(std::move(sut));\n \n         BOOST_REQUIRE(first);\n         BOOST_REQUIRE(second);\n@@ -1542,10 +1537,10 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only_when_inner_future_f\n         bool first{false};\n         bool second{false};\n \n-        sut = async(immediate_executor, [& _flag = first] {\n+        sut = async(immediate_executor, [&_flag = first] {\n                   _flag = true;\n                   return move_only(42);\n-              }).then([& _flag = second](auto&& x) {\n+              }).then([&_flag = second](auto&& x) {\n             return async(\n                 immediate_executor,\n                 [&_flag](auto&&) -> move_only {\n@@ -1555,7 +1550,7 @@ BOOST_AUTO_TEST_CASE(reduction_future_move_only_to_move_only_when_inner_future_f\n                 std::forward<move_only>(x));\n         });\n \n-        wait_until_future_fails<test_exception>(sut);\n+        wait_until_future_fails<test_exception>(std::move(sut));\n \n         BOOST_REQUIRE(first);\n         BOOST_REQUIRE(second);"},{"sha":"b753908e69af89b19ca588f248abdf2176c093e4","filename":"test/future_when_all_arguments_tests.cpp","status":"modified","additions":4,"deletions":4,"changes":8,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_all_arguments_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_all_arguments_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_all_arguments_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -172,9 +172,9 @@ BOOST_AUTO_TEST_CASE(future_when_all_args_move_only_with_one_element) {\n   sut = when_all(make_executor<1>(), [](auto x) { return move_only(x.member() + x.member()); }, std::move(f1));\n \n   check_valid_future(sut);\n-  wait_until_future_completed(sut);\n+  auto result = await(std::move(sut));\n \n-  BOOST_REQUIRE_EQUAL(42 + 42, (*sut.get_try()).member());\n+  BOOST_REQUIRE_EQUAL(42 + 42, result.member());\n   BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n   BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }\n@@ -193,9 +193,9 @@ BOOST_AUTO_TEST_CASE(future_when_all_args_move_only_with_many_elements) {\n     std::move(f1), std::move(f2), std::move(f3), std::move(f4));\n \n   check_valid_future(sut);\n-  wait_until_future_completed(sut);\n+  auto result = await(std::move(sut));\n \n-  BOOST_REQUIRE_EQUAL(1 * 7 + 2 * 11 + 3 * 13 + 5 * 17, (*sut.get_try()).member());\n+  BOOST_REQUIRE_EQUAL(1 * 7 + 2 * 11 + 3 * 13 + 5 * 17, result.member());\n   BOOST_REQUIRE_LE(4, custom_scheduler<0>::usage_counter());\n   BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }"},{"sha":"647db8776e7bb84c68315e8ff19ff3edf601a3d8","filename":"test/future_when_all_range_tests.cpp","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_all_range_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_all_range_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_all_range_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -326,10 +326,10 @@ BOOST_AUTO_TEST_CASE(future_when_all_move_range_with_many_elements) {\n                    std::make_pair(futures.begin(), futures.end()));\n \n     check_valid_future(sut);\n-    wait_until_future_completed(sut);\n+    auto result = await(std::move(sut));\n \n     BOOST_REQUIRE_EQUAL(size_t(4), p);\n-    BOOST_REQUIRE_EQUAL(1 + 2 + 3 + 5, (*sut.get_try()).member() );\n+    BOOST_REQUIRE_EQUAL(1 + 2 + 3 + 5, result.member() );\n     BOOST_REQUIRE_LE(4, custom_scheduler<0>::usage_counter());\n     BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }"},{"sha":"9861b5b9d1ca554aed58d4c315abdaca2a718bc8","filename":"test/future_when_any_arguments_tests.cpp","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_any_arguments_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_any_arguments_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_any_arguments_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -440,10 +440,10 @@ BOOST_AUTO_TEST_CASE(future_when_any_move_only_argument_with_one_argument) {\n \n   check_valid_future(sut);\n \n-  wait_until_future_completed(sut);\n+  auto result = await(std::move(sut));\n \n   BOOST_REQUIRE_EQUAL(size_t(0), index);\n-  BOOST_REQUIRE_EQUAL(4711, (*sut.get_try()).member());\n+  BOOST_REQUIRE_EQUAL(4711, result.member());\n   BOOST_REQUIRE_LE(1, custom_scheduler<0>::usage_counter());\n   BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }"},{"sha":"9bb9e9741fd857c85fe4e5fec3fe8354632f4dd5","filename":"test/future_when_any_range_tests.cpp","status":"modified","additions":3,"deletions":2,"changes":5,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_any_range_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ffuture_when_any_range_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_any_range_tests.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -601,6 +601,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_move_only_range_with_diamond_formation_elem\n   thread_block_context block_context;\n \n   size_t index = 0;\n+  std::optional<move_only> result;\n   {\n     lock_t lock(*block_context._mutex);\n     auto start = async(make_executor<0>(), [] { return 4711; });\n@@ -630,15 +631,15 @@ BOOST_AUTO_TEST_CASE(future_when_any_move_only_range_with_diamond_formation_elem\n       std::make_pair(futures.begin(), futures.end()));\n \n     check_valid_future(sut);\n-    wait_until_future_completed(sut);\n+    result = await(std::move(sut));\n     block_context._go = true;\n   }\n \n   block_context._thread_block.notify_all();\n   wait_until_all_tasks_completed();\n \n   BOOST_REQUIRE_EQUAL(size_t(1), index);\n-  BOOST_REQUIRE_EQUAL(4711 + 2, (*sut.get_try()).member());\n+  BOOST_REQUIRE_EQUAL(4711 + 2, result->member());\n   BOOST_REQUIRE_LE(2, custom_scheduler<0>::usage_counter());\n   BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }"},{"sha":"562dc690542cd6db17cce8eafdc0a10f31d95e95","filename":"test/tuple_test.cpp","status":"modified","additions":10,"deletions":12,"changes":22,"blob_url":"https://github.com/stlab/stlab/blob/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ftuple_test.cpp","raw_url":"https://github.com/stlab/stlab/raw/2f4037b5454a53f3cfb9c201d8cac8edf7b33655/test%2Ftuple_test.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ftuple_test.cpp?ref=2f4037b5454a53f3cfb9c201d8cac8edf7b33655","patch":"@@ -54,11 +54,10 @@ using namespace stlab;\n /**************************************************************************************************/\n \n BOOST_AUTO_TEST_CASE(remove_placeholder_test) {\n-    auto x = std::make_tuple(10, detail::placeholder(), 25.0, detail::placeholder());\n+    auto x = std::make_tuple(10, placeholder(), 25.0, placeholder());\n \n-    detail::apply_indexed<\n-        index_sequence_transform_t<make_index_sequence<tuple_size<decltype(x)>::value>,\n-                                   detail::remove_placeholder<decltype(x)>::function>>(\n+    apply_indexed<index_sequence_transform_t<make_index_sequence<tuple_size<decltype(x)>::value>,\n+                                             remove_placeholder<decltype(x)>::function>>(\n         [](auto... args) { for_each_argument([](auto x) { cout << x << endl; }, args...); }, x);\n }\n \n@@ -67,11 +66,10 @@ BOOST_AUTO_TEST_CASE(remove_placeholder_test) {\n BOOST_AUTO_TEST_CASE(add_placeholder_test) {\n     using interim_t = placeholder_tuple<int, void, int, void>;\n \n-    auto x = interim_t(10, detail::placeholder(), 25, detail::placeholder());\n+    auto x = interim_t(10, placeholder(), 25, placeholder());\n \n-    detail::apply_indexed<\n-        index_sequence_transform_t<make_index_sequence<tuple_size<decltype(x)>::value>,\n-                                   detail::remove_placeholder<decltype(x)>::function>>(\n+    apply_indexed<index_sequence_transform_t<make_index_sequence<tuple_size<decltype(x)>::value>,\n+                                             remove_placeholder<decltype(x)>::function>>(\n         [](auto... args) { for_each_argument([](auto x) { cout << x << endl; }, args...); }, x);\n }\n \n@@ -82,7 +80,7 @@ void when_all_typecheck(F, future<Ts>...) {\n     using pt_t = placeholder_tuple<Ts...>;\n     using opt_t = optional_placeholder_tuple<Ts...>;\n     using vt_t = voidless_tuple<Ts...>;\n-    using result_t = decltype(detail::apply_tuple(std::declval<F>(), std::declval<vt_t>()));\n+    using result_t = decltype(apply_ignore_placeholders(std::declval<F>(), std::declval<vt_t>()));\n \n     cout << \"pt: \" << demangle<pt_t>() << \"\\n\";\n     cout << \"opt_t: \" << demangle<opt_t>() << \"\\n\";\n@@ -192,9 +190,9 @@ BOOST_AUTO_TEST_CASE(future_when_all_int_void_string_void_bool_void) {\n BOOST_AUTO_TEST_CASE(future_when_any_void) {\n     auto fv = [] { return stlab::make_ready_future(stlab::default_executor); };\n \n-    auto f =\n-        when_any(stlab::default_executor, [](size_t index) { std::cout << \"f: \" << index << '\\n'; },\n-                 fv(), fv(), fv(), fv(), fv(), fv());\n+    auto f = when_any(\n+        stlab::default_executor, [](size_t index) { std::cout << \"f: \" << index << '\\n'; }, fv(),\n+        fv(), fv(), fv(), fv(), fv());\n \n     while (!f.get_try())\n         std::this_thread::sleep_for(std::chrono::milliseconds(1));"}]}