[PATCH] D41746: Make std::get_temporary_buffer respect overaligned types when possible

Chris Kennelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 13:32:08 PST 2018


ckennelly marked 2 inline comments as done.
ckennelly added a comment.

In https://reviews.llvm.org/D41746#973941, @EricWF wrote:

> This LGTM minus nits.
>
> Is there a LWG issue or paper that specifies this change? or is it just a general bug fix?


This is just a general bug fix.



================
Comment at: include/memory:2007
+#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
+        if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
+        {
----------------
EricWF wrote:
> Please use the `alignment_of` trait; since that's always available within the library, but different spellings of the `alignof` keyword aren't.
I also guarded for __STDCPP_DEFAULT_NEW_ALIGNMENT__


Repository:
  rCXX libc++

https://reviews.llvm.org/D41746





More information about the cfe-commits mailing list