
26 Aug
2007
26 Aug
'07
3:18 a.m.
AMDG Steven Watanabe <steven <at> providere-consulting.com> writes:
Giovanni Piero Deretta <gpderetta <at> gmail.com> writes:
Does this actually work? Shouldn't enable/disable_if depend on some template arguments of f (and f is not templated here)?
Right. Never mind. We'll have to wait for concepts.
Ok. Here's a method that actually works template<bool is_static, class Derived> struct base; template<class Derived> struct base<true, Derived> { static R f(); }; template<class Derived> struct base<false, Derived> { R f(); }; template<class T> class C : base<f_is_static<T>::value, C<T> > {}; In Christ, Steven Watanabe