Both IBM/ILOG CP Optimizer and Gecode use C++ for their main APIs.
Therefore I'll give all examples in C++ with the new interface library.
However, everything discussed here is possible to do with the C API with
a bit more work.
Visit* functions can be inlined