Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-12 17:59:01


----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>

> The latter. It was just an experiment. Fortunately, nothing I'm
> doing depends very much on it. It was prompted by the fact that
> Borland 5.51 can handle enable_if, but not in a templated constructor:
>
> template <class T>
> struct X
> {
> template <class U>
> X(X<U> const&, typename enable_if<some_property_of<U>::value,
int*>::type = 0);
         ^
It chokes here? Is it legal to use the template parameter 'U' in a
non-deduced context like that? I'm curious because I thought that it wasn't
(though I could be wrong).

> }
>
> The parser chokes on the first '<' inside the parens.
>
> I was going to try attacking it from the other direction, by defining
> a conversion operator.

Interesting. It was a herculean effort though!

Paul Mensonides


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