> #include <iostream>
>
> struct Keeper
> {
>     Keeper(int) {}
>     operator bool() { return false; }
>
>     template< class type>
>         void log( const type & val, const char * str)
>     { std::clog << str << "=" << val; }
> };
>
> template< class type>
> struct log_me_t
> {
>     log_me_t( const value & val, const char * str, Keeper & k)
>         : m_val( val)
>     { k.log( val, str); }
>
>     const type & m_val;
> };
>
> template< class type> log_me_t< type> log_me( const type & val, const char
*
> str, Keeper & k)
> { return log_me_t< type>( val, str, k); }
>
> #define BOOST_ASSERT(expr)
>     if ( Keeper k=0 ) ; \
>     else if ( (expr) ) ; \
>     else \
>         <like before> \
>
> #define v_(x) log_me(x, #x, k).ref

Pardon me, it should be:
#define v_(x) log_me(x, #x, k).m_val



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

Reply via email to