
16 Nov
2012
16 Nov
'12
6:27 p.m.
On Fri, Nov 16, 2012 at 7:18 PM, Yanchenko Maxim <maximyanchenko@yandex.ru>wrote:
[...] char_range is an optimization tool, and when used with std::string it causes its abstraction to leak as it utilizes the hidden knowledge that the source std::string [...]
I do not see it as an optimization tool. As written in the first paragraph of the paper it is intended to remove such nonsense in the future: void open(const char *p, ios_base::openmode = ...); void open(const std::string &p, ios_base::openmode = ...); // added in C++11 runtime_error(const char *p); runtime_error(const std::string &p); // added in C++11 This discussion has already been raised here in the context of boost program_options. -- Yakov