29 Nov
2020
29 Nov
'20
4:19 p.m.
Jeff Garland wrote:
I can give you a very concrete one -- from_iso_string in date_time. It's signature takes a const std::string&. If I have an std::string_view, then I have to unnecessarily construct a string to call this function -- which harms performance and is ugly.
The answer here is to take a string_view that is constructible from all StringLike types, including std::string_view and boost::string_view. boost::string_view could have been this type, but Marshall refuses to add conversions to it, so everybody needs to roll his own. Or perhaps we need to add one to Core so Marshall's one can be kept pristine and in its original shrink wrap.