+/** Execute some code and set a promise or result accordingly
+ *
+ * We might need this when working with generic code because
+ * the trivial implementation does not work with void (before C++1z).
+ *
+ * @param code What we want to do
+ * @param promise Where to want to store the result
+ */