
On 17 March 2010 03:23, Emil Dotchevski <emildotchevski@gmail.com> wrote:
On Tue, Mar 16, 2010 at 5:41 PM, Daniel James <dnljms@gmail.com> wrote:
It would be nice to have a proper solution in Boost.Exception, or maybe there already is one and I missed it?
I am not sure what you mean by "proper", I just fix warnings when users report them. So if there is no warning it's all good, right?
But this isn't a warning in your code so you can't fix them, you should supply the tool for others to fix them in their code. And the only reason there isn't a warning is because I used a fragile hack (it's fragile because it depends on undocumented knowledge of the implementation of Boost.Exception, so if you change it in the future, it'll break). The problem is functions like this: int foo() { boost::throw_exception(my_exception()); } This causes a compiler (I think it was Sun) to issue a 'no return statement' error, so it's changed to: int foo() { boost::throw_exception(my_exception()); return 0; } That fixes the error, but now there's a Visual C++ warning about unreachable code. Daniel