Skip to content

Commit 40cfc37

Browse files
[allocator.requirements.general] Fix SimpleAllocator example (#6152)
The example now meets the requirements and is minimal. Previously, some == comparisons that should work were ambiguous.
1 parent 1912644 commit 40cfc37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/lib-intro.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,10 +2737,10 @@
27372737

27382738
template<class U> SimpleAllocator(const SimpleAllocator<U>& other);
27392739

2740-
[[nodiscard]] T* allocate(std::size_t n);
2740+
T* allocate(std::size_t n);
27412741
void deallocate(T* p, std::size_t n);
27422742

2743-
bool operator==(const SimpleAllocator&) const;
2743+
template<class U> bool operator==(const SimpleAllocator<U>& rhs) const;
27442744
};
27452745
\end{codeblock}
27462746
\end{example}

0 commit comments

Comments
 (0)