Boost logo

Boost Users :

Subject: Re: [Boost-users] [Enable-if] Selectively instantiating methods.
From: Igor R (boost.lists_at_[hidden])
Date: 2011-09-23 10:48:36


> 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<is_const<T1>, int>::type mutating_method();
>> };

Default template arguments are disallowed for function templates.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net