Boost logo

Boost :

Subject: Re: [boost] [contract] extra type requirements for contracts
From: Brent Spillner (spillner_at_[hidden])
Date: 2011-09-23 01:57:27


On Fri, Sep 23, 2011 at 5:25 AM, Brent Spillner <spillner_at_[hidden]> wrote:
> Unless I'm missing something, you should be able to replace the

Oof, I sure was... that's what I get for posting at 2 in the morning.

I can't see any way around an extra function, but I would probably
encapsulate it with something like

template < class T, class U > typename boost::enable_if_c<
can_call_equal<T>::value, bool >::type
equality_test(const T &t, const U &u) { return t == u; }

bool equality_test(...) { return true; }

to avoid littering the generated class with a bunch of one-off postN()s.


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