По умолчанию GGC использует `new_allocator. Как я могу использовать другие распределители, такие как debug_allocator/malloc_allocator?
Я сделал что-то вроде этого:
typedef std::basic_string<char, std::char_traits<char>, __gnu_cxx::malloc_allocator<char>> Malloc_String;
Malloc_String s("Hello!");
Но получил эту ошибку:
/usr/include/c++/4.9/bits/basic_string.h: In instantiation of 'class std::basic_string<char, std::char_traits<char>, __gnu_cxx::malloc_allocator<char> >':
11:21: required from here
/usr/include/c++/4.9/bits/basic_string.h:114:63: error: invalid use of incomplete type 'struct __gnu_cxx::malloc_allocator<char>'
typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
#include <ext/malloc_allocator.h>
? - person ephemient   schedule 05.02.2018