using C++ STL containers in GCC/gfortran source code

Pedro Alves palves@redhat.com
Sat Dec 17 12:28:00 GMT 2016


On 12/17/2016 12:23 PM, Jonathan Wakely wrote:
> Instead of replacing the global new operator we could write a custom
> allocator that uses xmalloc, and we can have e.g. gcc::string as a
> typedef for std::basic_string<char, std::char_traits<char>,
> gcc::xmallocator<char>>
> 

That doesn't make sense to me, as it leaves the problem
with all "new" expressions that call global op new in
the codebase, like I mentioned?  (And you'd have to do that
for all containers that you'd want to use.)

Am I missing something?

Thanks,
Pedro Alves



More information about the Gcc mailing list