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

cpptoml.h(570): error C2280: 'std::shared_ptr<cpptoml::value<double>> std::dynamic_pointer_cast<cpptoml::value<double>,cpptoml::base>(const std::shared_ptr<cpptoml::base> &) noexcept': attempting to reference a deleted function #65

Open
benui-dev opened this issue Feb 22, 2018 · 3 comments
Labels
more-info-needed Issues that require more information for developer action

Comments

@benui-dev
Copy link

I'm trying to compile in Windows and I hit the following error:

cpptoml.h(570): error C2280: 'std::shared_ptr<cpptoml::value<double>> std::dynamic_pointer_cast<cpptoml::value<double>,cpptoml::base>(const std::shared_ptr<cpptoml::base> &) noexcept': attempting to reference a deleted function

Is there any solution?

@adah1972
Copy link
Contributor

You need to be more specific: test code, compiler used, etc.

FYI: I am using cpptoml without problems in Visual Studio 2017.

@skystrife skystrife added the more-info-needed Issues that require more information for developer action label Jun 2, 2018
@eternalphane
Copy link

@bhumphreys Maybe you've disabled support for RTTI at compile-time:

#ifdef _CPPRTTI
// some other definition...
#else // _CPPRTTI
template <class _Ty1,
    class _Ty2>
shared_ptr<_Ty1> dynamic_pointer_cast(const shared_ptr<_Ty2>&) noexcept = delete; // requires /GR option
#endif // _CPPRTTI

see the comment requires /GR option

@gpravada
Copy link

After this i am getting lot of errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed Issues that require more information for developer action
Projects
None yet
Development

No branches or pull requests

5 participants