Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-03-03 09:36:27

Fernando Cacciola wrote:


>> Maybe it would be better to simply disable EH overhead with some
>> BOOST macro. _That_ would be really really great then...
> Which EH overhead?

Exception Handlings. Actually, there is one: BOOST_NO_EXCEPTIONS but I
cannot compile with -fno-exceptions under gcc (some try / catch were still

> Anyway, the problem with your proposal is that as I said before the
> boolean flag is initialized before the object is really constructed.

Actually postponed<> looked like the following and initilialized<> is a list
of booleans set to false:

template <typename T>
    struct postponed : storage<T>, initialized<T>
        typedef T type;
        typedef storage<T> storage_t;
        typedef initialized<T> initialized_t;

        template <int I>
            partial<typename type_at<storage_t, I>::type::value_t> & set()
                static_cast<typename type_at<initialized_t, I>::type &>(*
this).value = true;
                return static_cast<typename type_at<storage_t, I>::type &>(*

        template <int I>
            typename type_at<storage_t, I>::type::value_t const & get()
                return static_cast<typename type_at<storage_t, I>::type
const &>(* this).value.get();

Philippe A. Bouchard

Boost list run by bdawes at, gregod at, cpdaniel at, john at