File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 29582958The following exposition-only concept defines
29592959the 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 }
29702972A type \tcode {Alloc} models \exposconcept {simple-allocator}
29712973if it meets the requirements of \ref {allocator.requirements.general }.
You can’t perform that action at this time.
0 commit comments