Skip to content

Commit 04df25f

Browse files
hewillktkoeppe
authored andcommitted
[allocator.requirements.general] Add namespace std for exposition-only concept
1 parent 2e003da commit 04df25f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

source/lib-intro.tex

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,14 +2958,16 @@
29582958
The following exposition-only concept defines
29592959
the minimal requirements on an Allocator type.
29602960
\begin{codeblock}
2961-
template<class Alloc>
2962-
concept @\defexposconcept{simple-allocator}@ =
2963-
requires(Alloc alloc, size_t n) {
2964-
{ *alloc.allocate(n) } -> @\libconcept{same_as}@<typename Alloc::value_type&>;
2965-
{ alloc.deallocate(alloc.allocate(n), n) };
2966-
} &&
2967-
@\libconcept{copy_constructible}@<Alloc> &&
2968-
@\libconcept{equality_comparable}@<Alloc>;
2961+
namespace std {
2962+
template<class Alloc>
2963+
concept @\defexposconcept{simple-allocator}@ =
2964+
requires(Alloc alloc, size_t n) {
2965+
{ *alloc.allocate(n) } -> @\libconcept{same_as}@<typename Alloc::value_type&>;
2966+
{ alloc.deallocate(alloc.allocate(n), n) };
2967+
} &&
2968+
@\libconcept{copy_constructible}@<Alloc> &&
2969+
@\libconcept{equality_comparable}@<Alloc>;
2970+
}
29692971
\end{codeblock}
29702972
A type \tcode{Alloc} models \exposconcept{simple-allocator}
29712973
if it meets the requirements of \ref{allocator.requirements.general}.

0 commit comments

Comments
 (0)