cxxopts
cxxopts copied to clipboard
Exception when calling xxx.as<T>()...
I've a project under MSVC 2017. If CXXOPTS_NO_RTTI
is not defined, any call to xxx.as<T>()
produce an exception.
Exception occurs at line 1458 of cxxopts.hpp, deeper at line 291 of rtti.cpp.
Unhandled exception at 0x00007FFAB6D24FD9 in bla.exe: Microsoft C++ exception: std::__non_rtti_object at memory location 0x000000FEE92FE820.
I'll take a look.
It looks like you need to also define CXXOPTS_NO_EXCEPTIONS
, CXXOPTS_NO_RTTI
only turns off dynamic vs static casting. I'm not sure if there is any benefit having those separated, I might just combine them into one option.