Attempt to fix the clang build

This commit is contained in:
Denis Blank 2018-02-28 17:35:33 +01:00
parent 4a5136427b
commit 375e376db8
2 changed files with 10 additions and 9 deletions

View File

@ -115,8 +115,7 @@ using detail::base::is_continuable;
///
/// \since 1.0.0
template <typename Data, typename Annotation>
class continuable_base
: detail::composition::materializer<continuable_base<Data, Annotation>> {
class continuable_base {
/// \cond false
template <typename, typename>
@ -626,6 +625,11 @@ private:
ownership_.release();
}
auto materialize() && {
return detail::composition::materializer<continuable_base>::apply(
std::move(*this));
}
Data&& consume_data() && {
assert_acquired();
release();

View File

@ -163,9 +163,8 @@ auto finalize_composition(continuable_base<Data, Strategy>&& continuation) {
/// provide a materializer method which will finalize an oustanding strategy.
template <typename Continuable, typename = void>
struct materializer {
protected:
constexpr auto&& materialize() && {
return std::move(*static_cast<Continuable*>(this));
static constexpr auto&& apply(Continuable&& continuable) {
return std::move(continuable);
}
};
template <typename Data, typename Strategy>
@ -173,10 +172,8 @@ struct materializer<
continuable_base<Data, Strategy>,
std::enable_if_t<is_composition_strategy<Strategy>::value>> {
protected:
constexpr auto materialize() && {
return finalize_composition(
std::move(*static_cast<continuable_base<Data, Strategy>*>(this)));
static constexpr auto apply(continuable_base<Data, Strategy>&& continuable) {
return finalize_composition(std::move(continuable));
}
};