17 May
2013
17 May
'13
4:11 p.m.
Hi, string_ref currently lacks of a simple and efficient way to compare a string_ref data to a C style string The current way that string_ref promotes is: string_ref_data.compare("boost@lists.boost.org") == 0 It's error prone (always checking for 0, < 0, > 0) and involves a series of implicit casting (from char* to string, and from string to string view) The same it's valid for comparing string_ref to string, but is this case an implicit casting from string to string_ref is much less expensive