Boost logo

Boost Users :

Subject: Re: [Boost-users] enable_if on operator type()
From: Eric Niebler (eric_at_[hidden])
Date: 2008-11-23 16:32:35

Joel Falcou 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 ther only if T is arithemtic for example.

You can't do that. There is no work-around.

Eric Niebler
BoostPro Computing

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