Added another overload of to_string when default function template arguments are not supported.

The additional overload more closely emulates the official interface and allows to construct strings with custom allocators.
This commit is contained in:
Andrey Semashev 2016-09-01 22:08:28 +03:00
parent e5932ebb08
commit 4814d1ebfe

View File

@ -164,6 +164,11 @@ namespace boost {
std::basic_string<charT, traits> to_string() const {
return std::basic_string<charT, traits>(begin(), end());
}
template<typename Allocator>
std::basic_string<charT, traits, Allocator> to_string(const Allocator& a) const {
return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
}
#endif
size_type copy(charT* s, size_type n, size_type pos=0) const {