#ifndef ALSK_ALSK_IMPL_BONE_FARMSEL_H #define ALSK_ALSK_IMPL_BONE_FARMSEL_H #include #include #include #include "../boneimplbase.h" #include "../../skeleton/bone/farmsel.h" namespace alsk { /** * @brief FarmSel implementation for sequential execution */ /* template struct Impl, tag::Sequential, Executor, State>: BoneImplBase, tag::Sequential, Executor, State> { using This = Impl; using Task = Execute; using Select = Execute; typename This::Skeleton skeleton; typename This::Executor executor; typename This::StateRef state; constexpr Impl() = default; template constexpr Impl(S&& skeleton, Executor executor, State& state): skeleton{std::forward(skeleton)}, executor{executor}, state{state} {} constexpr typename This::Return operator()(Args... args) { using Value = typename This::Return; auto tupleP = std::forward_as_tuple(args...); Value best{}; if(skeleton.n) best = executor.template execute(*this, skeleton.task, tupleP, std::tuple<>{}); for(std::size_t i = 1; i < skeleton.n; ++i) { Value current = executor.template execute(*this, skeleton.task, tupleP, std::tuple<>{}); best = executor.template execute