25 Apr
2014
25 Apr
'14
1:44 p.m.
On 25/04/14 12:54, Avi Kivity wrote:
template <typename C> struct range_iterator
::value, C>::type> { ... };
Boost's enable_if has no value member, you are thinking of the STL one introduced in C++11.
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.
Are you conjecturing wildly here? There is nothing unusual about the error message. The documentation for enable_if is quite clear - an additional template parameter is needed.