From 6e6297194e5410b4e2c04b753e4d3ecda1b45f30 Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Mon, 12 Mar 2018 08:49:21 +0100 Subject: [PATCH] Some minor improvements --- include/continuable/detail/awaiting.hpp | 4 +++- include/continuable/detail/connection-aggregated.hpp | 6 +++--- include/continuable/detail/connection-all.hpp | 6 +++--- include/continuable/detail/connection-any.hpp | 8 ++++---- include/continuable/detail/connection-seq.hpp | 6 +++--- include/continuable/detail/connection.hpp | 6 +++--- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/include/continuable/detail/awaiting.hpp b/include/continuable/detail/awaiting.hpp index 683dc64..34c2488 100644 --- a/include/continuable/detail/awaiting.hpp +++ b/include/continuable/detail/awaiting.hpp @@ -124,6 +124,8 @@ constexpr auto create_awaiter(T&& continuable) { } // namespace detail } // namespace cti +// As far as I know there is no other was to implement this specialization... +// NOLINTNEXTLINE(cert-dcl58-cpp) namespace std { namespace experimental { template @@ -133,7 +135,7 @@ struct coroutine_traits< FunctionArgs...> { static_assert(cti::detail::traits::fail::value, - "Using a continuable as return value from co_return " + "Using a continuable as return type from co_return " "expressions isn't supported yet!"); }; } // namespace experimental diff --git a/include/continuable/detail/connection-aggregated.hpp b/include/continuable/detail/connection-aggregated.hpp index 45bda22..9a6999b 100644 --- a/include/continuable/detail/connection-aggregated.hpp +++ b/include/continuable/detail/connection-aggregated.hpp @@ -28,8 +28,8 @@ SOFTWARE. **/ -#ifndef CONTINUABLE_DETAIL_COMPOSITION_REMAPPING_HPP_INCLUDED -#define CONTINUABLE_DETAIL_COMPOSITION_REMAPPING_HPP_INCLUDED +#ifndef CONTINUABLE_DETAIL_CONNECTION_REMAPPING_HPP_INCLUDED +#define CONTINUABLE_DETAIL_CONNECTION_REMAPPING_HPP_INCLUDED #include #include @@ -238,4 +238,4 @@ constexpr auto hint_of_data() { } // namespace detail } // namespace cti -#endif // CONTINUABLE_DETAIL_COMPOSITION_REMAPPING_HPP_INCLUDED +#endif // CONTINUABLE_DETAIL_CONNECTION_REMAPPING_HPP_INCLUDED diff --git a/include/continuable/detail/connection-all.hpp b/include/continuable/detail/connection-all.hpp index c80c1c4..b18daf5 100644 --- a/include/continuable/detail/connection-all.hpp +++ b/include/continuable/detail/connection-all.hpp @@ -28,8 +28,8 @@ SOFTWARE. **/ -#ifndef CONTINUABLE_DETAIL_COMPOSITION_ALL_HPP_INCLUDED -#define CONTINUABLE_DETAIL_COMPOSITION_ALL_HPP_INCLUDED +#ifndef CONTINUABLE_DETAIL_CONNECTION_ALL_HPP_INCLUDED +#define CONTINUABLE_DETAIL_CONNECTION_ALL_HPP_INCLUDED #include #include @@ -189,4 +189,4 @@ struct connection_finalizer { } // namespace detail } // namespace cti -#endif // CONTINUABLE_DETAIL_COMPOSITION_ALL_HPP_INCLUDED +#endif // CONTINUABLE_DETAIL_CONNECTION_ALL_HPP_INCLUDED diff --git a/include/continuable/detail/connection-any.hpp b/include/continuable/detail/connection-any.hpp index 0f711d0..122c83e 100644 --- a/include/continuable/detail/connection-any.hpp +++ b/include/continuable/detail/connection-any.hpp @@ -28,8 +28,8 @@ SOFTWARE. **/ -#ifndef CONTINUABLE_DETAIL_COMPOSITION_ANY_HPP_INCLUDED -#define CONTINUABLE_DETAIL_COMPOSITION_ANY_HPP_INCLUDED +#ifndef CONTINUABLE_DETAIL_CONNECTION_ANY_HPP_INCLUDED +#define CONTINUABLE_DETAIL_CONNECTION_ANY_HPP_INCLUDED #include #include @@ -170,7 +170,7 @@ template <> struct connection_finalizer { template static auto finalize(Connection&& connection, util::ownership ownership) { - auto signature = decltype(any::result_deducer::deduce( + constexpr auto const signature = decltype(any::result_deducer::deduce( traversal::container_category_of_t>{}, traits::identity>{})){}; @@ -196,4 +196,4 @@ struct connection_finalizer { } // namespace detail } // namespace cti -#endif // CONTINUABLE_DETAIL_COMPOSITION_ANY_HPP_INCLUDED +#endif // CONTINUABLE_DETAIL_CONNECTION_ANY_HPP_INCLUDED diff --git a/include/continuable/detail/connection-seq.hpp b/include/continuable/detail/connection-seq.hpp index 72bb2bb..9da70e8 100644 --- a/include/continuable/detail/connection-seq.hpp +++ b/include/continuable/detail/connection-seq.hpp @@ -28,8 +28,8 @@ SOFTWARE. **/ -#ifndef CONTINUABLE_DETAIL_COMPOSITION_SEQ_HPP_INCLUDED -#define CONTINUABLE_DETAIL_COMPOSITION_SEQ_HPP_INCLUDED +#ifndef CONTINUABLE_DETAIL_CONNECTION_SEQ_HPP_INCLUDED +#define CONTINUABLE_DETAIL_CONNECTION_SEQ_HPP_INCLUDED #include #include @@ -165,4 +165,4 @@ struct connection_finalizer { } // namespace detail } // namespace cti -#endif // CONTINUABLE_DETAIL_COMPOSITION_SEQ_HPP_INCLUDED +#endif // CONTINUABLE_DETAIL_CONNECTION_SEQ_HPP_INCLUDED diff --git a/include/continuable/detail/connection.hpp b/include/continuable/detail/connection.hpp index c0f5af1..9fa2600 100644 --- a/include/continuable/detail/connection.hpp +++ b/include/continuable/detail/connection.hpp @@ -28,8 +28,8 @@ SOFTWARE. **/ -#ifndef CONTINUABLE_DETAIL_COMPOSITION_HPP_INCLUDED -#define CONTINUABLE_DETAIL_COMPOSITION_HPP_INCLUDED +#ifndef CONTINUABLE_DETAIL_CONNECTION_HPP_INCLUDED +#define CONTINUABLE_DETAIL_CONNECTION_HPP_INCLUDED #include #include @@ -203,4 +203,4 @@ auto apply_connection(Strategy, Args&&... args) { } // namespace detail } // namespace cti -#endif // CONTINUABLE_DETAIL_COMPOSITION_HPP_INCLUDED +#endif // CONTINUABLE_DETAIL_CONNECTION_HPP_INCLUDED