mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #86 from kevgs/master
it's better to pass a small (e.g. 16 bytes) object by value then by c…
This commit is contained in:
commit
6a1179974d
@ -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
|
// to_string() allow (explicit) conversions from string_view to string
|
||||||
//
|
//
|
||||||
template<class CharT, size_t Extent>
|
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() };
|
return{ view.data(), view.length() };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user