Boost logo

Boost :

Subject: Re: [boost] [chrono] type_traits/common_type and integer/ratio
From: joel falcou (joel.falcou_at_[hidden])
Date: 2009-12-06 13:13:59


vicente.botet wrote:
> template <boost::intmax_t X>
> struct static_abs
> {
> static const boost::intmax_t value = X < 0 ? -X : X;
> };
>
> don't use mpl::integral_c, it is a valid mpl metafunction. I don't think it is worth adding a dependency to Boost.MPL
You're right, it just need the value_type typedef.

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk