mirror of
https://github.com/Naios/continuable.git
synced 2025-12-07 01:06:44 +08:00
Mark promise helpers as noexcept
This commit is contained in:
parent
12c23f15f8
commit
73c0b17962
@ -73,31 +73,40 @@ public:
|
|||||||
promise_base(OData&& data) : data_(std::forward<OData>(data)) {
|
promise_base(OData&& data) : data_(std::forward<OData>(data)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resolves the continuation with the given values
|
/// Resolves the continuation with the given values.
|
||||||
|
///
|
||||||
|
/// \throws This method never throws an exception.
|
||||||
///
|
///
|
||||||
/// \since 2.0.0
|
/// \since 2.0.0
|
||||||
void operator()(Args... args) && {
|
void operator()(Args... args) && noexcept {
|
||||||
std::move(data_)(std::move(args)...);
|
std::move(data_)(std::move(args)...);
|
||||||
}
|
}
|
||||||
/// Resolves the continuation with the given exception
|
/// Resolves the continuation with the given exception.
|
||||||
|
///
|
||||||
|
/// \throws This method never throws an exception.
|
||||||
///
|
///
|
||||||
/// \since 2.0.0
|
/// \since 2.0.0
|
||||||
void operator()(detail::types::dispatch_error_tag tag,
|
void operator()(detail::types::dispatch_error_tag tag,
|
||||||
detail::types::error_type exception) && {
|
detail::types::error_type exception) &&
|
||||||
|
noexcept {
|
||||||
std::move(data_)(tag, std::move(exception));
|
std::move(data_)(tag, std::move(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resolves the continuation with the given values
|
/// Resolves the continuation with the given values.
|
||||||
|
///
|
||||||
|
/// \throws This method never throws an exception.
|
||||||
///
|
///
|
||||||
/// \since 2.0.0
|
/// \since 2.0.0
|
||||||
void set_value(Args... args) {
|
void set_value(Args... args) noexcept {
|
||||||
std::move(data_)(std::move(args)...);
|
std::move(data_)(std::move(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resolves the continuation with the given exception
|
/// Resolves the continuation with the given exception.
|
||||||
|
///
|
||||||
|
/// \throws This method never throws an exception.
|
||||||
///
|
///
|
||||||
/// \since 2.0.0
|
/// \since 2.0.0
|
||||||
void set_exception(detail::types::error_type exception) {
|
void set_exception(detail::types::error_type exception) noexcept {
|
||||||
std::move(data_)(detail::types::dispatch_error_tag{}, std::move(exception));
|
std::move(data_)(detail::types::dispatch_error_tag{}, std::move(exception));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user