|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2005-04-06 04:36:50
> The code below works as expected when compiled with g++ 3.4 as:
>
> $ g++ -I$HOME/boost/cvs -g -W -Wall -o static_test2 static_test2.cpp
>
> but it also produces this warning:
>
> static_test2.cpp: In static member function `static foo foo::set()':
> static_test2.cpp:15: warning: no return statement in function returning
> non-void
>
> Clearly, I could add a spurious return statement after the assert, but
> isn't g++ being a little over eager here? Can the warning not be silenced
> by the library?
None: it would have to introduce a return statement to do so, and that would
break so many things that I don't know where to begin. Remember that many
uses of BOOST_STATIC_ASSERT do expect it to compile, and generate neither
code not data.
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk