File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
include/fast_io_dsal/impl
tests/0026.container/0002.list Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ class list
457457 }
458458 else
459459 {
460- typed_allocator_type::deallocate (ptr, 1 );
460+ typed_allocator_type::deallocate_n (ptr, 1 );
461461 }
462462 }
463463 };
Original file line number Diff line number Diff line change 1+ #include < fast_io_dsal/list.h>
2+ #include < fast_io.h>
3+
4+ struct X {
5+ X () {
6+ ::fast_io::println (" default" );
7+ }
8+
9+ X (X const &) {
10+ ::fast_io::println (" copy" );
11+ }
12+
13+ X (X&&) {
14+ ::fast_io::println (" move" );
15+ }
16+
17+ ~X () {
18+ ::fast_io::println (" destruct" );
19+ }
20+
21+ X& operator =(X const &) {
22+ ::fast_io::println (" copy assign" );
23+ return *this ;
24+ }
25+
26+ X& operator =(X&&) {
27+ ::fast_io::println (" move assign" );
28+ return *this ;
29+ }
30+ };
31+
32+ int main () {
33+ // TODO copy X here, can it be fixed? (caused by std::initilizer_list)
34+ ::fast_io::list<X> const l1{X{}};
35+
36+ return 0 ;
37+ }
You can’t perform that action at this time.
0 commit comments