Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2003-10-10 16:31:34


John Torjo <john.lists_at_[hidden]> wrote:
> Hi Joel,
>
> A little bit late, please send me the latest code on
> john_at_[hidden]

For those who are interested, the utility is now in the boost-sandbox
for your perusal. It's placed in the boost/utility/ directory (type_deduction.hpp).
An extensive set of tests can be found in the libs/utility/ directory
(type_deduction_tests.cpp).

Here's a sampler:

    {
        typedef result_of_plus<int, double>::type result;
        BOOST_STATIC_ASSERT((is_same<result, double>::value));
    }
    {
        typedef result_of_plus<double, int>::type result;
        BOOST_STATIC_ASSERT((is_same<result, double>::value));
    }

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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