totally_ordered_wrapper: make ctor noexcept
Copying pointers is noexept. Adding unconditional noexcept doesn't limit us to switch to conditional noexcept going forward, because any P for which copy-construction isn't noexcept is currently excluded by the static_assert(is_pointer). Change-Id: I475e6294515a4c76bb31974cd6fd458fb0c0d42e Reviewed-by: Rym Bouabid <rym.bouabid@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
ccb8efbfe5
commit
9dbe681218
@ -619,7 +619,7 @@ class totally_ordered_wrapper
|
||||
|
||||
P ptr;
|
||||
public:
|
||||
explicit constexpr totally_ordered_wrapper(P p) : ptr(p) {}
|
||||
explicit constexpr totally_ordered_wrapper(P p) noexcept : ptr(p) {}
|
||||
|
||||
constexpr P get() const noexcept { return ptr; }
|
||||
constexpr P operator->() const noexcept { return get(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user