Boost logo

Boost :

Subject: Re: [boost] [string_ref] Feature requests
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-12-29 11:18:50


On Sat, Dec 29, 2012 at 3:33 PM, Daniel James <dnljms_at_[hidden]> wrote:
> Easy conversion to std::basic_string. There's a C++11 explicit string
> operator, but that isn't much good for portable code. Something like a
> 'string' or 'to_string' member would do the trick.

Wouldn't non-member to_string make more sense?
http://en.cppreference.com/w/cpp/string/basic_string/to_string
For a member function str() seems more consistent with existing names.

-- 
Olaf

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk