Closed bpmckinnon closed 1 year ago
Thanks. Yes I do support c++11 in phmap. What about this?
#ifdef PHMAP_HAVE_EXCEPTIONS
#define PHMAP_THROW_IMPL(e) throw e
#else
#define PHMAP_THROW_IMPL(e) do { e; std::abort(); } while(0)
#endif
Does it need to be (void)(e); ?
I don't think so, but it wouldn't hurt. Would you like me to do the change?
Thanks again for reporting this @bpmckinnon . Should be fixed now and closing the issue.
The functions ThrowStd* have an unused variable when PHMAP_HAVE_EXCEPTIONS is false. It looks like this issue was introduced when the Throw function was replaced with a macro. I can take a look at this if you like. Would you prefer a revert or a PHMAP_UNUSED macro? There is [[maybe_unused]] to, but I think you support beyond c++17.