Commit 29e0000b by Andrew Tulloch Committed by Tianqi Chen

Fix compilation on XCode 10 (#2731)

parent eae76b3c
......@@ -109,7 +109,10 @@ TVM_REGISTER_API("arith._CreateAnalyzer")
});
} else if (name == "enter_constraint_context") {
return PackedFunc([self](TVMArgs args, TVMRetValue *ret) {
auto ctx = std::make_shared<ConstraintContext>(self.get(), args[0]);
// can't use make_shared due to noexcept(false) decl in destructor,
// see https://stackoverflow.com/a/43907314
auto ctx =
std::shared_ptr<ConstraintContext>(new ConstraintContext(self.get(), args[0]));
auto fexit = [ctx](TVMArgs, TVMRetValue*) mutable {
ctx.reset();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment