
25 Apr
2014
25 Apr
'14
11:54 a.m.
On 04/25/2014 04:19 AM, Albert Yiamakis wrote:
On 24/04/14 15:00, Avi Kivity wrote:
Would something like
template <typename C> struct range_iterator<typename enable_if<is_base_of<Base, C>, C>::type> { ... };
work? This does not compile.
Well, it should be template <typename C> struct range_iterator<typename enable_if<is_base_of<Base, C>::value, C>::type> { ... }; but an simpler example I tried also does not compile, complaining that template parameter C is not used (though it clearly is). I wonder if it's a bug in the error message (and the code is disallowed) or a real compiler bug.