diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 662d504..61d88d7 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -776,7 +776,7 @@ public: using T::operator(); /// Returns the underlaying signature hint - constexpr Hint hint() const noexcept { return {}; } + static constexpr Hint hint() noexcept { return {}; } }; template @@ -787,7 +787,7 @@ constexpr auto make_invoker(T&& invoke, signature_hint_tag) { /// - continuable -> result(nextCallback); template -constexpr auto invokerOf(util::identity>) { +constexpr auto invoker_of(util::identity>) { /// Get the hint of the unwrapped returned continuable using Type = decltype(attorney::materialize( std::declval>())); @@ -805,7 +805,7 @@ constexpr auto invokerOf(util::identity>) { } /// - ? -> nextCallback(?) -template auto invokerOf(util::identity) { +template auto invoker_of(util::identity) { return make_invoker( [](auto&& callback, auto&& nextCallback, auto&&... args) { auto result = std::forward(callback)( @@ -817,7 +817,7 @@ template auto invokerOf(util::identity) { } /// - void -> nextCallback() -inline auto invokerOf(util::identity) { +inline auto invoker_of(util::identity) { return make_invoker( [](auto&& callback, auto&& nextCallback, auto&&... args) { std::forward(callback)( @@ -830,7 +830,7 @@ inline auto invokerOf(util::identity) { /// Returns a sequenced invoker which is able to invoke /// objects where std::get is applicable. -inline auto sequencedUnpackInvoker() { +inline auto sequenced_unpack_invoker() { return [](auto&& callback, auto&& nextCallback, auto&&... args) { auto result = std::forward(callback)( std::forward(args)...); @@ -846,15 +846,15 @@ inline auto sequencedUnpackInvoker() { // - std::pair -> nextCallback(?, ?) template -constexpr auto invokerOf(util::identity>) { - return make_invoker(sequencedUnpackInvoker(), +constexpr auto invoker_of(util::identity>) { + return make_invoker(sequenced_unpack_invoker(), util::identity{}); } // - std::tuple -> nextCallback(?...) template -constexpr auto invokerOf(util::identity>) { - return make_invoker(sequencedUnpackInvoker(), util::identity{}); +constexpr auto invoker_of(util::identity>) { + return make_invoker(sequenced_unpack_invoker(), util::identity{}); } } // end namespace decoration @@ -929,7 +929,7 @@ void invoke_proxy(signature_hint_tag, Continuation&& continuation, util::identity_of(); // Pick the correct invoker that handles decorating of the result - auto invoker = decoration::invokerOf(result); + auto invoker = decoration::invoker_of(result); // Invoke the callback packed_dispatch(std::move(executor), std::move(invoker), @@ -942,7 +942,7 @@ void invoke_proxy(signature_hint_tag, Continuation&& continuation, template constexpr auto next_hint_of(util::identity /*callback*/, signature_hint_tag /*current*/) { - return decoration::invokerOf(util::identity_of()( + return decoration::invoker_of(util::identity_of()( std::declval()...))>()) .hint(); } diff --git a/test/mock/test-mock.cpp b/test/mock/test-mock.cpp index a1c6b56..729f030 100644 --- a/test/mock/test-mock.cpp +++ b/test/mock/test-mock.cpp @@ -20,10 +20,10 @@ SOFTWARE. **/ -#include -#include -#include #include +#include +#include +#include struct continuable_base { template continuable_base& then(T&&) { return *this; } @@ -35,9 +35,10 @@ struct continuable_base { template continuable_base& failed(T&&) { return *this; } }; -template -struct accumulator { - auto accumulate() { return [] {}; } +template struct accumulator { + auto accumulate() { + return [] {}; + } }; template