Skip to content

Commit 83e89a9

Browse files
committed
clang-format
1 parent fa074d7 commit 83e89a9

File tree

5 files changed

+36
-31
lines changed

5 files changed

+36
-31
lines changed

include/beman/execution26/detail/basic_sender.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ struct basic_sender : ::beman::execution26::detail::product_type<Tag, Data, Chil
3535
auto get_env() const noexcept -> decltype(auto) {
3636
auto&& d{this->template get<1>()};
3737
return sub_apply<2>(
38-
[&d](auto&&... c) { return ::beman::execution26::detail::impls_for<Tag>::get_attrs(d, c...); },
39-
*this);
38+
[&d](auto&&... c) { return ::beman::execution26::detail::impls_for<Tag>::get_attrs(d, c...); }, *this);
4039
}
4140

4241
template <typename Receiver>

include/beman/execution26/detail/connect_all.hpp

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,29 @@ struct connect_all_t {
4545
}
4646

4747
template <::std::size_t Start, typename Fun, typename Tuple, ::std::size_t... I>
48-
static auto sub_apply_with_index_helper(::std::index_sequence<I...> seq, Fun&& fun, Tuple&& tuple) noexcept(noexcept(
49-
::std::forward<Fun>(fun)(seq, ::beman::execution26::detail::forward_like<Tuple>(tuple.template get<I+Start>())...)))
48+
static auto sub_apply_with_index_helper(::std::index_sequence<I...> seq, Fun&& fun, Tuple&& tuple) noexcept(
49+
noexcept(::std::forward<Fun>(fun)(
50+
seq, ::beman::execution26::detail::forward_like<Tuple>(tuple.template get<I + Start>())...)))
5051
-> decltype(auto) {
51-
return ::std::forward<Fun>(fun)(seq,
52-
::beman::execution26::detail::forward_like<Tuple>(tuple.template get<I+Start>())...);
52+
return ::std::forward<Fun>(fun)(
53+
seq, ::beman::execution26::detail::forward_like<Tuple>(tuple.template get<I + Start>())...);
5354
}
5455
template <::std::size_t Start, typename Fun, typename Tuple>
55-
requires requires{ ::std::declval<Tuple>().size(); }
56-
static auto sub_apply_with_index(Fun&& fun, Tuple&& tuple) noexcept(
57-
noexcept(sub_apply_with_index_helper<Start>(::std::make_index_sequence<::std::tuple_size_v<::std::decay_t<Tuple>>-Start>{},
58-
::std::forward<Fun>(fun),
59-
::std::forward<Tuple>(tuple)))) -> decltype(auto) {
60-
return sub_apply_with_index_helper<Start>(::std::make_index_sequence<::std::tuple_size_v<::std::decay_t<Tuple>>-Start>{},
61-
::std::forward<Fun>(fun),
62-
::std::forward<Tuple>(tuple));
56+
requires requires { ::std::declval<Tuple>().size(); }
57+
static auto sub_apply_with_index(Fun&& fun, Tuple&& tuple) noexcept(noexcept(sub_apply_with_index_helper<Start>(
58+
::std::make_index_sequence<::std::tuple_size_v<::std::decay_t<Tuple>> - Start>{},
59+
::std::forward<Fun>(fun),
60+
::std::forward<Tuple>(tuple)))) -> decltype(auto) {
61+
return sub_apply_with_index_helper<Start>(
62+
::std::make_index_sequence<::std::tuple_size_v<::std::decay_t<Tuple>> - Start>{},
63+
::std::forward<Fun>(fun),
64+
::std::forward<Tuple>(tuple));
6365
}
6466
template <::std::size_t Start, typename Fun, typename Tuple>
65-
requires (not requires{ ::std::declval<Tuple>().size(); })
66-
static auto sub_apply_with_index(Fun&& fun, Tuple&& ) noexcept(noexcept(::std::forward<Fun>(fun)(::std::make_index_sequence<0u>{}))) {
67+
requires(not requires { ::std::declval<Tuple>().size(); })
68+
static auto
69+
sub_apply_with_index(Fun&& fun,
70+
Tuple&&) noexcept(noexcept(::std::forward<Fun>(fun)(::std::make_index_sequence<0u>{}))) {
6771
return ::std::forward<Fun>(fun)(::std::make_index_sequence<0u>{});
6872
}
6973

@@ -90,15 +94,16 @@ struct connect_all_t {
9094
public:
9195
//-dk:TODO is the S parameter deviating from the spec?
9296
template <typename Sender, typename S, typename Receiver, ::std::size_t... I>
93-
requires requires(Sender&& s){ s.size(); s.template get<0>(); }
97+
requires requires(Sender&& s) {
98+
s.size();
99+
s.template get<0>();
100+
}
94101
auto operator()(::beman::execution26::detail::basic_state<Sender, Receiver>* op,
95102
S&& sender,
96103
::std::index_sequence<I...>) const
97-
noexcept(noexcept(sub_apply_with_index<2>(connect_helper<Sender, Receiver>{op},
98-
::std::forward<S>(sender))))
99-
-> decltype(auto) {
100-
return sub_apply_with_index<2>(connect_helper<Sender, Receiver>{op},
101-
::std::forward<S>(sender));
104+
noexcept(noexcept(sub_apply_with_index<2>(connect_helper<Sender, Receiver>{op}, ::std::forward<S>(sender))))
105+
-> decltype(auto) {
106+
return sub_apply_with_index<2>(connect_helper<Sender, Receiver>{op}, ::std::forward<S>(sender));
102107
}
103108
template <typename Sender, typename S, typename Receiver, ::std::size_t... I>
104109
auto operator()(::beman::execution26::detail::basic_state<Sender, Receiver>* op,

include/beman/execution26/detail/default_impls.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ struct default_impls {
3737
};
3838
static constexpr auto get_state =
3939
[]<typename Sender, typename Receiver>(Sender&& sender, Receiver& receiver) noexcept -> decltype(auto) {
40-
auto&& data{[&sender]()->decltype(auto) {
41-
if constexpr (requires{ sender.size(); sender.template get<1>(); })
40+
auto&& data{[&sender]() -> decltype(auto) {
41+
if constexpr (requires {
42+
sender.size();
43+
sender.template get<1>();
44+
})
4245
return sender.template get<1>();
4346
else
4447
return ::beman::execution26::detail::get_sender_data(::std::forward<Sender>(sender)).data;

include/beman/execution26/detail/product_type.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,16 @@ constexpr auto is_product_type(const ::beman::execution26::detail::product_type<
114114
}
115115

116116
template <::std::size_t Start, typename Fun, typename Tuple, ::std::size_t... I>
117-
constexpr auto sub_apply_helper(Fun&& fun, Tuple&& tuple, ::std::index_sequence<I...>) -> decltype(auto)
118-
{
117+
constexpr auto sub_apply_helper(Fun&& fun, Tuple&& tuple, ::std::index_sequence<I...>) -> decltype(auto) {
119118
return ::std::forward<Fun>(fun)(::std::forward<Tuple>(tuple).template get<I + Start>()...);
120119
}
121120

122121
template <::std::size_t Start, typename Fun, typename Tuple>
123-
constexpr auto sub_apply(Fun&& fun, Tuple&& tuple) -> decltype(auto)
124-
{
122+
constexpr auto sub_apply(Fun&& fun, Tuple&& tuple) -> decltype(auto) {
125123
static constexpr ::std::size_t TSize{::std::tuple_size_v<::std::remove_cvref_t<Tuple>>};
126124
static_assert(Start <= TSize);
127-
return sub_apply_helper<Start>(::std::forward<Fun>(fun), ::std::forward<Tuple>(tuple),
128-
::std::make_index_sequence<TSize - Start>());
125+
return sub_apply_helper<Start>(
126+
::std::forward<Fun>(fun), ::std::forward<Tuple>(tuple), ::std::make_index_sequence<TSize - Start>());
129127
}
130128

131129
} // namespace beman::execution26::detail

include/beman/execution26/detail/sender_decompose.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ auto get_sender_data(Sender&& sender) {
6868
return ::beman::execution26::detail::sender_data{tag, data, ::std::tie(c0)};
6969
} else if constexpr (requires { sender_type{at, at}; }) {
7070
auto&& [tag, data] = sender;
71-
return ::beman::execution26::detail::sender_data{ tag, data, ::std::tuple<>()};
71+
return ::beman::execution26::detail::sender_data{tag, data, ::std::tuple<>()};
7272
} else {
7373
return ::beman::execution26::detail::sender_meta<void, void, void>{};
7474
}

0 commit comments

Comments
 (0)