Boost logo

Boost Users :

Subject: Re: [Boost-users] enable_if on operator type()
From: Scott McMurray ([hidden])
Date: 2008-11-23 17:11:01

On Sun, Nov 23, 2008 at 16:30, Joel Falcou <joel.falcou_at_[hidden]> wrote:
> How can I set up SFINAE using enable_if on method like
> struct foo
> {
> template<class T> operator T() { return T(1); }
> };
> I want the operator T() to be there only if T is arithemtic for example.

"There does not seem to be a way to specify an enabler for a
conversion operator. Converting constructors, however, can have
enablers as extra default arguments. " ~

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at