Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-04-26 18:25:39

> Can you show me a better example? This is not a challenge. Really,
> if this ENFORCE idea is a useful one I want to understand it.

I extensively using assert-like production time enforcements to validate
user input/order of actions. I like the idea presented in article. Though I
am curently using a little bit more C like solution:

MY_ASSERT_MSG( condition, ("Message", arg1,arg2,...) )

Number of arguments is arbitrary. For example:

MY_ASSERT_MSG( m_value > 0 || m_compression_style == SIGNED_LONG,
                                  ("Couldn't pack value %d using compression
style %d", m_value, m_compression_style) );

Anyway, I think the solution presented is article is neat. And I like to see
some of these advanced assert/enforce solutions presented for boost. Andrej,
are you going to submit?


Boost list run by bdawes at, gregod at, cpdaniel at, john at