mirror of
https://github.com/Naios/continuable.git
synced 2026-02-16 15:19:48 +08:00
Attempt to fix the clang build
This commit is contained in:
parent
4a5136427b
commit
375e376db8
@ -115,8 +115,7 @@ using detail::base::is_continuable;
|
|||||||
///
|
///
|
||||||
/// \since 1.0.0
|
/// \since 1.0.0
|
||||||
template <typename Data, typename Annotation>
|
template <typename Data, typename Annotation>
|
||||||
class continuable_base
|
class continuable_base {
|
||||||
: detail::composition::materializer<continuable_base<Data, Annotation>> {
|
|
||||||
|
|
||||||
/// \cond false
|
/// \cond false
|
||||||
template <typename, typename>
|
template <typename, typename>
|
||||||
@ -626,6 +625,11 @@ private:
|
|||||||
ownership_.release();
|
ownership_.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto materialize() && {
|
||||||
|
return detail::composition::materializer<continuable_base>::apply(
|
||||||
|
std::move(*this));
|
||||||
|
}
|
||||||
|
|
||||||
Data&& consume_data() && {
|
Data&& consume_data() && {
|
||||||
assert_acquired();
|
assert_acquired();
|
||||||
release();
|
release();
|
||||||
|
|||||||
@ -163,9 +163,8 @@ auto finalize_composition(continuable_base<Data, Strategy>&& continuation) {
|
|||||||
/// provide a materializer method which will finalize an oustanding strategy.
|
/// provide a materializer method which will finalize an oustanding strategy.
|
||||||
template <typename Continuable, typename = void>
|
template <typename Continuable, typename = void>
|
||||||
struct materializer {
|
struct materializer {
|
||||||
protected:
|
static constexpr auto&& apply(Continuable&& continuable) {
|
||||||
constexpr auto&& materialize() && {
|
return std::move(continuable);
|
||||||
return std::move(*static_cast<Continuable*>(this));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename Data, typename Strategy>
|
template <typename Data, typename Strategy>
|
||||||
@ -173,10 +172,8 @@ struct materializer<
|
|||||||
continuable_base<Data, Strategy>,
|
continuable_base<Data, Strategy>,
|
||||||
std::enable_if_t<is_composition_strategy<Strategy>::value>> {
|
std::enable_if_t<is_composition_strategy<Strategy>::value>> {
|
||||||
|
|
||||||
protected:
|
static constexpr auto apply(continuable_base<Data, Strategy>&& continuable) {
|
||||||
constexpr auto materialize() && {
|
return finalize_composition(std::move(continuable));
|
||||||
return finalize_composition(
|
|
||||||
std::move(*static_cast<continuable_base<Data, Strategy>*>(this)));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user