From febb88efc43ae171cc2880651b0665614c586504 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 19 Jul 2019 21:49:54 -0400 Subject: Common/Alignment: Add noexcept where required. --- src/common/alignment.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/common/alignment.h b/src/common/alignment.h index 0ce218c60..88d5d3a65 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h @@ -52,11 +52,11 @@ public: using const_reference = const T&; public: - pointer address(reference r) { + pointer address(reference r) noexcept { return std::addressof(r); } - const_pointer address(const_reference r) const { + const_pointer address(const_reference r) const noexcept { return std::addressof(r); } @@ -82,17 +82,17 @@ public: template struct rebind { - typedef AlignmentAllocator other; + using other = AlignmentAllocator; }; - bool operator!=(const AlignmentAllocator& other) const { + bool operator!=(const AlignmentAllocator& other) const noexcept { return !(*this == other); } // Returns true if and only if storage allocated from *this // can be deallocated from other, and vice versa. // Always returns true for stateless allocators. - bool operator==(const AlignmentAllocator& other) const { + bool operator==(const AlignmentAllocator& other) const noexcept { return true; } }; -- cgit v1.2.3