On Friday 15 May 2015 10:50:08 Nicol Bolas wrote:
> > You can change the allocator, but not the character type.
>
> No, you cannot.
I'm not sure you're agreeing with me (can't change the character type) or
disagreeing (can't change the allocator).
I think I didn't express myself well.
Right now, you can't change either without writing wrappers or your own
conversion code. You should be able to change the allocator because, after
all, there's no allocation done.
> std::stod and its variations are specific to std::string
> and std::wstring. They are not templated on the allocator types, so you
> can't pass a std::basic_string that uses a different allocator, even if it
> uses the same character type. This is true of C++11 and C++14.
>
> This would be a good time for someone to come up with a proposal to fix
> these things, as well as add variations that take string_view and whatever.
Agreed.