23 Jan
2019
23 Jan
'19
10:07 a.m.
Thank you for testing. I fixed the first assert, I hadn't tested catch_<> when there is no exception. It works now. The diagnostic_info and verbose_diagnostic_info asserts are because those types were designed to detect attempts to propagate types which no handler cares about. In your example this doesn't happen, so LEAF doesn't instantiate diagnostic_info/verbose_diagonstic_info, but it thinks they must have been instantiated. :) I'll have to think a bit about this one. I'll probably make these types wrappers with a pointer inside, which then can be null in this case. In the mean time, the workaround is to make the handler take these types by const *, e.g.: [ ]( leaf::verbose_diagnostic_info const * v ) { if(v) std::cerr << *v; }