[PATCH] D54966: Implement P1007R3 `std::assume_aligned`
Louis Dionne via Phabricator
reviews at reviews.llvm.org
Wed Nov 28 06:35:58 PST 2018
ldionne added a subscriber: chandlerc.
ldionne added a comment.
Subscribed Chandler and emailed Timur in case they want to take a look, since it's their paper.
================
Comment at: include/memory:5590
+template<size_t _Sz, class _Tp>
+_LIBCPP_NODISCARD_ATTRIBUTE
+constexpr _Tp* assume_aligned(_Tp * __p) noexcept
----------------
`_LIBCPP_INLINE_VISIBILITY`?
================
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)));
----------------
mclow.lists wrote:
> Needs a `LIBCPP_ASSERT_NOEXCEPT(std::assume_aligned<1, T>(p))`
This check needs to go into `test/libcxx/<...>`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54966/new/
https://reviews.llvm.org/D54966
More information about the libcxx-commits
mailing list