Language
C++
Compiler
gcc 7.3.0
Options
Warnings
Boost 1.71.0
C++17(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-7.3.0/include -std=gnu++17
MyAllocator()
MyAllocator(const MyAllocator &rhs)
allocate(5)
allocate(12)
deallocate("", 5)
Current buffer: Hello World
allocate(24)
deallocate("Hello World!", 12)
Expected throw on release() while the container has still ownership
deallocate("Hello World!", 24)
Final buffer: Hello World!
Exit Code:
0