From 3b2eae07d4338fc5e2363ebb14b4f7caefaad1d1 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 1 May 2024 20:28:12 +0200 Subject: [PATCH] avoided name hiding warning --- test/unordered/stats_tests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unordered/stats_tests.cpp b/test/unordered/stats_tests.cpp index 500104cc..e1041cd2 100644 --- a/test/unordered/stats_tests.cpp +++ b/test/unordered/stats_tests.cpp @@ -20,12 +20,12 @@ template struct unequal_allocator { typedef T value_type; - unequal_allocator(int n_ = 0): n{n_} {} + unequal_allocator(int n = 0): n_{n} {} unequal_allocator(unequal_allocator const&) = default; unequal_allocator(unequal_allocator&&) = default; template - unequal_allocator(unequal_allocator const& x): n{x.n} {} + unequal_allocator(unequal_allocator const& x): n_{x.n_} {} BOOST_ATTRIBUTE_NODISCARD T* allocate(std::size_t n) { @@ -34,10 +34,10 @@ template struct unequal_allocator void deallocate(T* p, std::size_t) noexcept { ::operator delete(p); } - bool operator==(unequal_allocator const& x) const { return n == x.n; } - bool operator!=(unequal_allocator const& x) const { return n != x.n; } + bool operator==(unequal_allocator const& x) const { return n_ == x.n_; } + bool operator!=(unequal_allocator const& x) const { return n_ != x.n_; } - int n; + int n_; }; template void check_stat(const Stats& s, bool full)