[string_ref] Add an equality operator between string_ref and char*
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
4211
Age (days ago)
4211
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nicola Bizzoca