[Dune-devel] Deprecate Dune::AlignmentOf in favor of alignof or std::alignment_of

Ansgar Burchardt burchardt at igpm.rwth-aachen.de
Wed Jul 22 10:38:39 CEST 2015


Hi,

I was wondering if we should deprecate Dune::AlignmentOf<T> in
dune/common/alignment.hh: it is identical to std::alignment_of<T>, the
fallback implementation was already removed. In addition there's also
the alignof() operator which provides an even shorter version.

I'm not sure which compiler versions introduced the alignof()
operator. Do we have an easy way to find out if it is present in all
supported compiler version? If it is, I suggest to use alignof(T) as the
replacement, otherwise we have to use std::alignment_of<T>::value.

Ansgar




More information about the Dune-devel mailing list