Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 1999-11-28 19:22:56

> Comments appreciated!

I believe std::size_t is superior to int here:

    template< typename T, std::size_t sz > struct call_traits< T[sz] >
        {typedef T * const type; enum { by_value = true }; };

What happened to the std::swap specialization?

    namespace std {

    // std::swap for empty_member
    template <typename PossiblyEmptyBase, typename Member>
    inline void swap(boost::empty_member<PossiblyEmptyBase, Member>& a,
        boost::empty_member<PossiblyEmptyBase, Member>& b)
        // swap base classes in place
        // for empty base classes, this will optimize to nothing
        swap<PossiblyEmptyBase>(a, b);
        // swap member objects in place
        swap(a.member, b.member);

    } // namespace std

    -- Darin

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