#ifndef ALSK_ALSK_EDSL_OP_IMPL_ITERSEL_H #define ALSK_ALSK_EDSL_OP_IMPL_ITERSEL_H #include #include "../traits.h" #include "../../../skeleton/bone/itersel.h" #include "../../../skeleton/struct/struct.h" #include "../../../skeleton/link/link.h" namespace alsk { namespace edsl { template struct Loop; template struct FarmSel; template struct IterSel: OperandBase { Task task; Select select; unsigned int n; constexpr IterSel(Task task, Select select, unsigned int n) noexcept(noexcept(Task{std::move(task)}) and noexcept(Select{std::move(select)})): task{std::move(task)}, select{std::move(select)}, n{n} {} template constexpr IterSel(IterSel const& o) noexcept(noexcept(Task{o.task}) and noexcept(Select{o.select})): task{o.task}, select{o.select}, n{o.n} {} template constexpr IterSel(IterSel&& o) noexcept(noexcept(Task{std::move(o.task)}) and noexcept(Select{std::move(o.select)})): task{std::move(o.task)}, select{std::move(o.select)}, n{std::move(o.n)} {} using Signature = Signature_; using Struct = S; using Links = L; template constexpr void setup(S& skeleton) const { skeleton.n = n; setupFor(task, skeleton.task); setupFor(select, skeleton.select); } template constexpr auto link() const&& { return IterSel{std::move(*this)}; } template constexpr auto link() const& { return IterSel{*this}; } }; namespace impl { template struct Iter; template struct Iter { Task const& task; unsigned int n; template>* = nullptr> constexpr auto select(Select const& select) { using Signature = GetReturnType