[PATCH] D54966: Implement P1007R3 `std::assume_aligned`
Marshall Clow via Phabricator
reviews at reviews.llvm.org
Tue Nov 27 12:51:36 PST 2018
mclow.lists marked 3 inline comments as done.
mclow.lists added inline comments.
================
Comment at: include/memory:5591
+_LIBCPP_NODISCARD_ATTRIBUTE
+constexpr _Tp* assume_aligned(_Tp * __p) noexcept
+{
----------------
lebedev.ri wrote:
> Drop `noexcept`?
> `— R2, 2018-10-08: Revised wording and removed noexcept following LWG guidance.`
Nope. The standard has to leave off `noexcept`. Implementers can add it.
Hence the comment I left about `LIBCPP_ASSERT_NOEXCEPT(std::assume_aligned<1, T>(p))`
which is a libc++-specific check.
================
Comment at: test/std/utilities/memory/ptr.align/assume_aligned.pass.cpp:28
+{
+ ASSERT_SAME_TYPE(T*, decltype(std::assume_aligned<1, T>(p)));
+ assert((p == std::assume_aligned<1>(p)));
----------------
Needs a `LIBCPP_ASSERT_NOEXCEPT(std::assume_aligned<1, T>(p))`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54966/new/
https://reviews.llvm.org/D54966
More information about the libcxx-commits
mailing list