Boost logo

Boost Users :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-04-04 16:39:33


Yutaka Leon Suematsu wrote:
> Dear booster,
>
> I have a question related to enable_if. I would like to enable or
> disable some member functions from a template class, but enable_if is
> -not enable- to do it :-)

The usual way to do this, since enable_if is not applicable, is to implement the
function in an optional base class, and use mpl::if or eval_if to derive from
the base only if you want the function enabled.

Jonathan


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