
27 Feb
2012
27 Feb
'12
4:58 p.m.
Fix is trivial and well known: replace throw x; with BOOST_THROW_EXCEPTION(x); in a converter_policies.hpp file. But the library maintainer does not like BOOST_THROW_EXCEPTION because of code bloat. Perhaps what would be better would be to have a macro for "simple" exceptions that could be added in whatever file(s) BOOST_THROW_EXCEPTIONs definition exists (BOOST_THROW_SIMPLE_EXCEPTION? BOOST_THROW_UNMODIFIED_EXCEPTION? BOOST_THROW_RAW_EXCEPTION? not sure any of those names work). All if would do would throw the exception if exceptions are enabled or call the function otherwise - I'm sure this could be used in many other places and would avoid having an abundance of practically identical statement blocks.
Iain