Boost logo

Boost :

Subject: Re: [boost] [Modularization] new Memory module
From: Peter Dimov (lists_at_[hidden])
Date: 2014-06-10 06:51:51


> template<class T> struct alignment_of<T[]>: alignment_of<T> {};

If we also add

template<class T, size_t N> struct alignment_of<T[N]>: alignment_of<T> {};

for consistency, even though it's not needed, I wonder if

struct padded
{
    char unit;
    T object[ 31 ];
};

wouldn't produce a more accurate value, obviating the need for min_size.


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