|
Boost : |
Subject: Re: [boost] [Modularization] new Memory module
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2014-06-10 08:14:44
Peter Dimov wrote:
> Yes, but T[] is an exception.
>
> 5.3.6 Alignof [expr.alignof]
> 1 An alignof expression yields the alignment requirement of its operand
> type. The operand shall be a type-id
> representing a complete object type or an array thereof or a reference to a
> complete object type.
> 2 The result is an integral constant of type std::size_t.
> 3 When alignof is applied to a reference type, the result shall be the
> alignment of the referenced type. When
> alignof is applied to an array type, the result shall be the alignment of
> the element type.
>
> When T is a complete object type, T[] is an array thereof, so it's allowed.
> I think.
Ah, I see. g++ appears to agree with the above (though, clang does not).
Glen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk