Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XCode 10 compilation #2731

Merged
merged 1 commit into from
Mar 4, 2019
Merged

Conversation

ajtulloch
Copy link
Contributor

std::make_shared<T> with ~T declared noexcept(false) fails with:

In file included from /Users/tulloch/src/tvm/src/api/api_arith.cc:6:
In file included from /Users/tulloch/src/tvm/include/tvm/expr.h:9:
In file included from /Users/tulloch/src/tvm/3rdparty/HalideIR/src/ir/Expr.h:7:
In file included from /Users/tulloch/src/tvm/3rdparty/HalideIR/src/tvm/node/node.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:477:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3604:7: error: exception specification of overriding function is more lax than base version
class __shared_ptr_emplace
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4277:26: note: in instantiation of template class 'std::__1::__shared_ptr_emplace<tvm::arith::ConstraintContext,
      std::__1::allocator<tvm::arith::ConstraintContext> >' requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4656:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<tvm::arith::ConstraintContext>::make_shared<tvm::arith::Analyzer *, tvm::runtime::TVMArgValue>' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
/Users/tulloch/src/tvm/src/api/api_arith.cc:112:29: note: in instantiation of function template specialization 'std::__1::make_shared<tvm::arith::ConstraintContext, tvm::arith::Analyzer *, tvm::runtime::TVMArgValue>' requested here
            auto ctx = std::make_shared<ConstraintContext>(self.get(), args[0]);
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3513:13: note: overridden virtual function is here
    virtual ~__shared_weak_count();

See more discussion at https://stackoverflow.com/questions/43791221/stdmake-shared-with-throwing-dtor-and-libc-doesnt-compile and https://bugs.llvm.org/show_bug.cgi?id=32978.

@jroesch
Copy link
Member

jroesch commented Mar 4, 2019

cc @abergeron fix for #2730

@tqchen tqchen merged commit 29e0000 into apache:master Mar 4, 2019
@tqchen
Copy link
Member

tqchen commented Mar 4, 2019

Thanks, @ajtulloch @jroesch this is something that I overlooked, merged

bwasti pushed a commit to facebookexperimental/tvm that referenced this pull request Mar 6, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 9, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants