Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-05 18:00:25


I recently spent some time trying to port Boost to Sun's latest
compiler. The bugs I encountered are really somewhat amazing. For
example, this file doesn't compile:

    template <bool c>
    struct bool_c
    {
        static const bool value = c;
    };

    template <class A>
    struct bigger_than_short
        : bool_c< (sizeof(A) > sizeof(short)) >
    {

    };

    int main()
    {
        bool x = bigger_than_short<long>::value;
    };

In order to work around this bug, I had to make the enclosed local
patch to boost/type_traits/detail/bool_trait_def.hpp. I didn't check
it in because it wasn't absolutely clear to me that it was
legit. Aleksey, please comment:



-- 
                    David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com


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