Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2007-08-25 23:18:39


Steven Watanabe <steven <at>> writes:

> Giovanni Piero Deretta <gpderetta <at>> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at