Boost logo

Boost :

Subject: Re: [boost] is_range metafunction
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2008-10-03 15:22:59

Alp Mestan wrote:

> I guess it has to possess a ::value static boolean...
> Regarding the code that determines whether the parameter is a range or
> not, hmm it's like you can/want.
> On 10/3/08, Neal Becker <ndbecker2_at_[hidden]> wrote:
>> I could use one to enable a range constructor only where appropriate:
>> class X {
>> template<typename range_t>
>> X (range_t const&, enable_if<is_range<range_t> >::type *dummy=0)
>> Question is, what might 'is_range' look like?
>> _______________________________________________

I noticed that range has a <range/concepts.hpp>. I wonder if I could use e.g., SinglePassRangeConcept? I don't know if this could be used to provide an enable_if type functionality (or how to do it).

Boost list run by bdawes at, gregod at, cpdaniel at, john at