> 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?

Gennadiy.




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

Reply via email to