-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dump() method doesn't work with a custom allocator #268
Comments
I actually never tried to use custom allocators in the string type. Your example shows that there is an apparent disconnect between the (in theory) adjustable The quick "fix" would be to replace the return type of Alternatively, the user-defined allocator inside |
I created a branch |
Thanks for checking back, and I am looking forward to see (the definitely needed) fixes! |
I created a fork of the project and a new branch feature/custom-allocator that contains initial changes. There are still a lot of assumptions built into the code using the default allocator for std::vector, std::map, and std::string. |
Even if #161 isn't fixed, the dump() method still assumes the default allocator is used. Consider the following code:
This results in a compiler error:
'return': cannot convert from 'std::basic_string<char,std::char_traits,std::allocator>' to 'std::basic_string<char,std::char_traits,MyAllocator>'
The issue is due to the stringstream that is used without specifying the allocator for the stream. As a result, dump fails to compile due to the call to ss.str().
The text was updated successfully, but these errors were encountered: