|
Boost : |
Subject: Re: [boost] [contract] extra type requirements for contracts
From: Brent Spillner (spillner_at_[hidden])
Date: 2011-09-23 01:25:32
On Thu, 22 Sep 2011 08:03:09 lcaminiti wrote:
>For example, the following code asserts back() == value only when
>can_call_equal<T>::value is true. However, is there a better way to do this
>that does not require the extra function call to post1?
Unless I'm missing something, you should be able to replace the
post1() calls with
assert(boost::can_call_equal<T>::value && std::clog << "actual
assertion\n" == std::clog && back() == value || std::clog << "trivial
assertion\n" == std::clog);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk