Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-10 17:52:45


on Sun Aug 10 2008, "joel falcou" <joel.falcou-AT-u-psud.fr> wrote:

> Another question about concepts :
>
> how can I build a concept which requires a given type X to either have an associated type named
> foo or an associated type named bar (silly names for example purpose). Checking for both is easy
> but i can't find how to check for OR another.

I would say don't. It's not friendly to generic code and it sounds like
"or constraints" which were left out of C++0x for very good reasons. If
you could be more specific about what you're trying to do I might be
able to help find a better solution. My first guess is that the answer
will be found in the use of traits.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net