23 Sep
2011
23 Sep
'11
2:57 p.m.
On Fri, Sep 23, 2011 at 11:48 PM, Igor R
I didn't test, but I think something like this should do the job:
template<typename T> struct S { template <class T1 = T> typename disable_if
::type mutating_method(); }; Default template arguments are disallowed for function templates.
True, but they are allowed in C++0x/11 (and maybe the restriction applies only to free-standing functions, not methods, didn't have time to dig up more). http://stackoverflow.com/questions/2447458/default-template-arguments-for-fu... Julien