[enable_if] Problem with conversion operator in VS2012
Hi all, I'm trying to follow the example given in http://www.boost.org/doc/libs/1_55_0/libs/utility/enable_if.html#sec:enable_... But VS2012 compiler gives: error C4519: default template arguments are only allowed on a class template Is this supposed to work with VS2012? Is there some other way to use enable_if in a conversion operator with VS2012? Thnaks!
On 16/01/2014 12:11 p.m., dariomt@gmail.com wrote:
Hi all,
I'm trying to follow the example given in http://www.boost.org/doc/libs/1_55_0/libs/utility/enable_if.html#sec:enable_...
But VS2012 compiler gives: error C4519: default template arguments are only allowed on a class template
Is this supposed to work with VS2012?
No. Default template arguments were only introduced in VS2013.
Is there some other way to use enable_if in a conversion operator with VS2012?
No. This requires specific C++11 support which VS2012 doesn't offer. Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
Agustín K-ballo Bergé
On 16/01/2014 12:11 p.m., dariomt <at> gmail.com wrote:
Hi all,
I'm trying to follow the example given in
http://www.boost.org/doc/libs/1_55_0/libs/utility/enable_if.html#sec:enable_... _0x
But VS2012 compiler gives: error C4519: default template arguments are only allowed on a class
template
Is this supposed to work with VS2012?
No. Default template arguments were only introduced in VS2013.
Is there some other way to use enable_if in a conversion operator with VS2012?
No. This requires specific C++11 support which VS2012 doesn't offer.
Regards,
OK, thanks for the info. I'll try it with VS2013
participants (3)
-
Agustín K-ballo Bergé
-
dariomt
-
dariomt@gmail.com