Boost logo

Boost :

Subject: Re: [boost] [assert] static_assert envy
From: Eric Niebler (eric_at_[hidden])
Date: 2011-01-18 21:21:21


On 1/19/2011 8:21 AM, Steven Watanabe wrote:
> There's really no need to get fancy.
>
> #ifndef BOOST_DISABLE_ASSERTS
> if (!c1.empty() && !c2.empty()) {
> BOOST_ASSERT_MSG(c1.front() ? c2.front() : def_val(),
> "something is wrong" );
> }
> #endif
>
> works just fine.

My thoughts exactly.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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