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