PR libstdc++/88119 use alignof in std::alignment_of, not __alignof__
commitc1ddd9912c1ce803abd866a2d90aa2ccad7a298d
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Nov 2018 12:32:57 +0000 (29 12:32 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Nov 2018 12:32:57 +0000 (29 12:32 +0000)
treea9708881adbc46a1ebb865004599bd1243140bb6
parentb85725c8d489c932f326991d6b29e26ffe7a9c29
PR libstdc++/88119 use alignof in std::alignment_of, not __alignof__

Now that __alignof__ and alignof sometimes disagree it matters which one
we use. The standard says that std::alignment_of<T>::value equals
alignof(T), so we need to use that.

Change the only uses of alignment_of to use __alignof__ to avoid a
change in alignment.

PR libstdc++/88119
* include/ext/aligned_buffer.h (__aligned_membuf): Add comment.
(__aligned_buffer): Use __alignof__ instead of std::alignment_of.
* include/std/type_traits (alignment_of): Use alignof instead of
__alignof__.
* testsuite/20_util/alignment_of/value.cc: Fix test to check values
match alignof not __alignof__, as required by the standard.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266613 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/aligned_buffer.h
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/alignment_of/value.cc