mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Some minor improvements
This commit is contained in:
parent
b26e9b5289
commit
6e6297194e
@ -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 <typename Data, typename... Args, typename... FunctionArgs>
|
||||
@ -133,7 +135,7 @@ struct coroutine_traits<
|
||||
FunctionArgs...> {
|
||||
|
||||
static_assert(cti::detail::traits::fail<Data>::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
|
||||
|
||||
@ -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 <cassert>
|
||||
#include <tuple>
|
||||
@ -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
|
||||
|
||||
@ -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 <atomic>
|
||||
#include <memory>
|
||||
@ -189,4 +189,4 @@ struct connection_finalizer<connection_strategy_all_tag> {
|
||||
} // namespace detail
|
||||
} // namespace cti
|
||||
|
||||
#endif // CONTINUABLE_DETAIL_COMPOSITION_ALL_HPP_INCLUDED
|
||||
#endif // CONTINUABLE_DETAIL_CONNECTION_ALL_HPP_INCLUDED
|
||||
|
||||
@ -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 <atomic>
|
||||
#include <memory>
|
||||
@ -170,7 +170,7 @@ template <>
|
||||
struct connection_finalizer<connection_strategy_any_tag> {
|
||||
template <typename Connection>
|
||||
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<std::decay_t<Connection>>{},
|
||||
traits::identity<std::decay_t<Connection>>{})){};
|
||||
|
||||
@ -196,4 +196,4 @@ struct connection_finalizer<connection_strategy_any_tag> {
|
||||
} // namespace detail
|
||||
} // namespace cti
|
||||
|
||||
#endif // CONTINUABLE_DETAIL_COMPOSITION_ANY_HPP_INCLUDED
|
||||
#endif // CONTINUABLE_DETAIL_CONNECTION_ANY_HPP_INCLUDED
|
||||
|
||||
@ -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 <cassert>
|
||||
#include <memory>
|
||||
@ -165,4 +165,4 @@ struct connection_finalizer<connection_strategy_seq_tag> {
|
||||
} // namespace detail
|
||||
} // namespace cti
|
||||
|
||||
#endif // CONTINUABLE_DETAIL_COMPOSITION_SEQ_HPP_INCLUDED
|
||||
#endif // CONTINUABLE_DETAIL_CONNECTION_SEQ_HPP_INCLUDED
|
||||
|
||||
@ -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 <cassert>
|
||||
#include <tuple>
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user