Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-01-12 06:43:12


Dan W. wrote:
> John Torjo wrote:
>
>> Dan, I dare you to try this:
>> // assert_example.cpp
>> #include <boost/smart_assert_ext.hpp>
>> void login_admin( const std::string & username, const std::string &
>> passw) {
>> SMART_ASSERT( username == "admin" && passw == "secret")
>> (username)(passw)
>> .msg( "Unauthorized administrator login!");
>> }
>> int main() {
>> login_admin( "admin", "anonymous");
>> return 0;
>> }
>
> I'm not intrepid enough... :-) ...is that login code something that will
> break into secret Petagon files? Or some Unix thing? I'm on Win 98.
> Cheers!

that's just an example.
you can do this also:
SMART_ASSERT(0).msg("oops!");

Best,
John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk