Post wait on \a x
| 61 | } |
| 62 | /// Post wait on \a x |
| 63 | virtual void post(Gecode::Space& home, Gecode::SetVarArray& x, |
| 64 | Gecode::IntVarArray&) { |
| 65 | using namespace Gecode; |
| 66 | auto f = static_cast<std::function<void(Space&)>> |
| 67 | ([](Space& home) { c(home); }); |
| 68 | if (x.size() > 1) { |
| 69 | if (sf) |
| 70 | Gecode::wait(home, x, f); |
| 71 | else |
| 72 | Gecode::wait(home, x, &c); |
| 73 | } else { |
| 74 | if (sf) |
| 75 | Gecode::wait(home, x[0], f); |
| 76 | else |
| 77 | Gecode::wait(home, x[0], &c); |
| 78 | } |
| 79 | } |
| 80 | /// Continuation to be executed |
| 81 | static void c(Gecode::Space& _home) { |
| 82 | SetTestSpace& home = static_cast<SetTestSpace&>(_home); |