Closed lightmare closed 8 years ago
Not pretty, but if it is necessary, it is necessary.
No, the second commit was (edit: overwritten by forced push) a bad idea, sorry.
It will break a class that inherits a noexcept(true) virtual destructor and adds a member variant with recursive_wrapper.
Ok, finally got it to compile on gcc4.7 as well as AppVeyor.
@BergWerkGIS can you please test mapnik with this? a1df843 (I did a few force pushes so you'll probably need to git reset --hard if you previously checked out this branch.
Going to merge this to unblock Mapnik windows builds (refs https://github.com/mapbox/windows-builds/issues/76).
Although AppVeyor build succeeded here, it still fails in mapnik: error C2541: 'delete': cannot delete objects that are not pointers
(obviously MSVC doesn't like my noexcept(delete std::declval<T*>())
Previously when I used std::is_nothrow_destructible<T>
, it said about x.~T()
dtor call syntax not being allowed outside function call (which I interpreted as not being allowed in exception specification, and std::is_nothrow_destructible probably uses that...)
@lightmare also seeing that. Hrmm. Can you see a way to add a test to mapbox/variant to cover this (so we don't have to depend on mapnik to catch the problem)?
@springmeyer I would like to, but I'm running out of ideas. The previous errors/crashes were due to dubious/conflicting noexcept
specifiers. But this is really weird, my detail::is_nothrow_destructible
is wrapped in #elif defined(_MSC_VER)
, both mapnik and variant tests should see that definition so I don't understand why only one complains.
Refs https://github.com/mapbox/variant/issues/86