clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I5daa012bf76924eb7a7d22ed31b6b77ad2f723df
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index 5f0cb09..d92a3f1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -7,7 +7,9 @@
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: Align
-AlignTrailingComments: true
+AlignTrailingComments:
+ Kind: Always
+ OverEmptyLines: 1
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
@@ -36,6 +38,7 @@
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
+BreakAfterAttributes: Never
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
@@ -78,7 +81,10 @@
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
+InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
+LambdaBodyIndentation: OuterScope
+LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
@@ -98,6 +104,7 @@
ReferenceAlignment: Left
ReflowComments: true
RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: Keyword
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
@@ -117,7 +124,6 @@
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
-UseCRLF: false
UseTab: Never
...
diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index ee89a2f..906059e 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -217,26 +217,26 @@
iface->register_property("lessThan50", 23,
// custom set
[](const int& req, int& propertyValue) {
- if (req >= 50)
- {
- return false;
- }
- propertyValue = req;
- return true;
- });
+ if (req >= 50)
+ {
+ return false;
+ }
+ propertyValue = req;
+ return true;
+ });
iface->register_property(
"TrailTime", std::string("foo"),
// custom set
[](const std::string& req, std::string& propertyValue) {
- propertyValue = req;
- return true;
+ propertyValue = req;
+ return true;
},
// custom get
[](const std::string& property) {
- auto now = std::chrono::system_clock::now();
- auto timePoint = std::chrono::system_clock::to_time_t(now);
- return property + std::ctime(&timePoint);
- });
+ auto now = std::chrono::system_clock::now();
+ auto timePoint = std::chrono::system_clock::to_time_t(now);
+ return property + std::ctime(&timePoint);
+ });
// test method creation
iface->register_method("TestMethod", [](const int32_t& callCount) {
@@ -250,8 +250,8 @@
// so will be executed in coroutine context if called
iface->register_method("TestYieldFunction",
[conn](boost::asio::yield_context yield, int val) {
- return fooYield(yield, conn, val);
- });
+ return fooYield(yield, conn, val);
+ });
iface->register_method("TestMethodWithMessage", methodWithMessage);
@@ -324,16 +324,16 @@
conn->async_method_call(
[](boost::system::error_code ec, GetSubTreeType& subtree) {
- std::cout << "async_method_call callback\n";
- if (ec)
- {
- std::cerr << "error with async_method_call\n";
- return;
- }
- for (auto& item : subtree)
- {
- std::cout << item.first << "\n";
- }
+ std::cout << "async_method_call callback\n";
+ if (ec)
+ {
+ std::cerr << "error with async_method_call\n";
+ return;
+ }
+ for (auto& item : subtree)
+ {
+ std::cout << item.first << "\n";
+ }
},
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
@@ -345,17 +345,16 @@
[nonConstCapture = std::move(nonConstCapture)](
boost::system::error_code ec,
const std::vector<std::string>& /*things*/) mutable {
- std::cout << "async_method_call callback\n";
- nonConstCapture += " stuff";
- if (ec)
- {
- std::cerr << "async_method_call expected failure: " << ec
- << "\n";
- }
- else
- {
- std::cerr << "async_method_call should have failed!\n";
- }
+ std::cout << "async_method_call callback\n";
+ nonConstCapture += " stuff";
+ if (ec)
+ {
+ std::cerr << "async_method_call expected failure: " << ec << "\n";
+ }
+ else
+ {
+ std::cerr << "async_method_call should have failed!\n";
+ }
},
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
@@ -384,14 +383,14 @@
conn->async_method_call(
[](boost::system::error_code ec, int32_t testValue) {
- if (ec)
- {
- std::cerr << "TestYieldFunction returned error with "
- "async_method_call (ec = "
- << ec << ")\n";
- return;
- }
- std::cout << "TestYieldFunction return " << testValue << "\n";
+ if (ec)
+ {
+ std::cerr << "TestYieldFunction returned error with "
+ "async_method_call (ec = "
+ << ec << ")\n";
+ return;
+ }
+ std::cout << "TestYieldFunction return " << testValue << "\n";
},
"xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
"xyz.openbmc_project.test", "TestYieldFunction", int32_t(41));
diff --git a/example/coroutine-example.cpp b/example/coroutine-example.cpp
index b402070..c077acd 100644
--- a/example/coroutine-example.cpp
+++ b/example/coroutine-example.cpp
@@ -32,29 +32,26 @@
for (auto& [property, value] :
co_await systemd.get_all_properties<variant_type>(ctx))
{
- std::cout
- << property << " is "
- << std::visit(
- // Convert the variant member to a string for printing.
- [](auto v) {
- if constexpr (std::is_same_v<
- std::remove_cvref_t<decltype(v)>,
+ std::cout << property << " is "
+ << std::visit(
+ // Convert the variant member to a string for printing.
+ [](auto v) {
+ if constexpr (std::is_same_v<std::remove_cvref_t<decltype(v)>,
std::vector<std::string>>)
- {
- return std::string{"Array"};
- }
- else if constexpr (std::is_same_v<
- std::remove_cvref_t<decltype(v)>,
+ {
+ return std::string{"Array"};
+ }
+ else if constexpr (std::is_same_v<std::remove_cvref_t<decltype(v)>,
std::string>)
- {
- return v;
- }
- else
- {
- return std::to_string(v);
- }
- },
- value)
+ {
+ return v;
+ }
+ else
+ {
+ return std::to_string(v);
+ }
+ },
+ value)
<< std::endl;
}
diff --git a/example/get-all-properties.cpp b/example/get-all-properties.cpp
index 428b322..711dd8b 100644
--- a/example/get-all-properties.cpp
+++ b/example/get-all-properties.cpp
@@ -33,8 +33,8 @@
demo_->register_property_rw<std::string>(
propertyGoodbyesName, sdbusplus::vtable::property_::emits_change,
[this](const auto& newPropertyValue, const auto&) {
- goodbyes_ = newPropertyValue;
- return true;
+ goodbyes_ = newPropertyValue;
+ return true;
},
[this](const auto&) { return goodbyes_; });
@@ -95,7 +95,7 @@
const bool success = sdbusplus::unpackPropertiesNoThrow(
[this](const sdbusplus::UnpackErrorReason reason,
const std::string& property) {
- logUnpackError(reason, property);
+ logUnpackError(reason, property);
},
properties, propertyGrettingName, greetings,
propertyGoodbyesName, goodbyes);
diff --git a/example/register-property.cpp b/example/register-property.cpp
index 3d2e86f..c22231a 100644
--- a/example/register-property.cpp
+++ b/example/register-property.cpp
@@ -24,18 +24,18 @@
demo_ = objServer_.add_unique_interface(
demoObjectPath, demoInterfaceName,
[this](sdbusplus::asio::dbus_interface& demo) {
- demo.register_property_r<std::string>(
- propertyGrettingName, sdbusplus::vtable::property_::const_,
- [this](const auto&) { return greetings_; });
+ demo.register_property_r<std::string>(
+ propertyGrettingName, sdbusplus::vtable::property_::const_,
+ [this](const auto&) { return greetings_; });
- demo.register_property_rw<std::string>(
- propertyGoodbyesName,
- sdbusplus::vtable::property_::emits_change,
- [this](const auto& newPropertyValue, const auto&) {
- goodbyes_ = newPropertyValue;
- return true;
- },
- [this](const auto&) { return goodbyes_; });
+ demo.register_property_rw<std::string>(
+ propertyGoodbyesName,
+ sdbusplus::vtable::property_::emits_change,
+ [this](const auto& newPropertyValue, const auto&) {
+ goodbyes_ = newPropertyValue;
+ return true;
+ },
+ [this](const auto&) { return goodbyes_; });
});
}
@@ -58,17 +58,17 @@
bus_, demoServiceName, demoObjectPath, demoInterfaceName,
propertyGrettingName,
[this](boost::system::error_code ec, uint32_t) {
- if (ec)
- {
- std::cout
- << "As expected failed to getProperty with wrong type: "
- << ec << "\n";
- return;
- }
+ if (ec)
+ {
+ std::cout
+ << "As expected failed to getProperty with wrong type: "
+ << ec << "\n";
+ return;
+ }
- std::cerr << "Error: it was expected to fail getProperty due "
- "to wrong type\n";
- ++fatalErrors_;
+ std::cerr << "Error: it was expected to fail getProperty due "
+ "to wrong type\n";
+ ++fatalErrors_;
});
}
@@ -78,24 +78,24 @@
bus_, demoServiceName, demoObjectPath, demoInterfaceName,
propertyGrettingName,
[this](boost::system::error_code ec, std::string value) {
- if (ec)
- {
- getFailed();
- return;
- }
- std::cout << "Greetings value is: " << value << "\n";
+ if (ec)
+ {
+ getFailed();
+ return;
+ }
+ std::cout << "Greetings value is: " << value << "\n";
});
sdbusplus::asio::getProperty<std::string>(
bus_, demoServiceName, demoObjectPath, demoInterfaceName,
propertyGoodbyesName,
[this](boost::system::error_code ec, std::string value) {
- if (ec)
- {
- getFailed();
- return;
- }
- std::cout << "Goodbyes value is: " << value << "\n";
+ if (ec)
+ {
+ getFailed();
+ return;
+ }
+ std::cout << "Goodbyes value is: " << value << "\n";
});
}
@@ -105,34 +105,31 @@
bus_, demoServiceName, demoObjectPath, demoInterfaceName,
propertyGrettingName, "Hi, hey, hello",
[this](const boost::system::error_code& ec) {
- if (ec)
- {
- std::cout
- << "As expected, failed to set greetings property: "
- << ec << "\n";
- return;
- }
+ if (ec)
+ {
+ std::cout << "As expected, failed to set greetings property: "
+ << ec << "\n";
+ return;
+ }
- std::cout
- << "Error: it was expected to fail to change greetings\n";
- ++fatalErrors_;
+ std::cout << "Error: it was expected to fail to change greetings\n";
+ ++fatalErrors_;
});
sdbusplus::asio::setProperty(
bus_, demoServiceName, demoObjectPath, demoInterfaceName,
propertyGoodbyesName, "Bye bye",
[this](const boost::system::error_code& ec) {
- if (ec)
- {
- std::cout
- << "Error: it supposed to be ok to change goodbyes "
- "property: "
- << ec << "\n";
- ++fatalErrors_;
- return;
- }
- std::cout << "Changed goodbyes property as expected\n";
- boost::asio::post(ioc_, [this] { asyncReadProperties(); });
+ if (ec)
+ {
+ std::cout << "Error: it supposed to be ok to change goodbyes "
+ "property: "
+ << ec << "\n";
+ ++fatalErrors_;
+ return;
+ }
+ std::cout << "Changed goodbyes property as expected\n";
+ boost::asio::post(ioc_, [this] { asyncReadProperties(); });
});
}
diff --git a/include/sdbusplus/asio/connection.hpp b/include/sdbusplus/asio/connection.hpp
index 444f79d..084b484 100644
--- a/include/sdbusplus/asio/connection.hpp
+++ b/include/sdbusplus/asio/connection.hpp
@@ -130,9 +130,9 @@
}();
using UnpackType = utility::strip_first_n_args_t<returnWithMsg ? 2 : 1,
FunctionTupleType>;
- auto applyHandler = [handler = std::forward<MessageHandler>(handler)](
- boost::system::error_code ec,
- message_t& r) mutable {
+ auto applyHandler =
+ [handler = std::forward<MessageHandler>(handler)](
+ boost::system::error_code ec, message_t& r) mutable {
UnpackType responseData;
if (!ec)
{
@@ -317,18 +317,18 @@
socket.async_read_some(
boost::asio::null_buffers(),
[&](const boost::system::error_code& ec, std::size_t) {
- if (ec)
- {
- return;
- }
- if (process_discard())
- {
- read_immediate();
- }
- else
- {
- read_wait();
- }
+ if (ec)
+ {
+ return;
+ }
+ if (process_discard())
+ {
+ read_immediate();
+ }
+ else
+ {
+ read_wait();
+ }
});
}
void read_immediate()
diff --git a/include/sdbusplus/asio/property.hpp b/include/sdbusplus/asio/property.hpp
index c528afe..28e99c4 100644
--- a/include/sdbusplus/asio/property.hpp
+++ b/include/sdbusplus/asio/property.hpp
@@ -52,21 +52,21 @@
[handler = std::move(handler)](
boost::system::error_code ec,
std::variant<std::monostate, PropertyType>& ret) mutable {
- if (ec)
- {
- handler(ec, {});
- return;
- }
+ if (ec)
+ {
+ handler(ec, {});
+ return;
+ }
- if (PropertyType* value = std::get_if<PropertyType>(&ret))
- {
- handler(ec, std::move(*value));
- return;
- }
+ if (PropertyType* value = std::get_if<PropertyType>(&ret))
+ {
+ handler(ec, std::move(*value));
+ return;
+ }
- handler(boost::system::errc::make_error_code(
- boost::system::errc::invalid_argument),
- {});
+ handler(boost::system::errc::make_error_code(
+ boost::system::errc::invalid_argument),
+ {});
},
service, path, "org.freedesktop.DBus.Properties", "Get", interface,
propertyName);
@@ -86,20 +86,20 @@
[onError = std::move(onError), onSuccess = std::move(onSuccess)](
boost::system::error_code ec,
std::variant<std::monostate, T>& ret) {
- if (ec)
- {
- onError(ec);
- return;
- }
+ if (ec)
+ {
+ onError(ec);
+ return;
+ }
- if (T* value = std::get_if<T>(&ret))
- {
- onSuccess(*value);
- return;
- }
+ if (T* value = std::get_if<T>(&ret))
+ {
+ onSuccess(*value);
+ return;
+ }
- onError(boost::system::errc::make_error_code(
- boost::system::errc::invalid_argument));
+ onError(boost::system::errc::make_error_code(
+ boost::system::errc::invalid_argument));
},
service, path, "org.freedesktop.DBus.Properties", "Get", interface,
propertyName);
diff --git a/include/sdbusplus/asio/sd_event.hpp b/include/sdbusplus/asio/sd_event.hpp
index 0c05daa..4a61a7c 100644
--- a/include/sdbusplus/asio/sd_event.hpp
+++ b/include/sdbusplus/asio/sd_event.hpp
@@ -114,11 +114,11 @@
{
descriptor.async_wait(boost::asio::posix::stream_descriptor::wait_read,
[this](const boost::system::error_code& error) {
- if (!error)
- {
- run();
- }
- });
+ if (!error)
+ {
+ run();
+ }
+ });
}
sd_event* evt;
boost::asio::posix::stream_descriptor descriptor;
diff --git a/include/sdbusplus/async/proxy.hpp b/include/sdbusplus/async/proxy.hpp
index be006dd..5934a7e 100644
--- a/include/sdbusplus/async/proxy.hpp
+++ b/include/sdbusplus/async/proxy.hpp
@@ -133,12 +133,11 @@
// Use 'callback' to perform the operation and "then" "unpack" the
// contents.
- return callback([bus = get_busp(ctx.get_bus()),
- msg = std::move(msg)](auto cb, auto data) mutable {
- return sd_bus_call_async(bus, nullptr, msg.get(), cb, data,
- 0);
- }) |
- execution::then([](message_t&& m) { return m.unpack<Rs...>(); });
+ return callback(
+ [bus = get_busp(ctx.get_bus()),
+ msg = std::move(msg)](auto cb, auto data) mutable {
+ return sd_bus_call_async(bus, nullptr, msg.get(), cb, data, 0);
+ }) | execution::then([](message_t&& m) { return m.unpack<Rs...>(); });
}
/** Get a property.
diff --git a/include/sdbusplus/async/scope.hpp b/include/sdbusplus/async/scope.hpp
index cc6c87a..06a30d7 100644
--- a/include/sdbusplus/async/scope.hpp
+++ b/include/sdbusplus/async/scope.hpp
@@ -227,7 +227,7 @@
operator result_t()
{
- return ((Fn &&) fn)();
+ return ((Fn&&)fn)();
}
};
diff --git a/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp b/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
index 3c163f0..feaaccc 100644
--- a/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
+++ b/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
@@ -46,7 +46,7 @@
// Construct the value *after* the initialization of the
// atomic in case the constructor of _Ty calls
// __intrusive_from_this() (which increments the atomic):
- ::new ((void*)__value_) _Ty{(_Us &&) __us...};
+ ::new ((void*)__value_) _Ty{(_Us&&)__us...};
}
~__control_block()
@@ -195,7 +195,7 @@
{
using _UncvTy = std::remove_cv_t<_Ty>;
return __intrusive_ptr<_Ty>{
- ::new __control_block<_UncvTy>{(_Us &&) __us...}};
+ ::new __control_block<_UncvTy>{(_Us&&)__us...}};
}
};
} // namespace __ptr
diff --git a/include/sdbusplus/async/stdexec/__detail/__meta.hpp b/include/sdbusplus/async/stdexec/__detail/__meta.hpp
index 5e2adde..35c43a5 100644
--- a/include/sdbusplus/async/stdexec/__detail/__meta.hpp
+++ b/include/sdbusplus/async/stdexec/__detail/__meta.hpp
@@ -282,7 +282,7 @@
template < //
class _Continuation, //
template <class...> class _Ap,
- class... _As, //
+ class... _As, //
template <class...> class _Bp, class... _Bs>
requires __minvocable<_Continuation, _As..., _Bs...>
struct __mconcat_<_Continuation, _Ap<_As...>, _Bp<_Bs...>>
@@ -293,9 +293,9 @@
template < //
class _Continuation, //
template <class...> class _Ap,
- class... _As, //
+ class... _As, //
template <class...> class _Bp,
- class... _Bs, //
+ class... _Bs, //
template <class...> class _Cp, class... _Cs>
requires __minvocable<_Continuation, _As..., _Bs..., _Cs...>
struct __mconcat_<_Continuation, _Ap<_As...>, _Bp<_Bs...>, _Cp<_Cs...>>
@@ -306,13 +306,13 @@
template < //
class _Continuation, //
template <class...> class _Ap,
- class... _As, //
+ class... _As, //
template <class...> class _Bp,
- class... _Bs, //
+ class... _Bs, //
template <class...> class _Cp,
- class... _Cs, //
+ class... _Cs, //
template <class...> class _Dp,
- class... _Ds, //
+ class... _Ds, //
class... _Tail>
struct __mconcat_<_Continuation, _Ap<_As...>, _Bp<_Bs...>, _Cp<_Cs...>,
_Dp<_Ds...>, _Tail...> :
@@ -589,16 +589,16 @@
using __cvref_id = __copy_cvref_t<_From, __id<_To>>;
template <class _Fun, class... _As>
-concept __callable = //
- requires(_Fun&& __fun, _As&&... __as) { //
- ((_Fun &&) __fun)((_As &&) __as...); //
+concept __callable = //
+ requires(_Fun&& __fun, _As&&... __as) { //
+ ((_Fun&&)__fun)((_As&&)__as...); //
};
template <class _Fun, class... _As>
concept __nothrow_callable = //
__callable<_Fun, _As...> && //
requires(_Fun&& __fun, _As&&... __as) {
{
- ((_Fun &&) __fun)((_As &&) __as...)
+ ((_Fun&&)__fun)((_As&&)__as...)
} noexcept;
};
@@ -636,12 +636,12 @@
operator __t() && noexcept(__nothrow_callable<_Fn>)
{
- return ((_Fn &&) __fn_)();
+ return ((_Fn&&)__fn_)();
}
__t operator()() && noexcept(__nothrow_callable<_Fn>)
{
- return ((_Fn &&) __fn_)();
+ return ((_Fn&&)__fn_)();
}
};
template <class _Fn>
@@ -664,7 +664,7 @@
class _Fn, //
class _Continuation, //
template <class...> class _Cp,
- class... _Cs, //
+ class... _Cs, //
template <class...> class _Dp, class... _Ds>
requires requires {
typename __minvoke<_Continuation, __minvoke<_Fn, _Cs, _Ds>...>;
@@ -806,10 +806,10 @@
{
template <class... _As>
auto operator()(_As&&... __as) const
- noexcept(__v<_Noexcept>&& noexcept(_Ty((_As &&) __as...)))
- -> decltype(_Ty((_As &&) __as...))
+ noexcept(__v<_Noexcept>&& noexcept(_Ty((_As&&)__as...)))
+ -> decltype(_Ty((_As&&)__as...))
{
- return _Ty((_As &&) __as...);
+ return _Ty((_As&&)__as...);
}
};
@@ -822,18 +822,16 @@
template <std::size_t... _Is, class _Ty, class... _Us>
_Ty&& __nth_pack_element_(__ignore_t<_Is>..., _Ty&& __t, _Us&&...) noexcept
{
- return (_Ty &&) __t;
+ return (_Ty&&)__t;
}
template <std::size_t _Np, class... _Ts>
constexpr decltype(auto) __nth_pack_element(_Ts&&... __ts) noexcept
{
- return [&]<std::size_t... _Is>(std::index_sequence<_Is...>*) noexcept
- -> decltype(auto)
- {
- return stdexec::__nth_pack_element_<_Is...>((_Ts &&) __ts...);
- }
- ((std::make_index_sequence<_Np>*)nullptr);
+ return [&]<std::size_t... _Is>(
+ std::index_sequence<_Is...>*) noexcept -> decltype(auto) {
+ return stdexec::__nth_pack_element_<_Is...>((_Ts&&)__ts...);
+ }((std::make_index_sequence<_Np>*)nullptr);
}
template <class _Ty>
@@ -852,7 +850,7 @@
template <class... _Ts>
decltype(auto) operator()(_Ts&&... __ts) const noexcept
{
- return stdexec::__nth_pack_element<_Np>((_Ts &&) __ts...);
+ return stdexec::__nth_pack_element<_Np>((_Ts&&)__ts...);
}
};
@@ -893,13 +891,13 @@
requires(__callable<__mdispatch_<_Args>, _Ts...> && ...) &&
__callable<_Ret,
__call_result_t<__mdispatch_<_Args>, _Ts...>...>
- auto operator()(_Ts&&... __ts) const
- noexcept(__nothrow_callable<
- _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>)
- -> __call_result_t<
- _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>
+ auto operator()(_Ts&&... __ts) const
+ noexcept(__nothrow_callable<
+ _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>)
+ -> __call_result_t<_Ret,
+ __call_result_t<__mdispatch_<_Args>, _Ts...>...>
{
- return _Ret{}(__mdispatch_<_Args>{}((_Ts &&) __ts...)...);
+ return _Ret{}(__mdispatch_<_Args>{}((_Ts&&)__ts...)...);
}
};
@@ -914,13 +912,13 @@
requires(__callable<__mdispatch_<_Args>, _Ts...> && ...) &&
__callable<_Ret,
__call_result_t<__mdispatch_<_Args>, _Ts...>...>
- auto operator()(_Ts&&... __ts) const
- noexcept(__nothrow_callable<
- _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>)
- -> __call_result_t<
- _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>
+ auto operator()(_Ts&&... __ts) const
+ noexcept(__nothrow_callable<
+ _Ret, __call_result_t<__mdispatch_<_Args>, _Ts...>...>)
+ -> __call_result_t<_Ret,
+ __call_result_t<__mdispatch_<_Args>, _Ts...>...>
{
- return _Ret{}(__mdispatch_<_Args>{}((_Ts &&) __ts...)...);
+ return _Ret{}(__mdispatch_<_Args>{}((_Ts&&)__ts...)...);
}
};
template <class _Ty, class... _Ts>
diff --git a/include/sdbusplus/async/stdexec/__detail/__p2300.hpp b/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
index d76e65b..8bd2403 100644
--- a/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
+++ b/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
@@ -335,10 +335,10 @@
stdexec::completion_signatures<_Sigs...>;
// [exec.utils.mkcmplsigs]
-template < //
- class _Sender, //
+template < //
+ class _Sender, //
class _Env = stdexec::no_env,
- class _Sigs = stdexec::completion_signatures<>, //
+ class _Sigs = stdexec::completion_signatures<>, //
template <class...>
class _SetValue = stdexec::__compl_sigs::__default_set_value, //
template <class>
diff --git a/include/sdbusplus/async/stdexec/__detail/__scope.hpp b/include/sdbusplus/async/stdexec/__detail/__scope.hpp
index 6f0f685..4f47839 100644
--- a/include/sdbusplus/async/stdexec/__detail/__scope.hpp
+++ b/include/sdbusplus/async/stdexec/__detail/__scope.hpp
@@ -33,7 +33,7 @@
~__scope_guard()
{
if (!__dismissed_)
- ((_Fn &&) __fn_)();
+ ((_Fn&&)__fn_)();
}
void __dismiss() noexcept
@@ -59,7 +59,7 @@
~__scope_guard()
{
if (!__dismissed_)
- ((_Fn &&) __fn_)((_T0 &&) __t0_);
+ ((_Fn&&)__fn_)((_T0&&)__t0_);
}
};
@@ -81,7 +81,7 @@
~__scope_guard()
{
if (!__dismissed_)
- ((_Fn &&) __fn_)((_T0 &&) __t0_, (_T1 &&) __t1_);
+ ((_Fn&&)__fn_)((_T0&&)__t0_, (_T1&&)__t1_);
}
};
@@ -104,7 +104,7 @@
~__scope_guard()
{
if (!__dismissed_)
- ((_Fn &&) __fn_)((_T0 &&) __t0_, (_T1 &&) __t1_, (_T2 &&) __t2_);
+ ((_Fn&&)__fn_)((_T0&&)__t0_, (_T1&&)__t1_, (_T2&&)__t2_);
}
};
diff --git a/include/sdbusplus/async/stdexec/any_sender_of.hpp b/include/sdbusplus/async/stdexec/any_sender_of.hpp
index 19e1b9e..c4b19f4 100644
--- a/include/sdbusplus/async/stdexec/any_sender_of.hpp
+++ b/include/sdbusplus/async/stdexec/any_sender_of.hpp
@@ -50,7 +50,7 @@
_Ret operator()(_Tag, void* __rcvr, _As&&... __as) const
{
- return __fn_(__rcvr, (_As &&) __as...);
+ return __fn_(__rcvr, (_As&&)__as...);
}
};
@@ -61,7 +61,7 @@
_Ret operator()(_Tag, void* __rcvr, _As&&... __as) const
{
- return __fn_(__rcvr, (_As &&) __as...);
+ return __fn_(__rcvr, (_As&&)__as...);
}
};
@@ -72,7 +72,7 @@
_Ret operator()(_Tag, void* __rcvr, _As&&... __as) const noexcept
{
- return __fn_(__rcvr, (_As &&) __as...);
+ return __fn_(__rcvr, (_As&&)__as...);
}
};
@@ -83,7 +83,7 @@
_Ret operator()(_Tag, void* __rcvr, _As&&... __as) const noexcept
{
- return __fn_(__rcvr, (_As &&) __as...);
+ return __fn_(__rcvr, (_As&&)__as...);
}
};
@@ -101,7 +101,7 @@
{
return +[](void* __env_provider, _As... __as) -> _Ret {
return _Tag{}(get_env(*(const _EnvProvider*)__env_provider),
- (_As &&) __as...);
+ (_As&&)__as...);
};
}
@@ -115,7 +115,7 @@
__nothrow_callable<_Tag, const env_of_t<_EnvProvider>&,
_As...>);
return _Tag{}(get_env(*(const _EnvProvider*)__env_provider),
- (_As &&) __as...);
+ (_As&&)__as...);
};
}
};
@@ -130,7 +130,7 @@
const noexcept)(void*, _As...)
{
return +[](void* __queryable, _As... __as) -> _Ret {
- return _Tag{}(*(const _Queryable*)__queryable, (_As &&) __as...);
+ return _Tag{}(*(const _Queryable*)__queryable, (_As&&)__as...);
};
}
@@ -141,7 +141,7 @@
{
return +[](void* __env_provider, _As... __as) noexcept -> _Ret {
static_assert(__nothrow_callable<_Tag, const _Queryable&, _As...>);
- return _Tag{}(*(const _Queryable*)__env_provider, (_As &&) __as...);
+ return _Tag{}(*(const _Queryable*)__env_provider, (_As&&)__as...);
};
}
};
@@ -156,7 +156,7 @@
void operator()(_Tag, void* __storage, _As&&... __as) const
{
- return __fn_(__storage, (_As &&) __as...);
+ return __fn_(__storage, (_As&&)__as...);
}
};
@@ -167,7 +167,7 @@
void operator()(_Tag, void* __storage, _As&&... __as) const noexcept
{
- return __fn_(__storage, (_As &&) __as...);
+ return __fn_(__storage, (_As&&)__as...);
}
};
@@ -181,7 +181,7 @@
{
return +[](void* __storage, _As... __as) -> void {
return _Tag{}(__mtype<_Tp>{}, *(_Storage*)__storage,
- (_As &&) __as...);
+ (_As&&)__as...);
};
}
@@ -194,7 +194,7 @@
static_assert(
__nothrow_callable<_Tag, __mtype<_Tp>, _Storage&, _As...>);
return _Tag{}(__mtype<_Tp>{}, *(_Storage*)__storage,
- (_As &&) __as...);
+ (_As&&)__as...);
};
}
};
@@ -242,7 +242,7 @@
static_assert(nothrow_tag_invocable<__move_construct_t, __mtype<_Tp>,
_Storage&, _Storage&&>);
tag_invoke(__move_construct_t{}, __mtype<_Tp>{}, __self,
- (_Storage &&) __from);
+ (_Storage&&)__from);
}
};
@@ -350,11 +350,11 @@
using _Dp = __decay_t<_Tp>;
if constexpr (__is_small<_Dp>)
{
- __construct_small<_Dp>((_Tp &&) __object);
+ __construct_small<_Dp>((_Tp&&)__object);
}
else
{
- __construct_large<_Dp>((_Tp &&) __object);
+ __construct_large<_Dp>((_Tp&&)__object);
}
}
@@ -365,11 +365,11 @@
{
if constexpr (__is_small<_Tp>)
{
- __construct_small<_Tp>((_Args &&) __args...);
+ __construct_small<_Tp>((_Args&&)__args...);
}
else
{
- __construct_large<_Tp>((_Args &&) __args...);
+ __construct_large<_Tp>((_Args&&)__args...);
}
}
@@ -388,13 +388,13 @@
__t(__t&& __other) noexcept
{
- (*__other.__vtable_)(__move_construct, this, (__t &&) __other);
+ (*__other.__vtable_)(__move_construct, this, (__t&&)__other);
}
__t& operator=(__t&& __other) noexcept
{
__reset();
- (*__other.__vtable_)(__move_construct, this, (__t &&) __other);
+ (*__other.__vtable_)(__move_construct, this, (__t&&)__other);
return *this;
}
@@ -431,7 +431,7 @@
_Allocator>::template rebind_alloc<_Tp>;
_Alloc __alloc{__allocator_};
std::allocator_traits<_Alloc>::construct(__alloc, __pointer,
- (_As &&) __args...);
+ (_As&&)__args...);
__object_pointer_ = __pointer;
}
@@ -445,7 +445,7 @@
try
{
std::allocator_traits<_Alloc>::construct(__alloc, __pointer,
- (_As &&) __args...);
+ (_As&&)__args...);
}
catch (...)
{
@@ -487,7 +487,7 @@
if constexpr (__is_small<_Tp>)
{
_Tp& __other_object = *__pointer;
- __self.template __construct_small<_Tp>((_Tp &&) __other_object);
+ __self.template __construct_small<_Tp>((_Tp&&)__other_object);
using _Alloc = typename std::allocator_traits<
_Allocator>::template rebind_alloc<_Tp>;
_Alloc __alloc{__self.__allocator_};
@@ -563,7 +563,7 @@
const noexcept)(void*, _As...) noexcept
{
return +[](void* __rcvr, _As... __as) noexcept -> void {
- _Tag{}((_Rcvr &&) * (_Rcvr*)__rcvr, (_As &&) __as...);
+ _Tag{}((_Rcvr&&)*(_Rcvr*)__rcvr, (_As&&)__as...);
};
}
};
@@ -610,8 +610,7 @@
__nothrow_callable<const __vtable_t&, _Tag, void*, _As...>)
-> __call_result_t<const __vtable_t&, _Tag, void*, _As...>
{
- return (*__self.__vtable_)(_Tag{}, __self.__rcvr_,
- (_As &&) __as...);
+ return (*__self.__vtable_)(_Tag{}, __self.__rcvr_, (_As&&)__as...);
}
} __env_;
@@ -630,7 +629,7 @@
friend void tag_invoke(_Tag, _Self&& __self, _As&&... __as) noexcept
{
(*static_cast<const __rcvr_vfun<_Tag(_As...)>*>(__self.__env_.__vtable_)
- ->__fn_)(((_Self &&) __self).__env_.__rcvr_, (_As &&) __as...);
+ ->__fn_)(((_Self&&)__self).__env_.__rcvr_, (_As&&)__as...);
}
template <std::same_as<__ref> Self>
@@ -690,8 +689,7 @@
requires __callable<_CPO, _Receiver&&, _Args...>
friend void tag_invoke(_CPO, _Self&& __self, _Args&&... __args) noexcept
{
- _CPO{}((_Receiver &&) __self.__op_->__receiver_,
- (_Args &&) __args...);
+ _CPO{}((_Receiver&&)__self.__op_->__receiver_, (_Args&&)__args...);
}
friend env_of_t<_Receiver> tag_invoke(get_env_t,
@@ -707,8 +705,8 @@
using __id = __operation;
__t(_Sender&& __sender, _Receiver&& __receiver) :
- __operation_base<_Receiver, _Sigs, _Queries>{(_Receiver &&)
- __receiver},
+ __operation_base<_Receiver, _Sigs, _Queries>{
+ (_Receiver&&)__receiver},
__storage_{__sender.__connect(__receiver_ref_t{__rec_})}
{}
@@ -782,8 +780,8 @@
connect_result_t<_Sender, __receiver_ref_t>;
return __unique_operation_storage{
std::in_place_type<__op_state_t>, __conv{[&] {
- return connect((_Sender &&) __sender,
- (__receiver_ref_t &&) __receiver);
+ return connect((_Sender&&)__sender,
+ (__receiver_ref_t&&)__receiver);
}}};
}};
return &__vtable_;
@@ -812,7 +810,7 @@
void*, _As...>
{
return __self.__vtable_->__queries()(_Tag{}, __self.__sender_,
- (_As &&) __as...);
+ (_As&&)__as...);
}
};
@@ -831,14 +829,14 @@
template <__not_decays_to<__t> _Sender>
requires sender_to<_Sender, __receiver_ref<_Sigs, _ReceiverQueries>>
- __t(_Sender&& __sndr) : __storage_{(_Sender &&) __sndr}
+ __t(_Sender&& __sndr) : __storage_{(_Sender&&)__sndr}
{}
__unique_operation_storage __connect(__receiver_ref_t __receiver)
{
return __storage_.__get_vtable()->__connect_(
__storage_.__get_object_pointer(),
- (__receiver_ref_t &&) __receiver);
+ (__receiver_ref_t&&)__receiver);
}
explicit operator bool() const noexcept
@@ -854,7 +852,7 @@
__operation<__t, __decay_t<_Rcvr>, _ReceiverQueries>>
tag_invoke(connect_t, __t&& __self, _Rcvr&& __rcvr)
{
- return {(__t &&) __self, (_Rcvr &&) __rcvr};
+ return {(__t&&)__self, (_Rcvr&&)__rcvr};
}
friend __env_t tag_invoke(get_env_t, const __t& __self) noexcept
@@ -872,7 +870,7 @@
template <class _Scheduler>
requires(!__decays_to<_Scheduler, __scheduler>) && scheduler<_Scheduler>
__scheduler(_Scheduler&& __scheduler) :
- __storage_{(_Scheduler &&) __scheduler}
+ __storage_{(_Scheduler&&)__scheduler}
{}
using __sender_t = _ScheduleSender;
@@ -934,7 +932,7 @@
void*, _As...>
{
return __self.__storage_.__get_vtable()->__queries()(
- _Tag{}, __self.__storage_.__get_object_pointer(), (_As &&) __as...);
+ _Tag{}, __self.__storage_.__get_object_pointer(), (_As&&)__as...);
}
friend bool operator==(const __scheduler& __self,
@@ -984,8 +982,7 @@
std::is_nothrow_invocable_v<
_Tag, stdexec::__copy_cvref_t<Self, __receiver_base>, _As...>)
{
- return tag_invoke(_Tag{}, ((Self &&) __self).__receiver_,
- (_As &&) __as...);
+ return tag_invoke(_Tag{}, ((Self&&)__self).__receiver_, (_As&&)__as...);
}
public:
@@ -1016,8 +1013,8 @@
std::is_nothrow_invocable_v<
_Tag, stdexec::__copy_cvref_t<Self, __sender_base>, _As...>)
{
- return tag_invoke(_Tag{}, ((Self &&) __self).__sender_,
- (_As &&) __as...);
+ return tag_invoke(_Tag{}, ((Self&&)__self).__sender_,
+ (_As&&)__as...);
}
public:
@@ -1030,7 +1027,7 @@
stdexec::sender<_Sender>
any_sender(_Sender&& __sender) noexcept(
stdexec::__nothrow_constructible_from<__sender_base, _Sender>) :
- __sender_((_Sender &&) __sender)
+ __sender_((_Sender&&)__sender)
{}
template <auto... _SchedulerQueries>
@@ -1077,7 +1074,7 @@
requires(!stdexec::__decays_to<_Scheduler, any_scheduler> &&
stdexec::scheduler<_Scheduler>)
any_scheduler(_Scheduler&& __scheduler) :
- __scheduler_{(_Scheduler &&) __scheduler}
+ __scheduler_{(_Scheduler&&)__scheduler}
{}
private:
@@ -1091,8 +1088,8 @@
_Tag, stdexec::__copy_cvref_t<Self, __scheduler_base>,
_As...>)
{
- return tag_invoke(_Tag{}, ((Self &&) __self).__scheduler_,
- (_As &&) __as...);
+ return tag_invoke(_Tag{}, ((Self&&)__self).__scheduler_,
+ (_As&&)__as...);
}
friend bool
diff --git a/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp b/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
index 4db9d6a..36eaf5c 100644
--- a/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
+++ b/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
@@ -31,8 +31,8 @@
{
using namespace stdexec;
-using __any_scheduler = //
- any_receiver_ref< //
+using __any_scheduler = //
+ any_receiver_ref< //
completion_signatures<set_error_t(std::exception_ptr),
set_stopped_t()>> //
::any_sender<>::any_scheduler<>;
@@ -52,8 +52,7 @@
friend void tag_invoke(set_value_t, _Self&& __self,
_Args&&... __args) noexcept
{
- set_value((_Receiver &&) __self.__receiver_,
- (_Args &&) __args...);
+ set_value((_Receiver&&)__self.__receiver_, (_Args&&)__args...);
}
template <__decays_to<__t> _Self, class _Error>
@@ -61,8 +60,7 @@
friend void tag_invoke(set_error_t, _Self&& __self,
_Error&& __error) noexcept
{
- set_error((_Receiver &&) __self.__receiver_,
- (_Error &&) __error);
+ set_error((_Receiver&&)__self.__receiver_, (_Error&&)__error);
}
[[noreturn]] friend void tag_invoke(set_stopped_t, __t&&) noexcept
@@ -100,8 +98,8 @@
friend connect_result_t<_Sender, __receiver<_Receiver>>
tag_invoke(connect_t, __t&& __self, _Receiver&& __rcvr) noexcept
{
- return connect((_Sender &&) __self.__sender_,
- __receiver<_Receiver>{(_Receiver &&) __rcvr});
+ return connect((_Sender&&)__self.__sender_,
+ __receiver<_Receiver>{(_Receiver&&)__rcvr});
}
template <__decays_to<__t> _Self, class _Env>
@@ -126,13 +124,13 @@
__sender<_Sender> operator()(_Sender&& __sndr) const
noexcept(__nothrow_decay_copyable<_Sender>)
{
- return __sender<_Sender>{(_Sender &&) __sndr};
+ return __sender<_Sender>{(_Sender&&)__sndr};
}
template <class _Value>
_Value&& operator()(_Value&& __value) const noexcept
{
- return (_Value &&) __value;
+ return (_Value&&)__value;
}
};
@@ -143,7 +141,7 @@
requires(_Promise& __promise, __continuation_handle<> __c) {
{
__promise.continuation()
- } -> convertible_to<__continuation_handle<>>;
+ } -> convertible_to<__continuation_handle<>>;
{
__promise.set_continuation(__c)
};
@@ -256,7 +254,7 @@
template <class _Awaitable>
decltype(auto) await_transform(_Awaitable&& __awaitable) noexcept
{
- return as_awaitable(__die_on_stop((_Awaitable &&) __awaitable),
+ return as_awaitable(__die_on_stop((_Awaitable&&)__awaitable),
*this);
}
@@ -279,7 +277,7 @@
template <class _Action, class... _Ts>
static __task<_Ts...> __impl(_Action __action, _Ts... __ts)
{
- co_await ((_Action &&) __action)((_Ts &&) __ts...);
+ co_await ((_Action&&)__action)((_Ts&&)__ts...);
}
public:
@@ -287,7 +285,7 @@
requires __callable<__decay_t<_Action>, __decay_t<_Ts>...>
__task<_Ts...> operator()(_Action&& __action, _Ts&&... __ts) const
{
- return __impl((_Action &&) __action, (_Ts &&) __ts...);
+ return __impl((_Action&&)__action, (_Ts&&)__ts...);
}
};
} // namespace __at_coro_exit
diff --git a/include/sdbusplus/async/stdexec/concepts.hpp b/include/sdbusplus/async/stdexec/concepts.hpp
index 0e5cfb2..11dbe43 100644
--- a/include/sdbusplus/async/stdexec/concepts.hpp
+++ b/include/sdbusplus/async/stdexec/concepts.hpp
@@ -82,10 +82,10 @@
requires(__cref_t<_Ty> __t) {
{
__t == __t
- } -> convertible_to<bool>;
+ } -> convertible_to<bool>;
{
__t != __t
- } -> convertible_to<bool>;
+ } -> convertible_to<bool>;
};
#endif
} // namespace stdexec::__std_concepts
@@ -189,8 +189,7 @@
concept __decays_to = __same_as<__decay_t<_Ty>, _Up>;
template <class _Ty, class _Up>
-concept __not_decays_to = !
-__decays_to<_Ty, _Up>;
+concept __not_decays_to = !__decays_to<_Ty, _Up>;
template <bool _TrueOrFalse>
concept __satisfies = _TrueOrFalse;
@@ -208,7 +207,7 @@
concept __all_of = (__same_as<_Ty, _Us> && ...);
template <class _Ty, class... _Us>
-concept __none_of = ((!__same_as<_Ty, _Us>) && ...);
+concept __none_of = ((!__same_as<_Ty, _Us>)&&...);
// Not exactly right, but close.
template <class _Ty>
@@ -273,8 +272,8 @@
// const std::remove_reference_t<_RHS>&> &&
requires(_LHS __lhs, _RHS&& __rhs) {
{
- __lhs = ((_RHS &&) __rhs)
- } -> same_as<_LHS>;
+ __lhs = ((_RHS&&)__rhs)
+ } -> same_as<_LHS>;
};
namespace __swap
@@ -283,13 +282,13 @@
template <class _Ty, class _Uy>
concept swappable_with = //
- requires(_Ty&& __t, _Uy&& __u) { swap((_Ty &&) __t, (_Uy &&) __u); };
+ requires(_Ty&& __t, _Uy&& __u) { swap((_Ty&&)__t, (_Uy&&)__u); };
inline constexpr const auto __fn = //
[]<class _Ty, swappable_with<_Ty> _Uy>(_Ty&& __t, _Uy&& __u) noexcept(
- noexcept(swap((_Ty &&) __t, (_Uy &&) __u))) {
- swap((_Ty &&) __t, (_Uy &&) __u);
- };
+ noexcept(swap((_Ty&&)__t, (_Uy&&)__u))) {
+ swap((_Ty&&)__t, (_Uy&&)__u);
+};
} // namespace __swap
using __swap::swappable_with;
@@ -329,28 +328,28 @@
requires(__cref_t<T> t, __cref_t<U> u) {
{
t < u
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
t > u
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
t <= u
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
t >= u
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
u < t
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
u > t
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
u <= t
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
{
u >= t
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
};
template <class _Ty>
@@ -375,8 +374,7 @@
concept __is_instance_of = __is_instance_of_<_Ay, _Ty>;
template <class _Ay, template <class...> class _Ty>
-concept __is_not_instance_of = !
-__is_instance_of<_Ay, _Ty>;
+concept __is_not_instance_of = !__is_instance_of<_Ay, _Ty>;
#if __has_builtin(__is_nothrow_constructible)
template <class _Ty, class... _As>
diff --git a/include/sdbusplus/async/stdexec/coroutine.hpp b/include/sdbusplus/async/stdexec/coroutine.hpp
index ee0b6fd..3c5c4c8 100644
--- a/include/sdbusplus/async/stdexec/coroutine.hpp
+++ b/include/sdbusplus/async/stdexec/coroutine.hpp
@@ -43,7 +43,7 @@
requires(_Awaiter& __await, __coro::coroutine_handle<_Promise> __h) {
{
__await.await_suspend(__h)
- } -> __await_suspend_result;
+ } -> __await_suspend_result;
};
template <class _Awaiter, class _Promise = void>
@@ -57,45 +57,45 @@
template <class _Awaitable>
decltype(auto) __get_awaiter(_Awaitable&& __await, void*)
{
- if constexpr (requires { ((_Awaitable &&) __await).operator co_await(); })
+ if constexpr (requires { ((_Awaitable&&)__await).operator co_await(); })
{
- return ((_Awaitable &&) __await).operator co_await();
+ return ((_Awaitable&&)__await).operator co_await();
}
- else if constexpr (requires { operator co_await((_Awaitable &&) __await); })
+ else if constexpr (requires { operator co_await((_Awaitable&&)__await); })
{
- return operator co_await((_Awaitable &&) __await);
+ return operator co_await((_Awaitable&&)__await);
}
else
{
- return (_Awaitable &&) __await;
+ return (_Awaitable&&)__await;
}
}
template <class _Awaitable, class _Promise>
decltype(auto) __get_awaiter(_Awaitable&& __await, _Promise* __promise)
- requires requires { __promise->await_transform((_Awaitable &&) __await); }
+ requires requires { __promise->await_transform((_Awaitable&&)__await); }
{
if constexpr (requires {
- __promise->await_transform((_Awaitable &&) __await)
+ __promise->await_transform((_Awaitable&&)__await)
.
operator co_await();
})
{
- return __promise->await_transform((_Awaitable &&) __await)
+ return __promise->await_transform((_Awaitable&&)__await)
.
operator co_await();
}
else if constexpr (requires {
operator co_await(__promise->await_transform(
- (_Awaitable &&) __await));
+ (_Awaitable&&)__await));
})
{
return operator co_await(
- __promise->await_transform((_Awaitable &&) __await));
+ __promise->await_transform((_Awaitable&&)__await));
}
else
{
- return __promise->await_transform((_Awaitable &&) __await);
+ return __promise->await_transform((_Awaitable&&)__await);
}
}
@@ -103,8 +103,8 @@
concept __awaitable = //
requires(_Awaitable&& __await, _Promise* __promise) {
{
- stdexec::__get_awaiter((_Awaitable &&) __await, __promise)
- } -> __awaiter<_Promise>;
+ stdexec::__get_awaiter((_Awaitable&&)__await, __promise)
+ } -> __awaiter<_Promise>;
};
template <class _Tp>
diff --git a/include/sdbusplus/async/stdexec/execution.hpp b/include/sdbusplus/async/stdexec/execution.hpp
index d0f0bb1..33e5ae5 100644
--- a/include/sdbusplus/async/stdexec/execution.hpp
+++ b/include/sdbusplus/async/stdexec/execution.hpp
@@ -87,7 +87,7 @@
{
if constexpr (tag_invocable<forwarding_query_t, _Query>)
{
- return tag_invoke(*this, (_Query &&) __query);
+ return tag_invoke(*this, (_Query&&)__query);
}
else if constexpr (std::derived_from<_Query, forwarding_query_t>)
{
@@ -215,7 +215,7 @@
[[no_unique_address]] __val_or_ref_t __value_;
- __t(__with&& __w) : __value_(((__with &&) __w).__value_) {}
+ __t(__with&& __w) : __value_(((__with&&)__w).__value_) {}
template <same_as<_Tag> _Tp, class... _Ts>
friend __val_or_ref_t tag_invoke(_Tp, const __t& __self, _Ts&&...) //
@@ -246,7 +246,7 @@
template <__class _Tag, class _Value>
__with<_Tag, __decay_t<_Value>> __with_(_Tag, _Value&& __val)
{
- return {(_Value &&) __val};
+ return {(_Value&&)__val};
}
template <__class _Tag>
@@ -273,12 +273,12 @@
template <__forwarding_query _Tag, same_as<__t> _Self, class... _As>
requires __none_of<_Tag, __tag_of<_WithIds>...> &&
__callable<_Tag, const __base_env_of<_Self>&, _As...>
- friend auto tag_invoke(_Tag __tag, const _Self& __self,
- _As&&... __as) noexcept
- -> __call_result_if_t<same_as<_Self, __t>, _Tag,
- const __base_env_of<_Self>&, _As...>
+ friend auto tag_invoke(_Tag __tag, const _Self& __self,
+ _As&&... __as) noexcept
+ -> __call_result_if_t<same_as<_Self, __t>, _Tag,
+ const __base_env_of<_Self>&, _As...>
{
- return ((_Tag &&) __tag)(__self.__base_env_, (_As &&) __as...);
+ return ((_Tag&&)__tag)(__self.__base_env_, (_As&&)__as...);
}
};
};
@@ -305,7 +305,7 @@
auto operator()(_BaseEnv&& __base_env, __with<_Tags, _Values>... __ws) const
-> __env_t<__decay_t<_BaseEnv>, __with<_Tags, _Values>...>
{
- return {{std::move(__ws)}..., (_BaseEnv &&) __base_env};
+ return {{std::move(__ws)}..., (_BaseEnv&&)__base_env};
}
template <class... _Tags, class... _Values>
@@ -370,12 +370,12 @@
requires(_EnvProvider& __ep) {
{
get_env(std::as_const(__ep))
- } -> queryable;
+ } -> queryable;
// NOT TO SPEC: Remove the following line when we deprecate all
// R5 entities.
{
get_env(std::as_const(__ep))
- } -> __none_of<no_env, void>;
+ } -> __none_of<no_env, void>;
};
/////////////////////////////////////////////////////////////////////////////
@@ -394,8 +394,7 @@
operator()(_Receiver&& __rcvr, _As&&... __as) const noexcept
{
static_assert(nothrow_tag_invocable<set_value_t, _Receiver, _As...>);
- (void)tag_invoke(set_value_t{}, (_Receiver &&) __rcvr,
- (_As &&) __as...);
+ (void)tag_invoke(set_value_t{}, (_Receiver&&)__rcvr, (_As&&)__as...);
}
};
@@ -412,8 +411,7 @@
operator()(_Receiver&& __rcvr, _Error&& __err) const noexcept
{
static_assert(nothrow_tag_invocable<set_error_t, _Receiver, _Error>);
- (void)tag_invoke(set_error_t{}, (_Receiver &&) __rcvr,
- (_Error &&) __err);
+ (void)tag_invoke(set_error_t{}, (_Receiver&&)__rcvr, (_Error&&)__err);
}
};
@@ -430,7 +428,7 @@
operator()(_Receiver&& __rcvr) const noexcept
{
static_assert(nothrow_tag_invocable<set_stopped_t, _Receiver>);
- (void)tag_invoke(set_stopped_t{}, (_Receiver &&) __rcvr);
+ (void)tag_invoke(set_stopped_t{}, (_Receiver&&)__rcvr);
}
};
} // namespace __receivers
@@ -455,17 +453,17 @@
{
if constexpr (__nothrow_callable<_Fun, _Args...>)
{
- ((_Fun &&) __fun)((_Args &&) __args...);
+ ((_Fun&&)__fun)((_Args&&)__args...);
}
else
{
try
{
- ((_Fun &&) __fun)((_Args &&) __args...);
+ ((_Fun&&)__fun)((_Args&&)__args...);
}
catch (...)
{
- set_error((_Receiver &&) __rcvr, std::current_exception());
+ set_error((_Receiver&&)__rcvr, std::current_exception());
}
}
}
@@ -525,7 +523,7 @@
template <class _Ty>
_Ty&& await_transform(_Ty&& __value) noexcept
{
- return (_Ty &&) __value;
+ return (_Ty&&)__value;
}
template <class _Ty>
@@ -534,7 +532,7 @@
noexcept(nothrow_tag_invocable<as_awaitable_t, _Ty, __env_promise&>)
-> tag_invoke_result_t<as_awaitable_t, _Ty, __env_promise&>
{
- return tag_invoke(as_awaitable, (_Ty &&) __value, *this);
+ return tag_invoke(as_awaitable, (_Ty&&)__value, *this);
}
friend auto tag_invoke(get_env_t, const __env_promise&) noexcept
@@ -653,7 +651,7 @@
{};
friend auto operator,(_MISSING_COMPLETION_SIGNAL_, auto)
- -> _MISSING_COMPLETION_SIGNAL_
+ -> _MISSING_COMPLETION_SIGNAL_
{
return {};
}
@@ -683,8 +681,7 @@
template <class _Completion, class _Receiver>
concept __is_valid_completion = //
- _Completion::template
-_WITH_RECEIVER_<_Receiver>::value;
+ _Completion::template _WITH_RECEIVER_<_Receiver>::value;
} // namespace __receiver_concepts
using __receiver_concepts::__has_completions;
@@ -721,8 +718,8 @@
requires(_Completions* __required_completions) {
{
__has_completions<__decay_t<_Receiver>>(__required_completions)
- } //
- ->__is_valid_completion<__decay_t<_Receiver>>;
+ } //
+ ->__is_valid_completion<__decay_t<_Receiver>>;
};
/////////////////////////////////////////////////////////////////////////////
@@ -1022,12 +1019,12 @@
using __ensure_concat =
__minvoke<__mconcat<__q<completion_signatures>>, _Sigs...>;
-template < //
- class _Sender, //
- class _Env, //
- class _Sigs, //
- class _SetValue, //
- class _SetError, //
+template < //
+ class _Sender, //
+ class _Env, //
+ class _Sigs, //
+ class _SetValue, //
+ class _SetError, //
class _SetStopped>
using __compl_sigs_t = //
__concat_completion_signatures_t<
@@ -1159,8 +1156,8 @@
if constexpr (tag_invocable<forwarding_scheduler_query_t, _Tag>)
{
static_assert(
- noexcept(tag_invoke(*this, (_Tag &&) __tag) ? true : false));
- return tag_invoke(*this, (_Tag &&) __tag) ? true : false;
+ noexcept(tag_invoke(*this, (_Tag&&)__tag) ? true : false));
+ return tag_invoke(*this, (_Tag&&)__tag) ? true : false;
}
else
{
@@ -1187,7 +1184,7 @@
operator()(_Scheduler&& __sched) const
noexcept(nothrow_tag_invocable<schedule_t, _Scheduler>)
{
- return tag_invoke(schedule_t{}, (_Scheduler &&) __sched);
+ return tag_invoke(schedule_t{}, (_Scheduler&&)__sched);
}
friend constexpr bool tag_invoke(forwarding_scheduler_query_t, schedule_t)
@@ -1205,9 +1202,7 @@
concept tag_category = //
requires {
typename __mbool<bool{_Predicate(_Tag{})}>;
- requires bool {
- _Predicate(_Tag{})
- };
+ requires bool{_Predicate(_Tag{})};
};
// [execution.schedulers.queries], scheduler queries
@@ -1282,8 +1277,8 @@
concept __has_schedule = //
requires(_Scheduler&& __sched) {
{
- schedule((_Scheduler &&) __sched)
- } -> sender;
+ schedule((_Scheduler&&)__sched)
+ } -> sender;
};
template <class _Scheduler>
@@ -1292,8 +1287,8 @@
const get_completion_scheduler_t<set_value_t>&& __tag) {
{
tag_invoke(std::move(__tag),
- get_env(schedule((_Scheduler &&) __sched)))
- } -> same_as<__decay_t<_Scheduler>>;
+ get_env(schedule((_Scheduler&&)__sched)))
+ } -> same_as<__decay_t<_Scheduler>>;
};
template <class _Scheduler>
@@ -1326,8 +1321,8 @@
template <__none_of<no_env> _Env>
requires tag_invocable<get_scheduler_t, const _Env&> &&
scheduler<tag_invoke_result_t<get_scheduler_t, const _Env&>>
- auto operator()(const _Env& __env) const noexcept
- -> tag_invoke_result_t<get_scheduler_t, const _Env&>
+ auto operator()(const _Env& __env) const noexcept
+ -> tag_invoke_result_t<get_scheduler_t, const _Env&>
{
static_assert(nothrow_tag_invocable<get_scheduler_t, const _Env&>);
return tag_invoke(get_scheduler_t{}, __env);
@@ -1349,11 +1344,9 @@
__cref_t<_Tp>> &&
scheduler<tag_invoke_result_t<get_delegatee_scheduler_t,
__cref_t<_Tp>>>
- auto operator()(_Tp&& __t) const
- noexcept(nothrow_tag_invocable<get_delegatee_scheduler_t,
- __cref_t<_Tp>>)
- -> tag_invoke_result_t<get_delegatee_scheduler_t,
- __cref_t<_Tp>>
+ auto operator()(_Tp&& __t) const noexcept(
+ nothrow_tag_invocable<get_delegatee_scheduler_t, __cref_t<_Tp>>)
+ -> tag_invoke_result_t<get_delegatee_scheduler_t, __cref_t<_Tp>>
{
return tag_invoke(get_delegatee_scheduler_t{}, std::as_const(__t));
}
@@ -1372,9 +1365,9 @@
template <__none_of<no_env> _Env>
requires nothrow_tag_invocable<get_allocator_t, const _Env&> &&
__allocator<tag_invoke_result_t<get_allocator_t, const _Env&>>
- auto operator()(const _Env& __env) const
- noexcept(nothrow_tag_invocable<get_allocator_t, const _Env&>)
- -> tag_invoke_result_t<get_allocator_t, const _Env&>
+ auto operator()(const _Env& __env) const
+ noexcept(nothrow_tag_invocable<get_allocator_t, const _Env&>)
+ -> tag_invoke_result_t<get_allocator_t, const _Env&>
{
return tag_invoke(get_allocator_t{}, __env);
}
@@ -1400,9 +1393,9 @@
requires tag_invocable<get_stop_token_t, const _Env&> &&
stoppable_token<
tag_invoke_result_t<get_stop_token_t, const _Env&>>
- auto operator()(const _Env& __env) const
- noexcept(nothrow_tag_invocable<get_stop_token_t, const _Env&>)
- -> tag_invoke_result_t<get_stop_token_t, const _Env&>
+ auto operator()(const _Env& __env) const
+ noexcept(nothrow_tag_invocable<get_stop_token_t, const _Env&>)
+ -> tag_invoke_result_t<get_stop_token_t, const _Env&>
{
return tag_invoke(get_stop_token_t{}, __env);
}
@@ -1432,7 +1425,7 @@
requires(const _SchedulerProvider& __sp) {
{
get_scheduler(__sp)
- } -> scheduler<>;
+ } -> scheduler<>;
};
/////////////////////////////////////////////////////////////////////////////
@@ -1542,7 +1535,7 @@
__coro::coroutine_handle<> unhandled_stopped() noexcept
{
- set_stopped((_Receiver &&) __rcvr_);
+ set_stopped((_Receiver&&)__rcvr_);
// Returning noop_coroutine here causes the __connect_awaitable
// coroutine to never resume past the point where it co_await's
// the awaitable.
@@ -1558,7 +1551,7 @@
template <class _Awaitable>
_Awaitable&& await_transform(_Awaitable&& __await) noexcept
{
- return (_Awaitable &&) __await;
+ return (_Awaitable&&)__await;
}
template <class _Awaitable>
@@ -1567,7 +1560,7 @@
noexcept(nothrow_tag_invocable<as_awaitable_t, _Awaitable, __t&>)
-> tag_invoke_result_t<as_awaitable_t, _Awaitable, __t&>
{
- return tag_invoke(as_awaitable, (_Awaitable &&) __await, *this);
+ return tag_invoke(as_awaitable, (_Awaitable&&)__await, *this);
}
// Pass through the get_env receiver query
@@ -1593,7 +1586,7 @@
template <class _Fun, class... _Ts>
static auto __co_call(_Fun __fun, _Ts&&... __as) noexcept
{
- auto __fn = [&, __fun]() noexcept { __fun((_Ts &&) __as...); };
+ auto __fn = [&, __fun]() noexcept { __fun((_Ts&&)__as...); };
struct __awaiter
{
@@ -1627,24 +1620,24 @@
try
{
if constexpr (same_as<__result_t, void>)
- co_await (co_await (_Awaitable &&) __await,
- __co_call(set_value, (_Receiver &&) __rcvr));
+ co_await (co_await (_Awaitable&&) __await,
+ __co_call(set_value, (_Receiver&&)__rcvr));
else
- co_await __co_call(set_value, (_Receiver &&) __rcvr,
- co_await (_Awaitable &&) __await);
+ co_await __co_call(set_value, (_Receiver&&)__rcvr,
+ co_await (_Awaitable&&) __await);
}
catch (...)
{
__eptr = std::current_exception();
}
- co_await __co_call(set_error, (_Receiver &&) __rcvr,
- (std::exception_ptr &&) __eptr);
+ co_await __co_call(set_error, (_Receiver&&)__rcvr,
+ (std::exception_ptr&&)__eptr);
}
template <receiver _Receiver, class _Awaitable>
using __completions_t = //
completion_signatures<
- __minvoke< // set_value_t() or set_value_t(T)
+ __minvoke< // set_value_t() or set_value_t(T)
__remove<void, __qf<set_value_t>>,
__await_result_t<_Awaitable, __promise_t<_Receiver>>>,
set_error_t(std::exception_ptr), set_stopped_t()>;
@@ -1655,7 +1648,7 @@
__operation_t<_Receiver> operator()(_Awaitable&& __await,
_Receiver __rcvr) const
{
- return __co_impl((_Awaitable &&) __await, (_Receiver &&) __rcvr);
+ return __co_impl((_Awaitable&&)__await, (_Receiver&&)__rcvr);
}
};
} // namespace __connect_awaitable_
@@ -1680,7 +1673,7 @@
std::is_invocable_r_v<bool, tag_t<tag_invoke>,
forwarding_sender_query_t, _Tag>)
{
- return tag_invoke(*this, (_Tag &&) __tag);
+ return tag_invoke(*this, (_Tag&&)__tag);
}
else
{
@@ -1829,10 +1822,9 @@
requires __connectable_with_tag_invoke<_Sender, _Receiver> ||
__callable<__connect_awaitable_t, _Sender, _Receiver> ||
tag_invocable<__is_debug_env_t, env_of_t<_Receiver>>
- auto operator()(_Sender&& __sndr, _Receiver&& __rcvr) const
- noexcept(
- __nothrow_callable<__select_impl_t<_Sender, _Receiver>>)
- -> __call_result_t<__select_impl_t<_Sender, _Receiver>>
+ auto operator()(_Sender&& __sndr, _Receiver&& __rcvr) const
+ noexcept(__nothrow_callable<__select_impl_t<_Sender, _Receiver>>)
+ -> __call_result_t<__select_impl_t<_Sender, _Receiver>>
{
if constexpr (__connectable_with_tag_invoke<_Sender, _Receiver>)
{
@@ -1841,21 +1833,20 @@
tag_invoke_result_t<connect_t, _Sender, _Receiver>>,
"stdexec::connect(sender, receiver) must return a type that "
"satisfies the operation_state concept");
- return tag_invoke(connect_t{}, (_Sender &&) __sndr,
- (_Receiver &&) __rcvr);
+ return tag_invoke(connect_t{}, (_Sender&&)__sndr,
+ (_Receiver&&)__rcvr);
}
else if constexpr (__callable<__connect_awaitable_t, _Sender,
_Receiver>)
{
- return __connect_awaitable((_Sender &&) __sndr,
- (_Receiver &&) __rcvr);
+ return __connect_awaitable((_Sender&&)__sndr, (_Receiver&&)__rcvr);
}
else
{
// This should generate an instantiate backtrace that contains
// useful debugging information.
using __tag_invoke::tag_invoke;
- tag_invoke(*this, (_Sender &&) __sndr, (_Receiver &&) __rcvr);
+ tag_invoke(*this, (_Sender&&)__sndr, (_Receiver&&)__rcvr);
}
}
@@ -1874,8 +1865,8 @@
using connect_result_t = __call_result_t<connect_t, _Sender, _Receiver>;
template <class _Sender, class _Receiver>
-concept __nothrow_connectable = noexcept(connect(__declval<_Sender>(),
- __declval<_Receiver>()));
+concept __nothrow_connectable =
+ noexcept(connect(__declval<_Sender>(), __declval<_Receiver>()));
////////////////////////////////////////////////////////////////////////////
// `__debug_sender`
@@ -1930,21 +1921,21 @@
void __debug_sender(_Sender&& __sndr, _Env = {})
{
using _Receiver = __debug_receiver<_Env, _Sigs>;
- (void)connect_t{}((_Sender &&) __sndr, _Receiver{});
+ (void)connect_t{}((_Sender&&)__sndr, _Receiver{});
}
template <class _Sender>
void __debug_sender(_Sender&& __sndr)
{
using _Receiver = __any_debug_receiver<empty_env>;
- (void)connect_t{}((_Sender &&) __sndr, _Receiver{});
+ (void)connect_t{}((_Sender&&)__sndr, _Receiver{});
}
template <class _Env, class _Sender>
void __debug_sender(_Sender&& __sndr, _Env)
{
using _Receiver = __any_debug_receiver<_Env>;
- (void)connect_t{}((_Sender &&) __sndr, _Receiver{});
+ (void)connect_t{}((_Sender&&)__sndr, _Receiver{});
}
} // namespace __debug
@@ -1957,7 +1948,7 @@
sender_in<_Sender, env_of_t<_Receiver>> && //
__receiver_from<_Receiver, _Sender> && //
requires(_Sender&& __sndr, _Receiver&& __rcvr) {
- connect((_Sender &&) __sndr, (_Receiver &&) __rcvr);
+ connect((_Sender&&)__sndr, (_Receiver&&)__rcvr);
};
template <class _Tag, class... _Args>
@@ -1996,9 +1987,8 @@
requires tag_invocable<get_completion_scheduler_t, const _Queryable&> &&
scheduler<tag_invoke_result_t<get_completion_scheduler_t,
const _Queryable&>>
- auto operator()(const _Queryable& __queryable) const noexcept
- -> tag_invoke_result_t<get_completion_scheduler_t,
- const _Queryable&>
+ auto operator()(const _Queryable& __queryable) const noexcept
+ -> tag_invoke_result_t<get_completion_scheduler_t, const _Queryable&>
{
// NOT TO SPEC:
static_assert(nothrow_tag_invocable<get_completion_scheduler_t,
@@ -2057,12 +2047,12 @@
{
try
{
- __self.__result_->template emplace<1>((_Us &&) __us...);
+ __self.__result_->template emplace<1>((_Us&&)__us...);
__self.__continuation_.resume();
}
catch (...)
{
- set_error((__receiver_base &&) __self, std::current_exception());
+ set_error((__receiver_base&&)__self, std::current_exception());
}
}
@@ -2071,13 +2061,13 @@
_Error&& __err) noexcept
{
if constexpr (__decays_to<_Error, std::exception_ptr>)
- __self.__result_->template emplace<2>((_Error &&) __err);
+ __self.__result_->template emplace<2>((_Error&&)__err);
else if constexpr (__decays_to<_Error, std::error_code>)
__self.__result_->template emplace<2>(
std::make_exception_ptr(std::system_error(__err)));
else
__self.__result_->template emplace<2>(
- std::make_exception_ptr((_Error &&) __err));
+ std::make_exception_ptr((_Error&&)__err));
__self.__continuation_.resume();
}
@@ -2139,7 +2129,7 @@
break;
case 1: // set_value
if constexpr (!std::is_void_v<_Value>)
- return (_Value &&) std::get<1>(__result_);
+ return (_Value&&)std::get<1>(__result_);
else
return;
case 2: // set_error
@@ -2163,7 +2153,7 @@
{
__t(_Sender&& sndr, __coro::coroutine_handle<_Promise> __hcoro) //
noexcept(__nothrow_connectable<_Sender, __receiver>) :
- __op_state_(connect((_Sender &&) sndr,
+ __op_state_(connect((_Sender&&)sndr,
__receiver{{&this->__result_, __hcoro}}))
{}
@@ -2189,7 +2179,7 @@
requires(_Promise& __promise) {
{
__promise.unhandled_stopped()
- } -> convertible_to<__coro::coroutine_handle<>>;
+ } -> convertible_to<__coro::coroutine_handle<>>;
};
struct __unspecified
@@ -2242,21 +2232,21 @@
{
using _Result = tag_invoke_result_t<as_awaitable_t, _Tp, _Promise&>;
static_assert(__awaitable<_Result, _Promise>);
- return tag_invoke(*this, (_Tp &&) __t, __promise);
+ return tag_invoke(*this, (_Tp&&)__t, __promise);
}
else if constexpr (__awaitable<_Tp, __unspecified>)
{ // NOT __awaitable<_Tp, _Promise> !!
- return (_Tp &&) __t;
+ return (_Tp&&)__t;
}
else if constexpr (__awaitable_sender<_Tp, _Promise>)
{
auto __hcoro =
__coro::coroutine_handle<_Promise>::from_promise(__promise);
- return __sender_awaitable_t<_Promise, _Tp>{(_Tp &&) __t, __hcoro};
+ return __sender_awaitable_t<_Promise, _Tp>{(_Tp&&)__t, __hcoro};
}
else
{
- return (_Tp &&) __t;
+ return (_Tp&&)__t;
}
}
};
@@ -2281,7 +2271,7 @@
__continuation_handle(__coro::coroutine_handle<_Promise> __coro) noexcept :
__coro_(__coro)
{
- if constexpr (requires(_Promise & __promise) {
+ if constexpr (requires(_Promise& __promise) {
__promise.unhandled_stopped();
})
{
@@ -2380,7 +2370,7 @@
-> __call_result_t<as_awaitable_t, _Value, _Promise&>
{
static_assert(derived_from<_Promise, with_awaitable_senders>);
- return as_awaitable((_Value &&) __val, static_cast<_Promise&>(*this));
+ return as_awaitable((_Value&&)__val, static_cast<_Promise&>(*this));
}
};
} // namespace __with_awaitable_senders
@@ -2428,8 +2418,8 @@
// Delete the state as cleanup:
auto __g = __scope_guard{__self.__op_state_->__delete_,
__self.__op_state_};
- return __tag((_Receiver &&) __self.__op_state_->__rcvr_,
- (_As &&) __as...);
+ return __tag((_Receiver&&)__self.__op_state_->__rcvr_,
+ (_As&&)__as...);
}
// Forward all receiever queries.
@@ -2454,12 +2444,11 @@
template <__decays_to<_Receiver> _CvrefReceiver>
__operation(_Sender&& __sndr, _CvrefReceiver&& __rcvr) :
__operation_base<_ReceiverId>{
- (_CvrefReceiver &&) __rcvr,
+ (_CvrefReceiver&&)__rcvr,
[](__operation_base<_ReceiverId>* __self) noexcept {
- delete static_cast<__operation*>(__self);
+ delete static_cast<__operation*>(__self);
}},
- __op_state_(
- connect((_Sender &&) __sndr, __receiver_t<_ReceiverId>{this}))
+ __op_state_(connect((_Sender&&)__sndr, __receiver_t<_ReceiverId>{this}))
{}
};
@@ -2469,7 +2458,7 @@
void operator()(_Sender&& __sndr, _Receiver __rcvr) const noexcept(false)
{
start((new __operation<__id<_Sender>, __id<_Receiver>>{
- (_Sender &&) __sndr, (_Receiver &&) __rcvr})
+ (_Sender&&)__sndr, (_Receiver&&)__rcvr})
->__op_state_);
}
};
@@ -2492,7 +2481,7 @@
friend void tag_invoke(start_t, __op& __self) noexcept
{
- set_value((_Receiver &&) __self.__recv_);
+ set_value((_Receiver&&)__self.__recv_);
}
};
@@ -2507,7 +2496,7 @@
template <typename _Receiver>
friend __op<_Receiver> tag_invoke(connect_t, __sender, _Receiver __rcvr)
{
- return {{}, (_Receiver &&) __rcvr};
+ return {{}, (_Receiver&&)__rcvr};
}
};
@@ -2579,8 +2568,7 @@
template <class _Sender, class _Env>
void operator()(_Sender&& __sndr, _Env&& __env) const
{
- __submit((_Sender &&) __sndr,
- __detached_receiver_t<_Env>{(_Env &&) __env});
+ __submit((_Sender&&)__sndr, __detached_receiver_t<_Env>{(_Env&&)__env});
}
};
@@ -2600,7 +2588,7 @@
// The selected implementation should return void
static_assert(
same_as<void, __call_result_t<_Dispatcher, _Sender, _Env>>);
- _Dispatcher{}((_Sender &&) __sndr, (_Env &&) __env);
+ _Dispatcher{}((_Sender&&)__sndr, (_Env&&)__env);
}
};
} // namespace __start_detached
@@ -2630,7 +2618,7 @@
{
std::apply(
[&__op_state](_Ts&... __ts) {
- _Tag{}((_Receiver &&) __op_state.__rcvr_, (_Ts &&) __ts...);
+ _Tag{}((_Receiver&&)__op_state.__rcvr_, (_Ts&&)__ts...);
},
__op_state.__vals_);
}
@@ -2659,7 +2647,7 @@
noexcept((std::is_nothrow_copy_constructible_v<_Ts> && ...))
-> __operation_t<_Receiver>
{
- return {{}, __sndr.__vals_, (_Receiver &&) __rcvr};
+ return {{}, __sndr.__vals_, (_Receiver&&)__rcvr};
}
template <receiver_of<completion_signatures> _Receiver>
@@ -2667,7 +2655,7 @@
noexcept((std::is_nothrow_move_constructible_v<_Ts> && ...))
-> __operation_t<_Receiver>
{
- return {{}, ((__t &&) __sndr).__vals_, (_Receiver &&) __rcvr};
+ return {{}, ((__t&&)__sndr).__vals_, (_Receiver&&)__rcvr};
}
friend empty_env tag_invoke(get_env_t, const __t&) noexcept
@@ -2713,7 +2701,7 @@
operator()(_Ts&&... __ts) const
noexcept((__nothrow_constructible_from<__decay_t<_Ts>, _Ts> && ...))
{
- return {{{(_Ts &&) __ts...}}};
+ return {{{(_Ts&&)__ts...}}};
}
} just{};
@@ -2725,7 +2713,7 @@
operator()(_Error&& __err) const
noexcept(__nothrow_constructible_from<__decay_t<_Error>, _Error>)
{
- return {{{(_Error &&) __err}}};
+ return {{{(_Error&&)__err}}};
}
} just_error{};
@@ -2761,7 +2749,7 @@
}
catch (...)
{
- set_error((__as_receiver &&) __rcvr, std::exception_ptr());
+ set_error((__as_receiver&&)__rcvr, std::exception_ptr());
}
}
@@ -2784,11 +2772,11 @@
template <scheduler _Scheduler, class _Fun>
requires __callable<_Fun&> && move_constructible<_Fun>
void operator()(_Scheduler&& __sched, _Fun __fun) const //
- noexcept(noexcept(__submit(schedule((_Scheduler &&) __sched),
- __as_receiver<_Fun>{(_Fun &&) __fun})))
+ noexcept(noexcept(__submit(schedule((_Scheduler&&)__sched),
+ __as_receiver<_Fun>{(_Fun&&)__fun})))
{
- (void)__submit(schedule((_Scheduler &&) __sched),
- __as_receiver<_Fun>{(_Fun &&) __fun});
+ (void)__submit(schedule((_Scheduler&&)__sched),
+ __as_receiver<_Fun>{(_Fun&&)__fun});
}
template <scheduler _Scheduler, class _Fun>
@@ -2797,7 +2785,7 @@
void operator()(_Scheduler&& __sched, _Fun __fun) const
noexcept(nothrow_tag_invocable<execute_t, _Scheduler, _Fun>)
{
- (void)tag_invoke(execute_t{}, (_Scheduler &&) __sched, (_Fun &&) __fun);
+ (void)tag_invoke(execute_t{}, (_Scheduler&&)__sched, (_Fun&&)__fun);
}
};
} // namespace __execute_
@@ -2840,7 +2828,7 @@
__call_result_t<_T1, __call_result_t<_T0, _Sender>>
operator()(_Sender&& __sndr) &&
{
- return ((_T1 &&) __t1_)(((_T0 &&) __t0_)((_Sender &&) __sndr));
+ return ((_T1&&)__t1_)(((_T0&&)__t0_)((_Sender&&)__sndr));
}
template <sender _Sender>
@@ -2849,7 +2837,7 @@
__call_result_t<_T1, __call_result_t<_T0, _Sender>>
operator()(_Sender&& __sndr) const&
{
- return __t1_(__t0_((_Sender &&) __sndr));
+ return __t1_(__t0_((_Sender&&)__sndr));
}
};
@@ -2861,13 +2849,13 @@
__call_result_t<_Closure, _Sender> operator|(_Sender&& __sndr,
_Closure&& __clsur)
{
- return ((_Closure &&) __clsur)((_Sender &&) __sndr);
+ return ((_Closure&&)__clsur)((_Sender&&)__sndr);
}
template <__sender_adaptor_closure _T0, __sender_adaptor_closure _T1>
__compose<__decay_t<_T0>, __decay_t<_T1>> operator|(_T0&& __t0, _T1&& __t1)
{
- return {{}, (_T0 &&) __t0, (_T1 &&) __t1};
+ return {{}, (_T0&&)__t0, (_T1&&)__t1};
}
template <class _Fun, class... _As>
@@ -2883,8 +2871,7 @@
{
return std::apply(
[&__sndr, this](_As&... __as) {
- return ((_Fun &&) __fun_)((_Sender &&) __sndr,
- (_As &&) __as...);
+ return ((_Fun&&)__fun_)((_Sender&&)__sndr, (_As&&)__as...);
},
__as_);
}
@@ -2897,7 +2884,7 @@
{
return std::apply(
[&__sndr, this](const _As&... __as) {
- return __fun_((_Sender &&) __sndr, __as...);
+ return __fun_((_Sender&&)__sndr, __as...);
},
__as_);
}
@@ -2918,7 +2905,7 @@
{
static_assert(std::is_reference_v<__copy_cvref_t<_Up&&, _Tp>>);
static_assert(std::is_base_of_v<_Tp, __decay_t<_Up>>);
- return (__copy_cvref_t<_Up&&, _Tp>)(_Up &&) u;
+ return (__copy_cvref_t<_Up&&, _Tp>)(_Up&&)u;
}
namespace __no
@@ -2943,7 +2930,7 @@
{
template <class _T1>
requires constructible_from<_Base, _T1>
- explicit __t(_T1&& __base) : __base_((_T1 &&) __base)
+ explicit __t(_T1&& __base) : __base_((_T1&&)__base)
{}
private:
@@ -2968,7 +2955,7 @@
_Base&&
base() && noexcept
{
- return (_Base &&) __base_;
+ return (_Base&&)__base_;
}
};
};
@@ -2990,10 +2977,10 @@
template <class _Self, class... _Ts> \
STDEXEC_DETAIL_CUDACC_HOST_DEVICE static auto \
__call_##_TAG(_Self&& __self, _Ts&&... __ts) noexcept( \
- noexcept(((_Self &&) __self)._TAG((_Ts &&) __ts...))) \
- ->decltype(((_Self &&) __self)._TAG((_Ts &&) __ts...)) \
+ noexcept(((_Self&&)__self)._TAG((_Ts&&)__ts...))) \
+ ->decltype(((_Self&&)__self)._TAG((_Ts&&)__ts...)) \
{ \
- return ((_Self &&) __self)._TAG((_Ts &&) __ts...); \
+ return ((_Self&&)__self)._TAG((_Ts&&)__ts...); \
} /**/
#define _CALL_MEMBER(_TAG, ...) __call_##_TAG(__VA_ARGS__)
@@ -3043,11 +3030,11 @@
{
if constexpr (__has_base)
{
- return __c_cast<__t>((_Dp &&) __self).base();
+ return __c_cast<__t>((_Dp&&)__self).base();
}
else
{
- return ((_Dp &&) __self).base();
+ return ((_Dp&&)__self).base();
}
}
@@ -3055,12 +3042,12 @@
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
friend auto
tag_invoke(_SetValue, _Derived&& __self, _As&&... __as) noexcept
- -> decltype(_CALL_MEMBER(set_value, (_Derived &&) __self,
- (_As &&) __as...))
+ -> decltype(_CALL_MEMBER(set_value, (_Derived&&)__self,
+ (_As&&)__as...))
{
- static_assert(noexcept(_CALL_MEMBER(set_value, (_Derived &&) __self,
- (_As &&) __as...)));
- _CALL_MEMBER(set_value, (_Derived &&) __self, (_As &&) __as...);
+ static_assert(noexcept(
+ _CALL_MEMBER(set_value, (_Derived&&)__self, (_As&&)__as...)));
+ _CALL_MEMBER(set_value, (_Derived&&)__self, (_As&&)__as...);
}
template <same_as<set_value_t> _SetValue, class _Dp = _Derived,
@@ -3071,19 +3058,19 @@
friend void tag_invoke(_SetValue, _Derived&& __self,
_As&&... __as) noexcept
{
- stdexec::set_value(__get_base((_Dp &&) __self), (_As &&) __as...);
+ stdexec::set_value(__get_base((_Dp&&)__self), (_As&&)__as...);
}
template <same_as<set_error_t> _SetError, class _Error>
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
friend auto
tag_invoke(_SetError, _Derived&& __self, _Error&& __err) noexcept
- -> decltype(_CALL_MEMBER(set_error, (_Derived &&) __self,
- (_Error &&) __err))
+ -> decltype(_CALL_MEMBER(set_error, (_Derived&&)__self,
+ (_Error&&)__err))
{
- static_assert(noexcept(_CALL_MEMBER(set_error, (_Derived &&) __self,
- (_Error &&) __err)));
- _CALL_MEMBER(set_error, (_Derived &&) __self, (_Error &&) __err);
+ static_assert(noexcept(
+ _CALL_MEMBER(set_error, (_Derived&&)__self, (_Error&&)__err)));
+ _CALL_MEMBER(set_error, (_Derived&&)__self, (_Error&&)__err);
}
template <same_as<set_error_t> _SetError, class _Error,
@@ -3094,19 +3081,18 @@
friend void tag_invoke(_SetError, _Derived&& __self,
_Error&& __err) noexcept
{
- stdexec::set_error(__get_base((_Derived &&) __self),
- (_Error &&) __err);
+ stdexec::set_error(__get_base((_Derived&&)__self), (_Error&&)__err);
}
template <same_as<set_stopped_t> _SetStopped, class _Dp = _Derived>
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
friend auto
tag_invoke(_SetStopped, _Derived&& __self) noexcept
- -> decltype(_CALL_MEMBER(set_stopped, (_Dp &&) __self))
+ -> decltype(_CALL_MEMBER(set_stopped, (_Dp&&)__self))
{
static_assert(
- noexcept(_CALL_MEMBER(set_stopped, (_Derived &&) __self)));
- _CALL_MEMBER(set_stopped, (_Derived &&) __self);
+ noexcept(_CALL_MEMBER(set_stopped, (_Derived&&)__self)));
+ _CALL_MEMBER(set_stopped, (_Derived&&)__self);
}
template <same_as<set_stopped_t> _SetStopped, class _Dp = _Derived>
@@ -3115,7 +3101,7 @@
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
friend void tag_invoke(_SetStopped, _Derived&& __self) noexcept
{
- stdexec::set_stopped(__get_base((_Derived &&) __self));
+ stdexec::set_stopped(__get_base((_Derived&&)__self));
}
// Pass through the get_env receiver query
@@ -3166,13 +3152,13 @@
{
if constexpr (same_as<void, std::invoke_result_t<_Fun, _As...>>)
{
- std::invoke((_Fun &&) __fun, (_As &&) __as...);
- set_value((_Receiver &&) __rcvr);
+ std::invoke((_Fun&&)__fun, (_As&&)__as...);
+ set_value((_Receiver&&)__rcvr);
}
else
{
- set_value((_Receiver &&) __rcvr,
- std::invoke((_Fun &&) __fun, (_As &&) __as...));
+ set_value((_Receiver&&)__rcvr,
+ std::invoke((_Fun&&)__fun, (_As&&)__as...));
}
}
@@ -3182,19 +3168,19 @@
{
if constexpr (__nothrow_invocable<_Fun, _As...>)
{
- stdexec::__set_value_invoke_((_Receiver &&) __rcvr, (_Fun &&) __fun,
- (_As &&) __as...);
+ stdexec::__set_value_invoke_((_Receiver&&)__rcvr, (_Fun&&)__fun,
+ (_As&&)__as...);
}
else
{
try
{
- stdexec::__set_value_invoke_((_Receiver &&) __rcvr, (_Fun &&) __fun,
- (_As &&) __as...);
+ stdexec::__set_value_invoke_((_Receiver&&)__rcvr, (_Fun&&)__fun,
+ (_As&&)__as...);
}
catch (...)
{
- set_error((_Receiver &&) __rcvr, std::current_exception());
+ set_error((_Receiver&&)__rcvr, std::current_exception());
}
}
}
@@ -3243,16 +3229,16 @@
__receiver_of_invoke_result<_Receiver, _Fun, _As...>
friend void tag_invoke(_Tag, __t&& __self, _As&&... __as) noexcept
{
- stdexec::__set_value_invoke((_Receiver &&) __self.__op_->__rcvr_,
- (_Fun &&) __self.__op_->__fun_,
- (_As &&) __as...);
+ stdexec::__set_value_invoke((_Receiver&&)__self.__op_->__rcvr_,
+ (_Fun&&)__self.__op_->__fun_,
+ (_As&&)__as...);
}
template <__one_of<set_error_t, set_stopped_t> _Tag, class... _As>
requires __callable<_Tag, _Receiver, _As...>
friend void tag_invoke(_Tag __tag, __t&& __self, _As&&... __as) noexcept
{
- __tag((_Receiver &&) __self.__op_->__rcvr_, (_As &&) __as...);
+ __tag((_Receiver&&)__self.__op_->__rcvr_, (_As&&)__as...);
}
friend auto tag_invoke(get_env_t, const __t& __self)
@@ -3280,8 +3266,8 @@
noexcept(__nothrow_decay_copyable<_Receiver> //
&& __nothrow_decay_copyable<_Fun> //
&& __nothrow_connectable<_Sender, __receiver_t>) :
- __data_{(_Receiver &&) __rcvr, (_Fun &&) __fun},
- __op_(connect((_Sender &&) __sndr, __receiver_t{&__data_}))
+ __data_{(_Receiver&&)__rcvr, (_Fun&&)__fun},
+ __op_(connect((_Sender&&)__sndr, __receiver_t{&__data_}))
{}
friend void tag_invoke(start_t, __t& __self) noexcept
@@ -3327,8 +3313,8 @@
__copy_cvref_t<_Self, _Fun>>)
-> __operation<_Self, _Receiver>
{
- return {((_Self &&) __self).__sndr_, (_Receiver &&) __rcvr,
- ((_Self &&) __self).__fun_};
+ return {((_Self&&)__self).__sndr_, (_Receiver&&)__rcvr,
+ ((_Self&&)__self).__fun_};
}
template <__decays_to<__t> _Self, class _Env>
@@ -3361,7 +3347,7 @@
sender<__sender<_Sender, _Fun>>
__sender<_Sender, _Fun> operator()(_Sender&& __sndr, _Fun __fun) const
{
- return __sender<_Sender, _Fun>{(_Sender &&) __sndr, (_Fun &&) __fun};
+ return __sender<_Sender, _Fun>{(_Sender&&)__sndr, (_Fun&&)__fun};
}
template <sender _Sender, __movable_value _Fun>
@@ -3373,8 +3359,8 @@
_Sender, _Fun>)
{
auto __sched = get_completion_scheduler<set_value_t>(get_env(__sndr));
- return tag_invoke(then_t{}, std::move(__sched), (_Sender &&) __sndr,
- (_Fun &&) __fun);
+ return tag_invoke(then_t{}, std::move(__sched), (_Sender&&)__sndr,
+ (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -3384,13 +3370,13 @@
sender auto operator()(_Sender&& __sndr, _Fun __fun) const
noexcept(nothrow_tag_invocable<then_t, _Sender, _Fun>)
{
- return tag_invoke(then_t{}, (_Sender &&) __sndr, (_Fun &&) __fun);
+ return tag_invoke(then_t{}, (_Sender&&)__sndr, (_Fun&&)__fun);
}
template <class _Fun>
__binder_back<then_t, _Fun> operator()(_Fun __fun) const
{
- return {{}, {}, {(_Fun &&) __fun}};
+ return {{}, {}, {(_Fun&&)__fun}};
}
};
} // namespace __then
@@ -3419,7 +3405,7 @@
friend void tag_invoke(set_value_t, _Self&& __self,
_Args&&... __args) noexcept
{
- set_value((_Receiver &&) __self.__rcvr_, (_Args &&) __args...);
+ set_value((_Receiver&&)__self.__rcvr_, (_Args&&)__args...);
}
// Customize set_error by invoking the invocable and passing the result
@@ -3430,15 +3416,15 @@
friend void tag_invoke(set_error_t, _Self&& __self,
_Error&& __error) noexcept
{
- stdexec::__set_value_invoke((_Receiver &&) __self.__rcvr_,
- (_Fun &&) __self.__fun_,
- (_Error &&) __error);
+ stdexec::__set_value_invoke((_Receiver&&)__self.__rcvr_,
+ (_Fun&&)__self.__fun_,
+ (_Error&&)__error);
}
friend void tag_invoke(set_stopped_t, __t&& __self) noexcept
requires __callable<set_stopped_t, _Receiver>
{
- set_stopped((_Receiver &&) __self.__rcvr_);
+ set_stopped((_Receiver&&)__self.__rcvr_);
}
friend env_of_t<_Receiver> tag_invoke(get_env_t,
@@ -3484,9 +3470,9 @@
__receiver<_Receiver>>
{
return stdexec::connect(
- ((_Self &&) __self).__sndr_,
- __receiver<_Receiver>{(_Receiver &&) __rcvr,
- ((_Self &&) __self).__fun_});
+ ((_Self&&)__self).__sndr_,
+ __receiver<_Receiver>{(_Receiver&&)__rcvr,
+ ((_Self&&)__self).__fun_});
}
template <__decays_to<__t> _Self, class _Env>
@@ -3521,8 +3507,8 @@
{
auto __sched = get_completion_scheduler<set_error_t>(
get_env(__sndr)); // TODO ADD TEST!
- return tag_invoke(upon_error_t{}, std::move(__sched),
- (_Sender &&) __sndr, (_Fun &&) __fun);
+ return tag_invoke(upon_error_t{}, std::move(__sched), (_Sender&&)__sndr,
+ (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -3532,7 +3518,7 @@
sender auto operator()(_Sender&& __sndr, _Fun __fun) const
noexcept(nothrow_tag_invocable<upon_error_t, _Sender, _Fun>)
{
- return tag_invoke(upon_error_t{}, (_Sender &&) __sndr, (_Fun &&) __fun);
+ return tag_invoke(upon_error_t{}, (_Sender&&)__sndr, (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -3542,13 +3528,13 @@
sender<__sender<_Sender, _Fun>>
__sender<_Sender, _Fun> operator()(_Sender&& __sndr, _Fun __fun) const
{
- return __sender<_Sender, _Fun>{(_Sender &&) __sndr, (_Fun &&) __fun};
+ return __sender<_Sender, _Fun>{(_Sender&&)__sndr, (_Fun&&)__fun};
}
template <class _Fun>
__binder_back<upon_error_t, _Fun> operator()(_Fun __fun) const
{
- return {{}, {}, {(_Fun &&) __fun}};
+ return {{}, {}, {(_Fun&&)__fun}};
}
};
} // namespace __upon_error
@@ -3576,7 +3562,7 @@
friend void tag_invoke(set_value_t, _Self&& __self,
_Args&&... __args) noexcept
{
- set_value((_Receiver &&) __self.__rcvr_, (_Args &&) __args...);
+ set_value((_Receiver&&)__self.__rcvr_, (_Args&&)__args...);
}
template <__decays_to<__t> _Self, class _Error>
@@ -3584,13 +3570,13 @@
friend void tag_invoke(set_error_t, _Self&& __self,
_Error&& __error) noexcept
{
- set_error((_Receiver &&) __self.__rcvr_, (_Error &&) __error);
+ set_error((_Receiver&&)__self.__rcvr_, (_Error&&)__error);
}
friend void tag_invoke(set_stopped_t, __t&& __self) noexcept
{
- stdexec::__set_value_invoke((_Receiver &&) __self.__rcvr_,
- (_Fun &&) __self.__fun_);
+ stdexec::__set_value_invoke((_Receiver&&)__self.__rcvr_,
+ (_Fun&&)__self.__fun_);
}
friend env_of_t<_Receiver> tag_invoke(get_env_t,
@@ -3631,17 +3617,16 @@
requires __receiver_of_invoke_result<_Receiver, _Fun> &&
sender_to<__copy_cvref_t<_Self, _Sender>,
__receiver<_Receiver>>
- friend auto tag_invoke(connect_t, _Self&& __self,
- _Receiver __rcvr) //
- noexcept(
- __nothrow_connectable<_Sender, __receiver<_Receiver>>)
- -> connect_result_t<__copy_cvref_t<_Self, _Sender>,
- __receiver<_Receiver>>
+ friend auto tag_invoke(connect_t, _Self&& __self,
+ _Receiver __rcvr) //
+ noexcept(__nothrow_connectable<_Sender, __receiver<_Receiver>>)
+ -> connect_result_t<__copy_cvref_t<_Self, _Sender>,
+ __receiver<_Receiver>>
{
return stdexec::connect(
- ((_Self &&) __self).__sndr_,
- __receiver<_Receiver>{(_Receiver &&) __rcvr,
- ((_Self &&) __self).__fun_});
+ ((_Self&&)__self).__sndr_,
+ __receiver<_Receiver>{(_Receiver&&)__rcvr,
+ ((_Self&&)__self).__fun_});
}
template <__decays_to<__t> _Self, class _Env>
@@ -3678,7 +3663,7 @@
auto __sched = get_completion_scheduler<set_stopped_t>(
get_env(__sndr)); // TODO ADD TEST!
return tag_invoke(upon_stopped_t{}, std::move(__sched),
- (_Sender &&) __sndr, (_Fun &&) __fun);
+ (_Sender&&)__sndr, (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -3688,8 +3673,7 @@
sender auto operator()(_Sender&& __sndr, _Fun __fun) const
noexcept(nothrow_tag_invocable<upon_stopped_t, _Sender, _Fun>)
{
- return tag_invoke(upon_stopped_t{}, (_Sender &&) __sndr,
- (_Fun &&) __fun);
+ return tag_invoke(upon_stopped_t{}, (_Sender&&)__sndr, (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -3699,13 +3683,13 @@
__callable<_Fun> && sender<__sender<_Sender, _Fun>>
__sender<_Sender, _Fun> operator()(_Sender&& __sndr, _Fun __fun) const
{
- return __sender<_Sender, _Fun>{(_Sender &&) __sndr, (_Fun &&) __fun};
+ return __sender<_Sender, _Fun>{(_Sender&&)__sndr, (_Fun&&)__fun};
}
template <__callable _Fun>
__binder_back<upon_stopped_t, _Fun> operator()(_Fun __fun) const
{
- return {{}, {}, {(_Fun &&) __fun}};
+ return {{}, {}, {(_Fun&&)__fun}};
}
};
} // namespace __upon_stopped
@@ -3737,7 +3721,7 @@
{
__f_(__i, __as...);
}
- stdexec::set_value(std::move(this->base()), (_As &&) __as...);
+ stdexec::set_value(std::move(this->base()), (_As&&)__as...);
}
template <class... _As>
@@ -3750,7 +3734,7 @@
{
__f_(__i, __as...);
}
- stdexec::set_value(std::move(this->base()), (_As &&) __as...);
+ stdexec::set_value(std::move(this->base()), (_As&&)__as...);
}
catch (...)
{
@@ -3763,8 +3747,8 @@
using __id = __receiver;
explicit __t(_Receiver __rcvr, _Shape __shape, _Fun __fun) :
- receiver_adaptor<__t, _Receiver>((_Receiver &&) __rcvr),
- __shape_(__shape), __f_((_Fun &&) __fun)
+ receiver_adaptor<__t, _Receiver>((_Receiver&&)__rcvr),
+ __shape_(__shape), __f_((_Fun&&)__fun)
{}
};
};
@@ -3816,9 +3800,9 @@
__receiver<_Receiver>>
{
return stdexec::connect(
- ((_Self &&) __self).__sndr_,
- __receiver<_Receiver>{(_Receiver &&) __rcvr, __self.__shape_,
- ((_Self &&) __self).__fun_});
+ ((_Self&&)__self).__sndr_,
+ __receiver<_Receiver>{(_Receiver&&)__rcvr, __self.__shape_,
+ ((_Self&&)__self).__fun_});
}
template <__decays_to<__t> _Self, class _Env>
@@ -3854,8 +3838,8 @@
_Sender, _Shape, _Fun>)
{
auto __sched = get_completion_scheduler<set_value_t>(get_env(__sndr));
- return tag_invoke(bulk_t{}, std::move(__sched), (_Sender &&) __sndr,
- (_Shape &&) __shape, (_Fun &&) __fun);
+ return tag_invoke(bulk_t{}, std::move(__sched), (_Sender&&)__sndr,
+ (_Shape&&)__shape, (_Fun&&)__fun);
}
template <sender _Sender, integral _Shape, __movable_value _Fun>
@@ -3865,8 +3849,8 @@
sender auto operator()(_Sender&& __sndr, _Shape __shape, _Fun __fun) const
noexcept(nothrow_tag_invocable<bulk_t, _Sender, _Shape, _Fun>)
{
- return tag_invoke(bulk_t{}, (_Sender &&) __sndr, (_Shape &&) __shape,
- (_Fun &&) __fun);
+ return tag_invoke(bulk_t{}, (_Sender&&)__sndr, (_Shape&&)__shape,
+ (_Fun&&)__fun);
}
template <sender _Sender, integral _Shape, __movable_value _Fun>
@@ -3876,15 +3860,15 @@
__sender<_Sender, _Shape, _Fun> operator()(_Sender&& __sndr, _Shape __shape,
_Fun __fun) const
{
- return __sender<_Sender, _Shape, _Fun>{(_Sender &&) __sndr, __shape,
- (_Fun &&) __fun};
+ return __sender<_Sender, _Shape, _Fun>{(_Sender&&)__sndr, __shape,
+ (_Fun&&)__fun};
}
template <integral _Shape, class _Fun>
__binder_back<bulk_t, _Shape, _Fun> operator()(_Shape __shape,
_Fun __fun) const
{
- return {{}, {}, {(_Shape &&) __shape, (_Fun &&) __fun}};
+ return {{}, {}, {(_Shape&&)__shape, (_Fun&&)__fun}};
}
};
} // namespace __bulk
@@ -3928,7 +3912,7 @@
{
using __tuple_t = __decayed_tuple<_Tag, _As...>;
__state.__data_.template emplace<__tuple_t>(__tag,
- (_As &&) __as...);
+ (_As&&)__as...);
}
catch (...)
{
@@ -3972,7 +3956,7 @@
using __id = __sh_state;
template <class... _Ts>
- using __bind_tuples = //
+ using __bind_tuples = //
__mbind_front_q<__variant,
std::tuple<set_stopped_t>, // Initial state of the
// variant is set_stopped
@@ -3999,10 +3983,10 @@
connect_result_t<_CvrefSender, __receiver_> __op_state2_;
explicit __t(_CvrefSender&& __sndr, _Env __env) :
- __env_(__make_env(
- (_Env &&) __env,
- __with_(get_stop_token, __stop_source_.get_token()))),
- __op_state2_(connect((_CvrefSender &&) __sndr, __receiver_{*this}))
+ __env_(
+ __make_env((_Env&&)__env, __with_(get_stop_token,
+ __stop_source_.get_token()))),
+ __op_state2_(connect((_CvrefSender&&)__sndr, __receiver_{*this}))
{}
void __notify() noexcept
@@ -4060,7 +4044,7 @@
__shared_state) //
noexcept(std::is_nothrow_move_constructible_v<_Receiver>) :
__operation_base{nullptr, __notify},
- __recvr_((_Receiver &&) __rcvr),
+ __recvr_((_Receiver&&)__rcvr),
__shared_state_(std::move(__shared_state))
{}
@@ -4076,7 +4060,7 @@
std::apply(
[&](auto __tag,
const auto&... __args) noexcept -> void {
- __tag((_Receiver &&) __op->__recvr_, __args...);
+ __tag((_Receiver&&)__op->__recvr_, __args...);
},
__tupl);
},
@@ -4146,7 +4130,7 @@
explicit __t(_CvrefSender&& __sndr, _Env __env) :
__shared_state_{std::make_shared<__sh_state_>(
- (_CvrefSender &&) __sndr, (_Env &&) __env)}
+ (_CvrefSender&&)__sndr, (_Env&&)__env)}
{}
private:
@@ -4179,7 +4163,7 @@
noexcept(std::is_nothrow_move_constructible_v<_Receiver>)
-> __operation<_Receiver>
{
- return __operation<_Receiver>{(_Receiver &&) __recvr,
+ return __operation<_Receiver>{(_Receiver&&)__recvr,
__self.__shared_state_};
}
@@ -4228,14 +4212,12 @@
requires(sender_in<_Sender, _Env> &&
__decay_copyable<env_of_t<_Sender>>) ||
__is_split_customized<_Sender, _Env>
- auto operator()(_Sender&& __sndr, _Env&& __env = _Env{}) const
- noexcept(__nothrow_callable<__dispatcher_for<_Sender, _Env>,
- _Sender, _Env>)
- -> __call_result_t<__dispatcher_for<_Sender, _Env>, _Sender,
- _Env>
+ auto operator()(_Sender&& __sndr, _Env&& __env = _Env{}) const noexcept(
+ __nothrow_callable<__dispatcher_for<_Sender, _Env>, _Sender, _Env>)
+ -> __call_result_t<__dispatcher_for<_Sender, _Env>, _Sender, _Env>
{
- return __dispatcher_for<_Sender, _Env>{}((_Sender &&) __sndr,
- (_Env &&) __env);
+ return __dispatcher_for<_Sender, _Env>{}((_Sender&&)__sndr,
+ (_Env&&)__env);
}
__binder_back<split_t> operator()() const
@@ -4290,7 +4272,7 @@
{
using __tuple_t = __decayed_tuple<_Tag, _As...>;
__state.__data_.template emplace<__tuple_t>(__tag,
- (_As &&) __as...);
+ (_As&&)__as...);
}
catch (...)
{
@@ -4328,7 +4310,7 @@
using __id = __sh_state;
template <class... _Ts>
- using __bind_tuples = //
+ using __bind_tuples = //
__mbind_front_q<__variant,
std::tuple<set_stopped_t>, // Initial state of the
// variant is set_stopped
@@ -4356,9 +4338,9 @@
connect_result_t<_Sender&, __receiver_t> __op_state2_;
explicit __t(_Sender& __sndr, _Env __env) :
- __env_(__make_env(
- (_Env &&) __env,
- __with_(get_stop_token, __stop_source_.get_token()))),
+ __env_(
+ __make_env((_Env&&)__env, __with_(get_stop_token,
+ __stop_source_.get_token()))),
__op_state2_(connect(__sndr, __receiver_t{*this}))
{
start(__op_state2_);
@@ -4414,13 +4396,13 @@
public:
using __id = __operation;
- __t( //
- _Receiver __rcvr, //
+ __t( //
+ _Receiver __rcvr, //
__intrusive_ptr<stdexec::__t<__sh_state<_SenderId, _EnvId>>>
__shared_state) //
noexcept(std::is_nothrow_move_constructible_v<_Receiver>) :
__operation_base{__notify},
- __rcvr_((_Receiver &&) __rcvr),
+ __rcvr_((_Receiver&&)__rcvr),
__shared_state_(std::move(__shared_state))
{}
@@ -4446,7 +4428,7 @@
[&](auto& __tupl) noexcept -> void {
std::apply(
[&](auto __tag, auto&... __args) noexcept -> void {
- __tag((_Receiver &&) __op->__rcvr_,
+ __tag((_Receiver&&)__op->__rcvr_,
std::move(__args)...);
},
__tupl);
@@ -4476,7 +4458,7 @@
{
// Stop has already been requested. Don't bother starting
// the child operations.
- stdexec::set_stopped((_Receiver &&) __self.__rcvr_);
+ stdexec::set_stopped((_Receiver&&)__self.__rcvr_);
}
else
{
@@ -4511,9 +4493,9 @@
using is_sender = void;
explicit __t(_Sender __sndr, _Env __env) :
- __sndr_((_Sender &&) __sndr), __shared_state_{
- __make_intrusive<__sh_state_>(
- __sndr_, (_Env &&) __env)}
+ __sndr_((_Sender&&)__sndr),
+ __shared_state_{
+ __make_intrusive<__sh_state_>(__sndr_, (_Env&&)__env)}
{}
~__t()
@@ -4560,7 +4542,7 @@
noexcept(std::is_nothrow_move_constructible_v<_Receiver>)
-> __operation<_Receiver>
{
- return __operation<_Receiver>{(_Receiver &&) __rcvr,
+ return __operation<_Receiver>{(_Receiver&&)__rcvr,
std::move(__self).__shared_state_};
}
@@ -4623,14 +4605,12 @@
requires(copy_constructible<__decay_t<_Sender>> &&
sender_to<_Sender&, __receiver_t<_Sender, _Env>>) ||
__is_ensure_started_customized<_Sender, _Env>
- auto operator()(_Sender&& __sndr, _Env&& __env = _Env{}) const
- noexcept(__nothrow_callable<__dispatcher_for<_Sender, _Env>,
- _Sender, _Env>)
- -> __call_result_t<__dispatcher_for<_Sender, _Env>, _Sender,
- _Env>
+ auto operator()(_Sender&& __sndr, _Env&& __env = _Env{}) const noexcept(
+ __nothrow_callable<__dispatcher_for<_Sender, _Env>, _Sender, _Env>)
+ -> __call_result_t<__dispatcher_for<_Sender, _Env>, _Sender, _Env>
{
- return __dispatcher_for<_Sender, _Env>{}((_Sender &&) __sndr,
- (_Env &&) __env);
+ return __dispatcher_for<_Sender, _Env>{}((_Sender&&)__sndr,
+ (_Env&&)__env);
}
template <__ensure_started_sender _Sender>
@@ -4732,16 +4712,15 @@
__minvoke<__op_state_for<_Receiver, _Fun>, _As...>;
auto& __args =
__self.__op_state_->__args_.template emplace<__tuple_t>(
- (_As &&) __as...);
- auto& __op =
- __self.__op_state_->__op_state3_
- .template emplace<__op_state_t>(__conv{[&] {
- return connect(
- std::apply(
- std::move(__self.__op_state_->__fun_),
- __args),
- std::move(__self.__op_state_->__rcvr_));
- }});
+ (_As&&)__as...);
+ auto& __op = __self.__op_state_->__op_state3_
+ .template emplace<__op_state_t>(__conv{
+ [&] {
+ return connect(
+ std::apply(std::move(__self.__op_state_->__fun_),
+ __args),
+ std::move(__self.__op_state_->__rcvr_));
+ }});
start(__op);
}
catch (...)
@@ -4757,7 +4736,7 @@
__callable<_Tag, _Receiver, _As...>
friend void tag_invoke(_Tag __tag, __t&& __self, _As&&... __as) noexcept
{
- __tag(std::move(__self.__op_state_->__rcvr_), (_As &&) __as...);
+ __tag(std::move(__self.__op_state_->__rcvr_), (_As&&)__as...);
}
friend auto tag_invoke(get_env_t, const __t& __self)
@@ -4803,8 +4782,8 @@
template <class _Receiver2>
__t(_Sender&& __sndr, _Receiver2&& __rcvr, _Fun __fun) :
- __op_base_t{{}, (_Receiver2 &&) __rcvr, (_Fun &&) __fun},
- __op_state2_(connect((_Sender &&) __sndr, __receiver_t{this}))
+ __op_base_t{{}, (_Receiver2&&)__rcvr, (_Fun&&)__fun},
+ __op_state2_(connect((_Sender&&)__sndr, __receiver_t{this}))
{}
connect_result_t<_Sender, __receiver_t> __op_state2_;
@@ -4843,9 +4822,9 @@
friend auto tag_invoke(connect_t, _Self&& __self, _Receiver __rcvr)
-> __operation_t<_Self, _Receiver>
{
- return __operation_t<_Self, _Receiver>{((_Self &&) __self).__sndr_,
- (_Receiver &&) __rcvr,
- ((_Self &&) __self).__fun_};
+ return __operation_t<_Self, _Receiver>{((_Self&&)__self).__sndr_,
+ (_Receiver&&)__rcvr,
+ ((_Self&&)__self).__fun_};
}
friend auto tag_invoke(get_env_t, const __t& __self) //
@@ -4885,8 +4864,8 @@
_Sender, _Fun>)
{
auto __sched = get_completion_scheduler<set_value_t>(get_env(__sndr));
- return tag_invoke(_LetTag{}, std::move(__sched), (_Sender &&) __sndr,
- (_Fun &&) __fun);
+ return tag_invoke(_LetTag{}, std::move(__sched), (_Sender&&)__sndr,
+ (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -4896,7 +4875,7 @@
sender auto operator()(_Sender&& __sndr, _Fun __fun) const
noexcept(nothrow_tag_invocable<_LetTag, _Sender, _Fun>)
{
- return tag_invoke(_LetTag{}, (_Sender &&) __sndr, (_Fun &&) __fun);
+ return tag_invoke(_LetTag{}, (_Sender&&)__sndr, (_Fun&&)__fun);
}
template <sender _Sender, __movable_value _Fun>
@@ -4906,13 +4885,13 @@
sender<__sender<_Sender, _Fun>>
__sender<_Sender, _Fun> operator()(_Sender&& __sndr, _Fun __fun) const
{
- return __sender<_Sender, _Fun>{(_Sender &&) __sndr, (_Fun &&) __fun};
+ return __sender<_Sender, _Fun>{(_Sender&&)__sndr, (_Fun&&)__fun};
}
template <class _Fun>
__binder_back<_LetTag, _Fun> operator()(_Fun __fun) const
{
- return {{}, {}, {(_Fun &&) __fun}};
+ return {{}, {}, {(_Fun&&)__fun}};
}
};
@@ -4953,7 +4932,7 @@
_Receiver&& base() && noexcept
{
- return (_Receiver &&) __op_->__rcvr_;
+ return (_Receiver&&)__op_->__rcvr_;
}
const _Receiver& base() const& noexcept
@@ -4969,12 +4948,12 @@
using _Value =
__single_sender_value_t<_Sender, env_of_t<_Receiver>>;
static_assert(constructible_from<_Value, _Ty>);
- stdexec::set_value(((__t &&) * this).base(),
- std::optional<_Value>{(_Ty &&) __a});
+ stdexec::set_value(((__t&&)*this).base(),
+ std::optional<_Value>{(_Ty&&)__a});
}
catch (...)
{
- stdexec::set_error(((__t &&) * this).base(),
+ stdexec::set_error(((__t&&)*this).base(),
std::current_exception());
}
}
@@ -4983,7 +4962,7 @@
{
using _Value =
__single_sender_value_t<_Sender, env_of_t<_Receiver>>;
- stdexec::set_value(((__t &&) * this).base(),
+ stdexec::set_value(((__t&&)*this).base(),
std::optional<_Value>{std::nullopt});
}
@@ -5003,8 +4982,8 @@
using __id = __operation;
__t(_Sender&& __sndr, _Receiver&& __rcvr) :
- __rcvr_((_Receiver &&) __rcvr),
- __op_state_(connect((_Sender &&) __sndr, __receiver_t{{}, this}))
+ __rcvr_((_Receiver&&)__rcvr),
+ __op_state_(connect((_Sender&&)__sndr, __receiver_t{{}, this}))
{}
STDEXEC_IMMOVABLE(__t);
@@ -5043,11 +5022,10 @@
env_of_t<_Receiver>> &&
sender_to<__copy_cvref_t<_Self, _Sender>,
__receiver_t<_Self, _Receiver>>
- friend auto tag_invoke(connect_t, _Self&& __self,
- _Receiver __rcvr)
- -> __operation_t<_Self, _Receiver>
+ friend auto tag_invoke(connect_t, _Self&& __self, _Receiver __rcvr)
+ -> __operation_t<_Self, _Receiver>
{
- return {((_Self &&) __self).__sndr_, (_Receiver &&) __rcvr};
+ return {((_Self&&)__self).__sndr_, (_Receiver&&)__rcvr};
}
friend auto tag_invoke(get_env_t, const __t& __self) //
@@ -5082,7 +5060,7 @@
auto operator()(_Sender&& __sndr) const
-> __t<__sender<stdexec::__id<__decay_t<_Sender>>>>
{
- return {(_Sender &&) __sndr};
+ return {(_Sender&&)__sndr};
}
__binder_back<stopped_as_optional_t> operator()() const noexcept
@@ -5096,19 +5074,19 @@
template <sender _Sender, __movable_value _Error>
auto operator()(_Sender&& __sndr, _Error __err) const
{
- return (_Sender &&) __sndr |
+ return (_Sender&&)__sndr |
let_stopped(
- [__err2 = (_Error &&) __err]() mutable //
+ [__err2 = (_Error&&)__err]() mutable //
noexcept(std::is_nothrow_move_constructible_v<_Error>) {
- return just_error((_Error &&) __err2);
- });
+ return just_error((_Error&&)__err2);
+ });
}
template <__movable_value _Error>
auto operator()(_Error __err) const
-> __binder_back<stopped_as_error_t, _Error>
{
- return {{}, {}, {(_Error &&) __err}};
+ return {{}, {}, {(_Error&&)__err}};
}
};
} // namespace __stopped_as_xxx
@@ -5159,16 +5137,16 @@
{
if (get_stop_token(get_env(__rcvr)).stop_requested())
{
- set_stopped((_Receiver &&) __rcvr);
+ set_stopped((_Receiver&&)__rcvr);
}
else
{
- set_value((_Receiver &&) __rcvr);
+ set_value((_Receiver&&)__rcvr);
}
}
catch (...)
{
- set_error((_Receiver &&) __rcvr, std::current_exception());
+ set_error((_Receiver&&)__rcvr, std::current_exception());
}
}
@@ -5176,7 +5154,7 @@
__t(__task* __next, run_loop* __loop, _Receiver __rcvr) :
__task{{}, __next, {&__execute_impl}}, __loop_{__loop},
- __rcvr_{(_Receiver &&) __rcvr}
+ __rcvr_{(_Receiver&&)__rcvr}
{}
friend void tag_invoke(start_t, __t& __self) noexcept
@@ -5226,13 +5204,13 @@
tag_invoke(connect_t, const __schedule_task& __self,
_Receiver __rcvr)
{
- return __self.__connect_((_Receiver &&) __rcvr);
+ return __self.__connect_((_Receiver&&)__rcvr);
}
template <class _Receiver>
__operation<_Receiver> __connect_(_Receiver&& __rcvr) const
{
- return {&__loop_->__head_, __loop_, (_Receiver &&) __rcvr};
+ return {&__loop_->__head_, __loop_, (_Receiver&&)__rcvr};
}
struct __env
@@ -5320,7 +5298,7 @@
}
catch (...)
{
- set_error((_Receiver &&) __rcvr_, std::current_exception());
+ set_error((_Receiver&&)__rcvr_, std::current_exception());
}
}
@@ -5434,8 +5412,7 @@
requires __callable<_Tag, _Receiver, _As...>
friend void tag_invoke(_Tag, __t&& __self, _As&&... __as) noexcept
{
- _Tag{}((_Receiver &&) __self.__op_state_->__rcvr_,
- (_As &&) __as...);
+ _Tag{}((_Receiver&&)__self.__op_state_->__rcvr_, (_As&&)__as...);
}
friend auto tag_invoke(get_env_t, const __t& __self)
@@ -5479,7 +5456,7 @@
// execution context.
__self.__op_state_->__data_
.template emplace<__decayed_tuple<_Tag, _Args...>>(
- _Tag{}, (_Args &&) __args...);
+ _Tag{}, (_Args&&)__args...);
// Enqueue the schedule operation so the completion happens
// on the scheduler's execution context.
start(__self.__op_state_->__state2_);
@@ -5491,9 +5468,9 @@
friend void tag_invoke(_Tag __tag, __t&& __self,
_Args&&... __args) noexcept
{
- __try_call((_Receiver &&) __self.__op_state_->__rcvr_,
- __fun_c<__complete_<_Tag, _Args...>>, (_Tag &&) __tag,
- (__t &&) __self, (_Args &&) __args...);
+ __try_call((_Receiver&&)__self.__op_state_->__rcvr_,
+ __fun_c<__complete_<_Tag, _Args...>>, (_Tag&&)__tag,
+ (__t&&)__self, (_Args&&)__args...);
}
friend auto tag_invoke(get_env_t, const __t& __self)
@@ -5527,8 +5504,8 @@
__state2_;
__t(_Scheduler __sched, _CvrefSender&& __sndr, _Receiver&& __rcvr) :
- __sched_((_Scheduler &&) __sched), __rcvr_((_Receiver &&) __rcvr),
- __state1_(connect((_CvrefSender &&) __sndr, __receiver1_t{this})),
+ __sched_((_Scheduler&&)__sched), __rcvr_((_Receiver&&)__rcvr),
+ __state1_(connect((_CvrefSender&&)__sndr, __receiver1_t{this})),
__state2_(connect(schedule(__sched_), __receiver2_t{this}))
{}
@@ -5554,8 +5531,7 @@
std::apply(
[&]<class... _Args>(auto __tag,
_Args&... __args) -> void {
- __tag((_Receiver &&) __rcvr_,
- (_Args &&) __args...);
+ __tag((_Receiver&&)__rcvr_, (_Args&&)__args...);
},
__tupl);
}
@@ -5611,8 +5587,8 @@
__operation1<_SchedulerId, stdexec::__cvref_id<_Self, _Sender>,
stdexec::__id<_Receiver>>>
{
- return {__self.__env_.__sched_, ((_Self &&) __self).__sndr_,
- (_Receiver &&) __rcvr};
+ return {__self.__env_.__sched_, ((_Self&&)__self).__sndr_,
+ (_Receiver&&)__rcvr};
}
friend const _Attrs& tag_invoke(get_env_t, const __t& __self) noexcept
@@ -5663,7 +5639,7 @@
noexcept(nothrow_tag_invocable<schedule_from_t, _Scheduler, _Sender>)
-> tag_invoke_result_t<schedule_from_t, _Scheduler, _Sender>
{
- return tag_invoke(*this, (_Scheduler &&) __sched, (_Sender &&) __sndr);
+ return tag_invoke(*this, (_Scheduler&&)__sched, (_Sender&&)__sndr);
}
template <scheduler _Scheduler, sender _Sender>
@@ -5671,7 +5647,7 @@
-> stdexec::__t<__sender<stdexec::__id<__decay_t<_Scheduler>>,
stdexec::__id<__decay_t<_Sender>>>>
{
- return {{(_Scheduler &&) __sched}, (_Sender &&) __sndr};
+ return {{(_Scheduler&&)__sched}, (_Sender&&)__sndr};
}
};
} // namespace __schedule_from
@@ -5697,8 +5673,8 @@
_Sender, _Scheduler>)
{
auto csch = get_completion_scheduler<set_value_t>(get_env(__sndr));
- return tag_invoke(transfer_t{}, std::move(csch), (_Sender &&) __sndr,
- (_Scheduler &&) __sched);
+ return tag_invoke(transfer_t{}, std::move(csch), (_Sender&&)__sndr,
+ (_Scheduler&&)__sched);
}
template <sender _Sender, scheduler _Scheduler>
@@ -5709,8 +5685,8 @@
operator()(_Sender&& __sndr, _Scheduler&& __sched) const
noexcept(nothrow_tag_invocable<transfer_t, _Sender, _Scheduler>)
{
- return tag_invoke(transfer_t{}, (_Sender &&) __sndr,
- (_Scheduler &&) __sched);
+ return tag_invoke(transfer_t{}, (_Sender&&)__sndr,
+ (_Scheduler&&)__sched);
}
// NOT TO SPEC: permit non-typed senders:
@@ -5720,14 +5696,14 @@
(!tag_invocable<transfer_t, _Sender, _Scheduler>)
auto operator()(_Sender&& __sndr, _Scheduler&& __sched) const
{
- return schedule_from((_Scheduler &&) __sched, (_Sender &&) __sndr);
+ return schedule_from((_Scheduler&&)__sched, (_Sender&&)__sndr);
}
template <scheduler _Scheduler>
__binder_back<transfer_t, __decay_t<_Scheduler>>
operator()(_Scheduler&& __sched) const
{
- return {{}, {}, {(_Scheduler &&) __sched}};
+ return {{}, {}, {(_Scheduler&&)__sched}};
}
};
} // namespace __transfer
@@ -5757,7 +5733,7 @@
_Receiver&& base() && noexcept
{
- return (_Receiver &&) __op_state_->__rcvr_;
+ return (_Receiver&&)__op_state_->__rcvr_;
}
const _Receiver& base() const& noexcept
@@ -5793,7 +5769,7 @@
_Receiver&& base() && noexcept
{
- return (_Receiver &&) __op_state_->__rcvr_;
+ return (_Receiver&&)__op_state_->__rcvr_;
}
const _Receiver& base() const& noexcept
@@ -5810,13 +5786,13 @@
// This line will invalidate *this:
start(__op_state->__data_.template emplace<1>(
__conv{[__op_state] {
- return connect((_Sender &&) __op_state->__sndr_,
+ return connect((_Sender&&)__op_state->__sndr_,
__receiver_ref_t{{}, __op_state});
}}));
}
catch (...)
{
- set_error((_Receiver &&) __op_state->__rcvr_,
+ set_error((_Receiver&&)__op_state->__rcvr_,
std::current_exception());
}
}
@@ -5845,11 +5821,11 @@
template <class _Sender2, class _Receiver2>
__t(_Scheduler __sched, _Sender2&& __sndr, _Receiver2&& __rcvr) :
- __scheduler_((_Scheduler &&) __sched),
- __sndr_((_Sender2 &&) __sndr), __rcvr_((_Receiver2 &&) __rcvr),
- __data_{std::in_place_index<0>, __conv{[this] {
- return connect(schedule(__scheduler_),
- __receiver_t{{}, this});
+ __scheduler_((_Scheduler&&)__sched), __sndr_((_Sender2&&)__sndr),
+ __rcvr_((_Receiver2&&)__rcvr),
+ __data_{std::in_place_index<0>, __conv{
+ [this] {
+ return connect(schedule(__scheduler_), __receiver_t{{}, this});
}}}
{}
@@ -5896,12 +5872,11 @@
__receiver_t<stdexec::__id<_Receiver>>> &&
sender_to<_Sender,
__receiver_ref_t<stdexec::__id<_Receiver>>>
- friend auto tag_invoke(connect_t, _Self&& __self,
- _Receiver __rcvr)
- -> __operation_t<stdexec::__id<_Receiver>>
+ friend auto tag_invoke(connect_t, _Self&& __self, _Receiver __rcvr)
+ -> __operation_t<stdexec::__id<_Receiver>>
{
- return {((_Self &&) __self).__scheduler_,
- ((_Self &&) __self).__sndr_, (_Receiver &&) __rcvr};
+ return {((_Self&&)__self).__scheduler_, ((_Self&&)__self).__sndr_,
+ (_Receiver&&)__rcvr};
}
friend auto tag_invoke(get_env_t, const __t& __self) //
@@ -5934,7 +5909,7 @@
noexcept(nothrow_tag_invocable<on_t, _Scheduler, _Sender>)
-> tag_invoke_result_t<on_t, _Scheduler, _Sender>
{
- return tag_invoke(*this, (_Scheduler &&) __sched, (_Sender &&) __sndr);
+ return tag_invoke(*this, (_Scheduler&&)__sched, (_Sender&&)__sndr);
}
template <scheduler _Scheduler, sender _Sender>
@@ -5949,7 +5924,7 @@
!__has_customizations{},
"For now the default stdexec::on implementation doesn't support scheduling "
"onto schedulers that customize algorithms.");
- return {(_Scheduler &&) __sched, (_Sender &&) __sndr};
+ return {(_Scheduler&&)__sched, (_Sender&&)__sndr};
}
};
} // namespace __on
@@ -5967,15 +5942,11 @@
requires tag_invocable<transfer_just_t, _Scheduler, _Values...> &&
sender<tag_invoke_result_t<transfer_just_t, _Scheduler,
_Values...>>
- auto operator()(_Scheduler&& __sched,
- _Values&&... __vals) const
- noexcept(nothrow_tag_invocable<transfer_just_t, _Scheduler,
- _Values...>)
- -> tag_invoke_result_t<transfer_just_t, _Scheduler,
- _Values...>
+ auto operator()(_Scheduler&& __sched, _Values&&... __vals) const
+ noexcept(nothrow_tag_invocable<transfer_just_t, _Scheduler, _Values...>)
+ -> tag_invoke_result_t<transfer_just_t, _Scheduler, _Values...>
{
- return tag_invoke(*this, (_Scheduler &&) __sched,
- (_Values &&) __vals...);
+ return tag_invoke(*this, (_Scheduler&&)__sched, (_Values&&)__vals...);
}
template <scheduler _Scheduler, __movable_value... _Values>
@@ -5983,10 +5954,9 @@
!sender<tag_invoke_result_t<transfer_just_t, _Scheduler,
_Values...>>)
auto operator()(_Scheduler&& __sched, _Values&&... __vals) const
- -> decltype(transfer(just((_Values &&) __vals...),
- (_Scheduler &&) __sched))
+ -> decltype(transfer(just((_Values&&)__vals...), (_Scheduler&&)__sched))
{
- return transfer(just((_Values &&) __vals...), (_Scheduler &&) __sched);
+ return transfer(just((_Values&&)__vals...), (_Scheduler&&)__sched);
}
};
} // namespace __transfer_just
@@ -6022,12 +5992,12 @@
{
try
{
- set_value((_Receiver &&) __self.__rcvr_,
- _Variant{std::tuple<_As&&...>{(_As &&) __as...}});
+ set_value((_Receiver&&)__self.__rcvr_,
+ _Variant{std::tuple<_As&&...>{(_As&&)__as...}});
}
catch (...)
{
- set_error((_Receiver &&) __self.__rcvr_,
+ set_error((_Receiver&&)__self.__rcvr_,
std::current_exception());
}
}
@@ -6036,12 +6006,12 @@
friend void tag_invoke(set_error_t, __t&& __self,
_Error&& __err) noexcept
{
- set_error((_Receiver &&) __self.__rcvr_, (_Error &&) __err);
+ set_error((_Receiver&&)__self.__rcvr_, (_Error&&)__err);
}
friend void tag_invoke(set_stopped_t, __t&& __self) noexcept
{
- set_stopped((_Receiver &&) __self.__rcvr_);
+ set_stopped((_Receiver&&)__self.__rcvr_);
}
friend env_of_t<_Receiver> tag_invoke(get_env_t, const __t& __self)
@@ -6070,7 +6040,7 @@
using is_sender = void;
template <__decays_to<_Sender> _CvrefSender>
- explicit __t(_CvrefSender&& __sndr) : __sndr_((_CvrefSender &&) __sndr)
+ explicit __t(_CvrefSender&& __sndr) : __sndr_((_CvrefSender&&)__sndr)
{}
private:
@@ -6094,8 +6064,8 @@
-> connect_result_t<_Sender, __receiver_t<_Receiver>>
{
return stdexec::connect(
- (_Sender &&) __self.__sndr_,
- __receiver_t<_Receiver>{(_Receiver &&) __rcvr});
+ (_Sender&&)__self.__sndr_,
+ __receiver_t<_Receiver>{(_Receiver&&)__rcvr});
}
friend auto tag_invoke(get_env_t, const __t& __self) //
@@ -6117,8 +6087,8 @@
auto operator()(_Sender&& __sndr) const
-> __t<__sender<stdexec::__id<__decay_t<_Sender>>>>
{
- return __t<__sender<stdexec::__id<__decay_t<_Sender>>>>{(_Sender &&)
- __sndr};
+ return __t<__sender<stdexec::__id<__decay_t<_Sender>>>>{
+ (_Sender&&)__sndr};
}
auto operator()() const noexcept
@@ -6183,7 +6153,7 @@
const __make_dependent_on<_Env, _Self>&,
_As...>
{
- return ((_Tag &&) __tag)(__self.__base_env_, (_As &&) __as...);
+ return ((_Tag&&)__tag)(__self.__base_env_, (_As&&)__as...);
}
};
};
@@ -6262,13 +6232,13 @@
{
if constexpr (!same_as<_Ty, __not_an_error>)
{
- _Tag{}((_Receiver &&) __rcvr_, (_Ty &&) __t, (_Ts &&) __ts...);
+ _Tag{}((_Receiver&&)__rcvr_, (_Ty&&)__t, (_Ts&&)__ts...);
}
}
void operator()() const noexcept
{
- _Tag{}((_Receiver &&) __rcvr_);
+ _Tag{}((_Receiver&&)__rcvr_);
}
};
@@ -6319,7 +6289,7 @@
}
break;
case __stopped:
- stdexec::set_stopped((_Receiver &&) __recvr_);
+ stdexec::set_stopped((_Receiver&&)__recvr_);
break;
default:;
}
@@ -6364,15 +6334,15 @@
if constexpr (__nothrow_decay_copyable<_Error>)
{
__op_state_->__errors_.template emplace<__decay_t<_Error>>(
- (_Error &&) __err);
+ (_Error&&)__err);
}
else
{
try
{
__op_state_->__errors_
- .template emplace<__decay_t<_Error>>((_Error &&)
- __err);
+ .template emplace<__decay_t<_Error>>(
+ (_Error&&)__err);
}
catch (...)
{
@@ -6402,14 +6372,14 @@
if constexpr ((__nothrow_decay_copyable<_Values> && ...))
{
std::get<_Index>(__self.__op_state_->__values_)
- .emplace((_Values &&) __vals...);
+ .emplace((_Values&&)__vals...);
}
else
{
try
{
std::get<_Index>(__self.__op_state_->__values_)
- .emplace((_Values &&) __vals...);
+ .emplace((_Values&&)__vals...);
}
catch (...)
{
@@ -6424,12 +6394,12 @@
template <class _Error>
requires requires(_ErrorsVariant& __errors, _Error&& __err) {
__errors.template emplace<__decay_t<_Error>>(
- (_Error &&) __err);
+ (_Error&&)__err);
}
friend void tag_invoke(set_error_t, __t&& __self,
_Error&& __err) noexcept
{
- __self.__set_error((_Error &&) __err);
+ __self.__set_error((_Error&&)__err);
__self.__op_state_->__arrive();
}
@@ -6553,17 +6523,16 @@
template <class _SendersTuple, std::size_t... _Is>
__t(_SendersTuple&& __sndrs, _Receiver __rcvr,
std::index_sequence<_Is...>) :
- __operation_base_t{{}, (_Receiver &&) __rcvr, {sizeof...(_Is)}},
+ __operation_base_t{{}, (_Receiver&&)__rcvr, {sizeof...(_Is)}},
__op_states_{__conv{[&__sndrs, this]() {
- return stdexec::connect(
- std::get<_Is>((_SendersTuple &&) __sndrs),
- __receiver_t<_Is>{this});
+ return stdexec::connect(std::get<_Is>((_SendersTuple&&)__sndrs),
+ __receiver_t<_Is>{this});
}}...}
{}
template <class _SendersTuple>
__t(_SendersTuple&& __sndrs, _Receiver __rcvr) :
- __t((_SendersTuple &&) __sndrs, (_Receiver &&) __rcvr, _Indices{})
+ __t((_SendersTuple&&)__sndrs, (_Receiver&&)__rcvr, _Indices{})
{}
friend void tag_invoke(start_t, __t& __self) noexcept
@@ -6576,7 +6545,7 @@
{
// Stop has already been requested. Don't bother starting
// the child operations.
- stdexec::set_stopped((_Receiver &&) __self.__recvr_);
+ stdexec::set_stopped((_Receiver&&)__self.__recvr_);
}
else
{
@@ -6627,7 +6596,7 @@
template <class... _Sndrs>
explicit(sizeof...(_Sndrs) == 1) __t(_Sndrs&&... __sndrs) :
- __sndrs_((_Sndrs &&) __sndrs...)
+ __sndrs_((_Sndrs&&)__sndrs...)
{}
private:
@@ -6638,7 +6607,7 @@
friend auto tag_invoke(connect_t, _Self&& __self, _Receiver __rcvr)
-> __operation_t<_Self, _Receiver>
{
- return {((_Self &&) __self).__sndrs_, (_Receiver &&) __rcvr};
+ return {((_Self&&)__self).__sndrs_, (_Receiver&&)__rcvr};
}
template <__decays_to<__t> _Self, class _Env>
@@ -6670,11 +6639,11 @@
template <sender... _Senders>
requires tag_invocable<when_all_t, _Senders...> &&
sender<tag_invoke_result_t<when_all_t, _Senders...>>
- auto operator()(_Senders&&... __sndrs) const
- noexcept(nothrow_tag_invocable<when_all_t, _Senders...>)
- -> tag_invoke_result_t<when_all_t, _Senders...>
+ auto operator()(_Senders&&... __sndrs) const
+ noexcept(nothrow_tag_invocable<when_all_t, _Senders...>)
+ -> tag_invoke_result_t<when_all_t, _Senders...>
{
- return tag_invoke(*this, (_Senders &&) __sndrs...);
+ return tag_invoke(*this, (_Senders&&)__sndrs...);
}
template <sender... _Senders>
@@ -6682,7 +6651,7 @@
sender<__sender_t<_Senders...>>
__sender_t<_Senders...> operator()(_Senders&&... __sndrs) const
{
- return __sender_t<_Senders...>{(_Senders &&) __sndrs...};
+ return __sender_t<_Senders...>{(_Senders&&)__sndrs...};
}
};
@@ -6692,13 +6661,11 @@
requires tag_invocable<when_all_with_variant_t, _Senders...> &&
sender<
tag_invoke_result_t<when_all_with_variant_t, _Senders...>>
- auto operator()(_Senders&&... __sndrs) const
- noexcept(nothrow_tag_invocable<when_all_with_variant_t,
- _Senders...>)
- -> tag_invoke_result_t<when_all_with_variant_t,
- _Senders...>
+ auto operator()(_Senders&&... __sndrs) const
+ noexcept(nothrow_tag_invocable<when_all_with_variant_t, _Senders...>)
+ -> tag_invoke_result_t<when_all_with_variant_t, _Senders...>
{
- return tag_invoke(*this, (_Senders &&) __sndrs...);
+ return tag_invoke(*this, (_Senders&&)__sndrs...);
}
template <sender... _Senders>
@@ -6706,7 +6673,7 @@
(__callable<into_variant_t, _Senders> && ...)
auto operator()(_Senders&&... __sndrs) const
{
- return when_all_t{}(into_variant((_Senders &&) __sndrs)...);
+ return when_all_t{}(into_variant((_Senders&&)__sndrs)...);
}
};
@@ -6716,13 +6683,11 @@
requires tag_invocable<transfer_when_all_t, _Sched, _Senders...> &&
sender<tag_invoke_result_t<transfer_when_all_t, _Sched,
_Senders...>>
- auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const
- noexcept(nothrow_tag_invocable<transfer_when_all_t, _Sched,
- _Senders...>)
- -> tag_invoke_result_t<transfer_when_all_t, _Sched,
- _Senders...>
+ auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const noexcept(
+ nothrow_tag_invocable<transfer_when_all_t, _Sched, _Senders...>)
+ -> tag_invoke_result_t<transfer_when_all_t, _Sched, _Senders...>
{
- return tag_invoke(*this, (_Sched &&) __sched, (_Senders &&) __sndrs...);
+ return tag_invoke(*this, (_Sched&&)__sched, (_Senders&&)__sndrs...);
}
template <scheduler _Sched, sender... _Senders>
@@ -6731,8 +6696,8 @@
_Senders...>>))
auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const
{
- return transfer(when_all_t{}((_Senders &&) __sndrs...),
- (_Sched &&) __sched);
+ return transfer(when_all_t{}((_Senders&&)__sndrs...),
+ (_Sched&&)__sched);
}
};
@@ -6743,14 +6708,13 @@
_Senders...> &&
sender<tag_invoke_result_t<transfer_when_all_with_variant_t,
_Sched, _Senders...>>
- auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const
- noexcept(
- nothrow_tag_invocable<transfer_when_all_with_variant_t,
- _Sched, _Senders...>)
- -> tag_invoke_result_t<transfer_when_all_with_variant_t,
- _Sched, _Senders...>
+ auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const
+ noexcept(nothrow_tag_invocable<transfer_when_all_with_variant_t, _Sched,
+ _Senders...>)
+ -> tag_invoke_result_t<transfer_when_all_with_variant_t, _Sched,
+ _Senders...>
{
- return tag_invoke(*this, (_Sched &&) __sched, (_Senders &&) __sndrs...);
+ return tag_invoke(*this, (_Sched&&)__sched, (_Senders&&)__sndrs...);
}
template <scheduler _Sched, sender... _Senders>
@@ -6759,8 +6723,8 @@
(__callable<into_variant_t, _Senders> && ...)
auto operator()(_Sched&& __sched, _Senders&&... __sndrs) const
{
- return transfer_when_all_t{}((_Sched &&) __sched,
- into_variant((_Senders &&) __sndrs)...);
+ return transfer_when_all_t{}((_Sched&&)__sched,
+ into_variant((_Senders&&)__sndrs)...);
}
};
} // namespace __when_all
@@ -6821,7 +6785,7 @@
noexcept(std::is_nothrow_move_constructible_v<_Receiver>)
-> stdexec::__t<__operation<_Tag, stdexec::__id<_Receiver>>>
{
- return {{}, (_Receiver &&) __rcvr};
+ return {{}, (_Receiver&&)__rcvr};
}
template <class _Env>
@@ -6935,13 +6899,13 @@
void __set_error(_Error __err) noexcept
{
if constexpr (__decays_to<_Error, std::exception_ptr>)
- __state_->__data_.template emplace<2>((_Error &&) __err);
+ __state_->__data_.template emplace<2>((_Error&&)__err);
else if constexpr (__decays_to<_Error, std::error_code>)
__state_->__data_.template emplace<2>(
std::make_exception_ptr(std::system_error(__err)));
else
__state_->__data_.template emplace<2>(
- std::make_exception_ptr((_Error &&) __err));
+ std::make_exception_ptr((_Error&&)__err));
__loop_->finish();
}
@@ -6952,7 +6916,7 @@
{
try
{
- __rcvr.__state_->__data_.template emplace<1>((_As &&) __as...);
+ __rcvr.__state_->__data_.template emplace<1>((_As&&)__as...);
__rcvr.__loop_->finish();
}
catch (...)
@@ -6965,7 +6929,7 @@
friend void tag_invoke(stdexec::set_error_t, __t&& __rcvr,
_Error __err) noexcept
{
- __rcvr.__set_error((_Error &&) __err);
+ __rcvr.__set_error((_Error&&)__err);
}
friend void tag_invoke(stdexec::set_stopped_t __d,
@@ -7005,8 +6969,7 @@
_Sender>)
{
auto __sched = get_completion_scheduler<set_value_t>(get_env(__sndr));
- return tag_invoke(sync_wait_t{}, std::move(__sched),
- (_Sender &&) __sndr);
+ return tag_invoke(sync_wait_t{}, std::move(__sched), (_Sender&&)__sndr);
}
// TODO: constrain on return type
@@ -7017,7 +6980,7 @@
tag_invoke_result_t<sync_wait_t, _Sender> operator()(_Sender&& __sndr) const
noexcept(nothrow_tag_invocable<sync_wait_t, _Sender>)
{
- return tag_invoke(sync_wait_t{}, (_Sender &&) __sndr);
+ return tag_invoke(sync_wait_t{}, (_Sender&&)__sndr);
}
template <__single_value_variant_sender<__env> _Sender>
@@ -7026,8 +6989,8 @@
(!tag_invocable<sync_wait_t, _Sender>) &&
sender_in<_Sender, __env> &&
sender_to<_Sender, __receiver_t<_Sender>>
- auto operator()(_Sender&& __sndr) const
- -> std::optional<__sync_wait_result_t<_Sender>>
+ auto operator()(_Sender&& __sndr) const
+ -> std::optional<__sync_wait_result_t<_Sender>>
{
using state_t = __sync_wait_result_impl<_Sender, __q<__state>>;
state_t __state{};
@@ -7035,7 +6998,7 @@
// Launch the sender with a continuation that will fill in a variant
// and notify a condition variable.
- auto __op_state = connect((_Sender &&) __sndr,
+ auto __op_state = connect((_Sender&&)__sndr,
__receiver_t<_Sender>{&__state, &__loop});
start(__op_state);
@@ -7078,7 +7041,7 @@
auto __sched = get_completion_scheduler<set_value_t>(get_env(__sndr));
return tag_invoke(sync_wait_with_variant_t{}, std::move(__sched),
- (_Sender &&) __sndr);
+ (_Sender&&)__sndr);
}
template <sender_in<__env> _Sender>
@@ -7096,7 +7059,7 @@
"The type of tag_invoke(sync_wait_with_variant, S) "
"must be sync-wait-with-variant-type<S, sync-wait-env>");
- return tag_invoke(sync_wait_with_variant_t{}, (_Sender &&) __sndr);
+ return tag_invoke(sync_wait_with_variant_t{}, (_Sender&&)__sndr);
}
template <sender_in<__env> _Sender>
@@ -7107,7 +7070,7 @@
std::optional<__sync_wait_with_variant_result_t<_Sender>>
operator()(_Sender&& __sndr) const
{
- return sync_wait_t{}(into_variant((_Sender &&) __sndr));
+ return sync_wait_t{}(into_variant((_Sender&&)__sndr));
}
};
} // namespace __sync_wait
diff --git a/include/sdbusplus/async/stdexec/functional.hpp b/include/sdbusplus/async/stdexec/functional.hpp
index 0a6a603..dad3c16 100644
--- a/include/sdbusplus/async/stdexec/functional.hpp
+++ b/include/sdbusplus/async/stdexec/functional.hpp
@@ -32,7 +32,7 @@
template <class _Fun, class... _As>
concept invocable = //
requires(_Fun&& __f, _As&&... __as) {
- std::invoke((_Fun &&) __f, (_As &&) __as...);
+ std::invoke((_Fun&&)__f, (_As&&)__as...);
};
#endif
} // namespace stdexec::__std_concepts
@@ -49,7 +49,7 @@
invocable<_Fun, _As...> && //
requires(_Fun&& __f, _As&&... __as) {
{
- std::invoke((_Fun &&) __f, (_As &&) __as...)
+ std::invoke((_Fun&&)__f, (_As&&)__as...)
} noexcept;
};
@@ -61,10 +61,10 @@
template <class... _Args>
requires __callable<_FunT, _Args...>
auto operator()(_Args&&... __args) const
- noexcept(noexcept(_Fun((_Args &&) __args...)))
+ noexcept(noexcept(_Fun((_Args&&)__args...)))
-> __call_result_t<_FunT, _Args...>
{
- return _Fun((_Args &&) __args...);
+ return _Fun((_Args&&)__args...);
}
};
@@ -82,14 +82,14 @@
template <class _Tag, class... _Args>
concept tag_invocable = //
requires(_Tag __tag, _Args&&... __args) {
- tag_invoke((_Tag &&) __tag, (_Args &&) __args...);
+ tag_invoke((_Tag&&)__tag, (_Args&&)__args...);
};
template <class _Ret, class _Tag, class... _Args>
concept __tag_invocable_r = //
requires(_Tag __tag, _Args&&... __args) {
{
- static_cast<_Ret>(tag_invoke((_Tag &&) __tag, (_Args &&) __args...))
+ static_cast<_Ret>(tag_invoke((_Tag&&)__tag, (_Args&&)__args...))
};
};
@@ -99,7 +99,7 @@
tag_invocable<_Tag, _Args...> && //
requires(_Tag __tag, _Args&&... __args) {
{
- tag_invoke((_Tag &&) __tag, (_Args &&) __args...)
+ tag_invoke((_Tag&&)__tag, (_Args&&)__args...)
} noexcept;
};
@@ -128,7 +128,7 @@
noexcept(nothrow_tag_invocable<_Tag, _Args...>)
-> tag_invoke_result_t<_Tag, _Args...>
{
- return tag_invoke((_Tag &&) __tag, (_Args &&) __args...);
+ return tag_invoke((_Tag&&)__tag, (_Args&&)__args...);
}
};
} // namespace __tag_invoke
diff --git a/include/sdbusplus/async/stdexec/inline_scheduler.hpp b/include/sdbusplus/async/stdexec/inline_scheduler.hpp
index ec7ca3c..00049b2 100644
--- a/include/sdbusplus/async/stdexec/inline_scheduler.hpp
+++ b/include/sdbusplus/async/stdexec/inline_scheduler.hpp
@@ -34,7 +34,7 @@
friend void tag_invoke(stdexec::start_t, __op& op) noexcept
{
- stdexec::set_value((R &&) op.rec_);
+ stdexec::set_value((R&&)op.rec_);
}
};
@@ -50,7 +50,7 @@
stdexec::__nothrow_constructible_from<stdexec::__decay_t<R>, R>)
-> __op<stdexec::__x<stdexec::__decay_t<R>>>
{
- return {(R &&) rec};
+ return {(R&&)rec};
}
struct __env
diff --git a/include/sdbusplus/async/stdexec/stop_token.hpp b/include/sdbusplus/async/stdexec/stop_token.hpp
index a518051..559f070 100644
--- a/include/sdbusplus/async/stdexec/stop_token.hpp
+++ b/include/sdbusplus/async/stdexec/stop_token.hpp
@@ -243,7 +243,7 @@
noexcept(__nothrow_constructible_from<_Fun, _Fun2>) :
__stok::__in_place_stop_callback_base(
__token.__source_, &in_place_stop_callback::__execute_impl_),
- __fun_((_Fun2 &&) __fun)
+ __fun_((_Fun2&&)__fun)
{
__register_callback_();
}
@@ -456,11 +456,11 @@
requires(const _Token& __token) {
{
__token.stop_requested()
- } noexcept -> __boolean_testable_;
+ } noexcept -> __boolean_testable_;
{
__token.stop_possible()
- } noexcept -> __boolean_testable_;
- // workaround ICE in appleclang 13.1
+ } noexcept -> __boolean_testable_;
+ // workaround ICE in appleclang 13.1
#if !defined(__clang__)
typename __stok::__check_type_alias_exists<
_Token::template callback_type>;
@@ -474,13 +474,13 @@
constructible_from<_Callback, _Initializer> && //
constructible_from< //
typename _Token::template callback_type<_Callback>, _Token,
- _Initializer> && //
- constructible_from< //
+ _Initializer> && //
+ constructible_from< //
typename _Token::template callback_type<_Callback>, _Token&,
- _Initializer> && //
- constructible_from< //
+ _Initializer> && //
+ constructible_from< //
typename _Token::template callback_type<_Callback>, const _Token,
- _Initializer> && //
+ _Initializer> && //
constructible_from<typename _Token::template callback_type<_Callback>,
const _Token&, _Initializer>;
@@ -490,7 +490,7 @@
requires {
{
_Token::stop_possible()
- } -> __boolean_testable_;
+ } -> __boolean_testable_;
} && //
(!_Token::stop_possible());
} // namespace stdexec
diff --git a/include/sdbusplus/async/stdexec/task.hpp b/include/sdbusplus/async/stdexec/task.hpp
index a3d84eb..625ea8e 100644
--- a/include/sdbusplus/async/stdexec/task.hpp
+++ b/include/sdbusplus/async/stdexec/task.hpp
@@ -38,8 +38,8 @@
{
using namespace stdexec;
-using __any_scheduler = //
- any_receiver_ref< //
+using __any_scheduler = //
+ any_receiver_ref< //
completion_signatures<set_error_t(std::exception_ptr),
set_stopped_t()> //
>::any_sender<>::any_scheduler<>;
@@ -55,7 +55,7 @@
requires(const _Ty& t) {
{
get_env(t)
- } -> __stop_token_provider;
+ } -> __stop_token_provider;
};
template <class _Ty>
@@ -63,7 +63,7 @@
requires(const _Ty& t) {
{
get_env(t)
- } -> __scheduler_provider;
+ } -> __scheduler_provider;
};
template <class _ParentPromise>
@@ -130,7 +130,7 @@
template <scheduler _Scheduler>
explicit __default_task_context_impl(_Scheduler&& __scheduler) :
- __scheduler_{(_Scheduler &&) __scheduler}
+ __scheduler_{(_Scheduler&&)__scheduler}
{}
bool stop_requested() const noexcept
@@ -142,7 +142,7 @@
void set_scheduler(_Scheduler&& __sched)
requires(__with_scheduler)
{
- __scheduler_ = (_Scheduler &&) __sched;
+ __scheduler_ = (_Scheduler&&)__sched;
}
template <class _ThisPromise>
@@ -358,7 +358,7 @@
template <scheduler _Scheduler>
__wrap<_Scheduler> operator()(_Scheduler __sched) const noexcept
{
- return {(_Scheduler &&) __sched};
+ return {(_Scheduler&&)__sched};
}
};
@@ -430,19 +430,19 @@
}
template <sender _Awaitable>
- requires __scheduler_provider<_Context> decltype(auto)
- await_transform(_Awaitable&& __awaitable) noexcept
+ requires __scheduler_provider<_Context>
+ decltype(auto) await_transform(_Awaitable&& __awaitable) noexcept
{
// TODO: If we have a complete-where-it-starts query then we can
// optimize this to avoid the reschedule
- return as_awaitable(transfer((_Awaitable &&) __awaitable,
- get_scheduler(__context_)),
- *this);
+ return as_awaitable(
+ transfer((_Awaitable&&)__awaitable, get_scheduler(__context_)),
+ *this);
}
template <class _Scheduler>
- requires __scheduler_provider<_Context> decltype(auto)
- await_transform(
+ requires __scheduler_provider<_Context>
+ decltype(auto) await_transform(
__reschedule_coroutine_on::__wrap<_Scheduler> __box) noexcept
{
if (!std::exchange(__rescheduled_, true))
@@ -468,7 +468,7 @@
decltype(auto) await_transform(_Awaitable&& __awaitable) noexcept
{
return with_awaitable_senders<__promise>::await_transform(
- (_Awaitable &&) __awaitable);
+ (_Awaitable&&)__awaitable);
}
using __context_t =
diff --git a/include/sdbusplus/server/object.hpp b/include/sdbusplus/server/object.hpp
index d0d3fd0..f52a263 100644
--- a/include/sdbusplus/server/object.hpp
+++ b/include/sdbusplus/server/object.hpp
@@ -195,12 +195,12 @@
void try_emit()
{
// If T is a normal class with emit_added, call it.
- if constexpr (requires(T & t) { t.emit_added(); })
+ if constexpr (requires(T& t) { t.emit_added(); })
{
this->T::emit_added();
}
// If T is a recursive object_t, call its maybe_emit_iface_added.
- if constexpr (requires(T & t) { t.maybe_emit_iface_added(); })
+ if constexpr (requires(T& t) { t.maybe_emit_iface_added(); })
{
this->T::maybe_emit_iface_added();
}
diff --git a/include/sdbusplus/timer.hpp b/include/sdbusplus/timer.hpp
index 526a050..2401763 100644
--- a/include/sdbusplus/timer.hpp
+++ b/include/sdbusplus/timer.hpp
@@ -178,8 +178,8 @@
0, // Use default event accuracy
[](sd_event_source* /*eventSource*/, uint64_t /*usec*/,
void* userData) {
- auto timer = static_cast<Timer*>(userData);
- return timer->timeoutHandler();
+ auto timer = static_cast<Timer*>(userData);
+ return timer->timeoutHandler();
}, // Callback handler on timeout
this); // User data
if (r < 0)
diff --git a/include/sdbusplus/unpack_properties.hpp b/include/sdbusplus/unpack_properties.hpp
index aa63d88..f232130 100644
--- a/include/sdbusplus/unpack_properties.hpp
+++ b/include/sdbusplus/unpack_properties.hpp
@@ -23,9 +23,10 @@
const std::vector<std::pair<std::string, VariantType>>& container,
const std::string& key) noexcept
{
- return std::find_if(
- container.begin(), container.end(),
- [&key](const auto& keyValue) { return keyValue.first == key; });
+ return std::find_if(container.begin(), container.end(),
+ [&key](const auto& keyValue) {
+ return keyValue.first == key;
+ });
}
template <typename OnErrorCallback, typename VariantType, typename ValueType>
@@ -145,7 +146,7 @@
{
details::unpackPropertiesCommon(
[](const UnpackErrorReason reason, const std::string& property) {
- throw exception::UnpackPropertyError(property, reason);
+ throw exception::UnpackPropertyError(property, reason);
},
input, std::forward<Args>(args)...);
}
diff --git a/include/sdbusplus/utility/memory.hpp b/include/sdbusplus/utility/memory.hpp
index 49dc999..11755be 100644
--- a/include/sdbusplus/utility/memory.hpp
+++ b/include/sdbusplus/utility/memory.hpp
@@ -13,4 +13,4 @@
*(void**)p = mfree(*(void**)p);
}
#define _cleanup_free_ _cleanup_(freep)
-#define _cleanup_(x) __attribute__((__cleanup__(x)))
\ No newline at end of file
+#define _cleanup_(x) __attribute__((__cleanup__(x)))
diff --git a/src/async/match.cpp b/src/async/match.cpp
index 410e840..ae8ed73 100644
--- a/src/async/match.cpp
+++ b/src/async/match.cpp
@@ -6,8 +6,8 @@
match::match(context& ctx, const std::string_view& pattern)
{
// C-style callback to redirect into this::handle_match.
- static auto match_cb = [](message::msgp_t msg, void* ctx,
- sd_bus_error*) noexcept {
+ static auto match_cb =
+ [](message::msgp_t msg, void* ctx, sd_bus_error*) noexcept {
static_cast<match*>(ctx)->handle_match(message_t{msg});
return 0;
};
diff --git a/test/bus/match.cpp b/test/bus/match.cpp
index 049e033..d925c7a 100644
--- a/test/bus/match.cpp
+++ b/test/bus/match.cpp
@@ -29,8 +29,8 @@
TEST_F(Match, FunctorIs_sd_bus_message_handler_t)
{
bool triggered = false;
- auto trigger = [](sd_bus_message* /*m*/, void* context,
- sd_bus_error* /*e*/) {
+ auto trigger =
+ [](sd_bus_message* /*m*/, void* context, sd_bus_error* /*e*/) {
*static_cast<bool*>(context) = true;
return 0;
};
diff --git a/test/message/call.cpp b/test/message/call.cpp
index f0122ee..69c8d43 100644
--- a/test/message/call.cpp
+++ b/test/message/call.cpp
@@ -87,13 +87,13 @@
{
EXPECT_DEATH(
[] {
- auto b = bus::new_bus();
- while (b.process_discard())
- ;
- auto slot = newBusIdReq(b).call_async(
- [&](message&&) { throw std::runtime_error("testerror"); });
- b.wait(1s);
- b.process_discard();
+ auto b = bus::new_bus();
+ while (b.process_discard())
+ ;
+ auto slot = newBusIdReq(b).call_async(
+ [&](message&&) { throw std::runtime_error("testerror"); });
+ b.wait(1s);
+ b.process_discard();
}(),
"testerror");
}
diff --git a/test/unpack_properties.cpp b/test/unpack_properties.cpp
index bd349e7..3ed04ca 100644
--- a/test/unpack_properties.cpp
+++ b/test/unpack_properties.cpp
@@ -34,7 +34,7 @@
unpackPropertiesNoThrow(
[&error](sdbusplus::UnpackErrorReason reason,
const std::string& property) {
- error.emplace(reason, property);
+ error.emplace(reason, property);
},
std::forward<Args>(args)...);
return error;