>
>Subject: Re: [boost] BOOST_STATIC_WARNING ?
>   From: "John Maddock" <[EMAIL PROTECTED]>
>   Date: Sun, 15 Jun 2003 12:55:15 +0100
>     To: "Boost mailing list" <[EMAIL PROTECTED]>
>
>> I find BOOST_STATIC_ASSERT(...) extremely useful.
>> 
>> I would also find BOOST_STATIC_WARNING(...) extremely useful.
>> 
>> I've looked in boost and now found such a thing.  Am I missing 
>> something?  Is there something equivalent?  Can such a thing
>> be added?
>> 
>> I envision an implementation of BOOST_STATIC_WARNING that
>> would display a compile time warning message but permit
>> compilition to successfully complete.  Its usage would be
>> to notify library users of legal but suspect library usage.
>
>I agree on it's usefulness, but there's no real way to implement it IMO,
>

Another problem (I think) is that with BOOST_STATIC_ASSERT you know compilation will 
stop.

However, a BOOST_STATIC_WARNING would keep re-apearing in each translation unit 
#including your file:

// boost_file.hpp

BOOST_STATIC_WARNING( "we're in boost_file.hpp")


// file1.hpp
#include <boost/boost_file.hpp>

-- appears here

// file2.hpp 
#include <boost/boost_file.hpp>

-- appears here too!

Best,
John

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to