Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-01-13 08:44:51


>From: "David Abrahams" <dave_at_[hidden]>

> Terje Slettebø <tslettebo_at_[hidden]> writes:
>
> > Why would we want that? What is this useful for?
>
> It would be useful for writing a templated implicit conversion
> operator with restricted applicability via SFINAE.

Right. I've read up properly on the thread, now. I see how this could be
useful. Sorry for not having done that earlier.

> SFINAE is a feature of the language which (coincidentally) allows a
> technique for removing functions from the overload set based on some
> compile-time computation. This technique relies on having a return
> type or parameter type to play with. Unfortunately, implicit
> conversion operators have neither.
>
> Read all about SFINAE in Jossutis & Vandevoorde.

<g> I've done it. Also, when the term first time was brought up here, it was
pointed out that this technique has been used for quite a while, also before
the book got published. However, now we have a name for it. :)

Regards,

Terje


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