|
Boost Users : |
Subject: Re: [Boost-users] find the largest/most precise of two types
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2009-05-20 12:10:34
Steven Watanabe wrote:
> #include <boost/typeof/typeof.hpp>
>
> template<class T0, class T1>
> struct promote {
> BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (T0() + T1()))
> typedef typename nested::type type;
> };
>
This is actually one of the most easy way to do it without tons of
specialization. It also can be scaled up
to N args type pretty easily.
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
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