Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-10-15 04:54:27


Chad Walters wrote:
> It's not entirely clear from your description if you really need to
> have is_arithmetic be true for your fixed_point class or if you just
> want to have some predicate that is true for both the built-in
> arithmetic types and your fixed_point class.
>
> If the former, then you will likely run afoul of problems, for the
> reasons previously pointed out.
>
> Hopefully it is the latter - in which case you should just define
> your own predicate with the appropriate logic (true for fixed_point
> or is_arithmetic types).

Right, or mpl::bool_<std::numeric_limits<T>::is_specialized> if you go down
the "specialise numeric_limits" route.

HTH, John.


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