From 41f3429c85b1e84c411a8d696f4c56ea4e8e0228 Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Sun, 27 Jan 2019 03:36:55 +0100 Subject: [PATCH] Remove some using expressions * Those caused issues in namespaces where symbols were preloaded * Formatting fixes --- include/continuable/continuable-base.hpp | 9 ++++----- .../detail/connection/connection-aggregated.hpp | 13 +++++-------- .../detail/connection/connection-any.hpp | 3 +-- include/continuable/detail/other/testing.hpp | 9 ++++----- include/continuable/detail/other/transforms.hpp | 5 ++--- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 3e87317..c6aadcf 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -866,12 +866,11 @@ constexpr auto make_continuable(Continuation&& continuation) { /// \since 3.0.0 template auto make_ready_continuable(Args&&... args) { - using detail::identity; - using detail::base::ready_continuation; - using detail::traits::unrefcv_t; return detail::base::attorney::create_from_raw( - ready_continuation...>{std::forward(args)...}, - identity...>{}, detail::util::ownership{}); + detail::base::ready_continuation...>{ + std::forward(args)...}, + detail::identity...>{}, + detail::util::ownership{}); } /// Returns a continuable_base with the parameterized result which instantly diff --git a/include/continuable/detail/connection/connection-aggregated.hpp b/include/continuable/detail/connection/connection-aggregated.hpp index 3d91cc8..8ae01d6 100644 --- a/include/continuable/detail/connection/connection-aggregated.hpp +++ b/include/continuable/detail/connection/connection-aggregated.hpp @@ -80,8 +80,7 @@ class continuable_box>> { continuable_base> continuable_; public: - explicit continuable_box( - continuable_base>&& continuable) + explicit continuable_box(continuable_base>&& continuable) : continuable_(std::move(continuable)) { } @@ -137,8 +136,7 @@ class continuable_box< public: explicit continuable_box( - continuable_base>&& - continuable) + continuable_base>&& continuable) : continuable_(std::move(continuable)) { } @@ -209,13 +207,12 @@ constexpr auto unbox_continuables(Args&&... args) { namespace detail { template -constexpr auto finalize_impl(identity, Callback&& callback, - Data&&) { +constexpr auto finalize_impl(identity, Callback&& callback, Data&&) { return std::forward(callback)(); } template -constexpr auto finalize_impl(identity>, - Callback&& callback, Data&& data) { +constexpr auto finalize_impl(identity>, Callback&& callback, + Data&& data) { // Call the final callback with the cleaned result return traits::unpack(std::forward(callback), unbox_continuables(std::forward(data))); diff --git a/include/continuable/detail/connection/connection-any.hpp b/include/continuable/detail/connection/connection-any.hpp index e4ef2de..219693d 100644 --- a/include/continuable/detail/connection/connection-any.hpp +++ b/include/continuable/detail/connection/connection-any.hpp @@ -130,8 +130,7 @@ struct result_deducer { return deduce_same_hints(deduce( traversal::container_category_of_t< std::decay_t(std::declval()))>>{}, - identity< - std::decay_t(std::declval()))>>{})...); + identity(std::declval()))>>{})...); } /// Traverse tuple like container diff --git a/include/continuable/detail/other/testing.hpp b/include/continuable/detail/other/testing.hpp index 47c71a4..b028f26 100644 --- a/include/continuable/detail/other/testing.hpp +++ b/include/continuable/detail/other/testing.hpp @@ -179,15 +179,14 @@ template struct assert_async_types_validator { template void operator()(Actual...) { - static_assert(std::is_same, - identity>::value, - "The called arguments don't match with the expected ones!"); + static_assert( + std::is_same, identity>::value, + "The called arguments don't match with the expected ones!"); } }; template -void assert_async_types(C&& continuable, - identity /*expected*/) { +void assert_async_types(C&& continuable, identity /*expected*/) { assert_async_validation(std::forward(continuable), assert_async_types_validator{}); } diff --git a/include/continuable/detail/other/transforms.hpp b/include/continuable/detail/other/transforms.hpp index be33d72..2188570 100644 --- a/include/continuable/detail/other/transforms.hpp +++ b/include/continuable/detail/other/transforms.hpp @@ -33,8 +33,8 @@ #include #include -#include #include +#include #include #include #include @@ -77,8 +77,7 @@ template class promise_callback; template -class promise_callback> - : public future_trait { +class promise_callback> : public future_trait { typename future_trait::promise_t promise_;