it's better to pass a small (e.g. 16 bytes) object by value then by const reference

This commit is contained in:
Kosov Eugene 2015-09-28 23:20:28 +03:00
parent 3402b92ef6
commit e46160c18e

View File

@ -137,7 +137,7 @@ basic_string_view<typename std::remove_pointer<typename Cont::pointer>::type, dy
// to_string() allow (explicit) conversions from string_view to string
//
template<class CharT, size_t Extent>
std::basic_string<typename std::remove_const<CharT>::type> to_string(const basic_string_view<CharT, Extent>& view)
std::basic_string<typename std::remove_const<CharT>::type> to_string(basic_string_view<CharT, Extent> view)
{
return{ view.data(), view.length() };
}