10 Jun
2014
10 Jun
'14
8:09 a.m.
Glen Fernandes wrote:
I certainly wouldn't object to an (or the current) alignment_of being part of Boost.Align.
The standard says that alignof(T&) == alignof(T), but - unless we can think of examples in which we (1) genuinely need to use alignment_of on a reference type and (2) have it return the alignment of the referent and not the one of the reference itself - I suggest we just prohibit references. We'll probably have to prohibit abstract types, too. The standard says that they are allowed as well. So we have to tighten our requirements either way, and I think it makes sense to constrain ourselves to what we actually use.