mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Fix sequential compositions
This commit is contained in:
parent
ba6c4cc905
commit
3c90862768
@ -117,7 +117,7 @@ struct result_relocator_mapper {
|
||||
void traverse(traversal::container_category_tag<false, false>, Index* index,
|
||||
Result* result) {
|
||||
|
||||
traverse_one(traits::is_invocable<Evaluator, Index, Result>{}, index,
|
||||
traverse_one(traits::is_invocable<Evaluator, Index*, Result*>{}, index,
|
||||
result);
|
||||
}
|
||||
|
||||
|
||||
@ -109,7 +109,8 @@ constexpr auto create_index_pack(Args&&... args) {
|
||||
|
||||
struct index_relocator {
|
||||
template <typename Index, typename Target,
|
||||
std::enable_if_t<is_indexed_continuable<Index>::value>* = nullptr>
|
||||
std::enable_if_t<
|
||||
is_indexed_continuable<std::decay_t<Index>>::value>* = nullptr>
|
||||
auto operator()(Index* index, Target* target) const noexcept {
|
||||
// Assign the address of the target to the indexed continuable
|
||||
index->target = target;
|
||||
@ -147,8 +148,8 @@ public:
|
||||
explicit sequential_dispatch_visitor(Data&& data) : data_(std::move(data)) {
|
||||
// Assign the address of each result target to the corresponding
|
||||
// indexed continuable.
|
||||
remapping::relocate_index_pack(index_relocator{}, &data.index,
|
||||
&data.result);
|
||||
remapping::relocate_index_pack(index_relocator{}, &data_.index,
|
||||
&data_.result);
|
||||
}
|
||||
|
||||
virtual ~sequential_dispatch_visitor() = default;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user