On 8 July 2015 at 11:54, Marshall Clow
On Wed, Jul 8, 2015 at 9:15 AM, Nevin Liber
wrote: On 8 July 2015 at 09:43, Marshall Clow
wrote: I'd really like to see the final TS basic_string_view added to Boost so I can start using it now.
use a typedef for now; and I'll update the boost implementation post 1.59 release.
You can't use a typedef; it's a template.
You can use a "using" clause, but that requires C++11 or later.
string_ref is a real type; it's a specialization of basic_string_ref, which is a template.
typedef basic_string_ref
string_ref;
Is the final goal to have boost::*string_view and boost::*string_ref removed? Right now, I have code that takes both std::experimental::string_view and boost::string_ref in interfaces, so the typedef doesn't change anything. I also have code that uses std::experimental::basic_string_view and boost::basic_string_ref, and the typedef doesn't work. Sure, we can add typedefs for the four concrete types, but I don't know if there really is an audience who needs that, if the interface isn't the one which matches the TS. The other downside to a typedef is that people can use string_view and string_ref interchangeably, which can lead to porting problems in the future. -- Nevin ":-)" Liber mailto:nevin@eviloverlord.com (847) 691-1404