mirror of
https://github.com/microsoft/GSL.git
synced 2025-01-18 09:44:59 -05:00
Updating length_func<CharT>::operator() to accept pointer-to-const. (#458)
This commit is contained in:
parent
f9c47dd63f
commit
2676e172db
@ -217,7 +217,7 @@ namespace details
|
||||
template <>
|
||||
struct length_func<char>
|
||||
{
|
||||
std::ptrdiff_t operator()(char* const ptr, std::ptrdiff_t length) GSL_NOEXCEPT
|
||||
std::ptrdiff_t operator()(const char* const ptr, std::ptrdiff_t length) GSL_NOEXCEPT
|
||||
{
|
||||
return details::string_length(ptr, length);
|
||||
}
|
||||
@ -226,7 +226,7 @@ namespace details
|
||||
template <>
|
||||
struct length_func<wchar_t>
|
||||
{
|
||||
std::ptrdiff_t operator()(wchar_t* const ptr, std::ptrdiff_t length) GSL_NOEXCEPT
|
||||
std::ptrdiff_t operator()(const wchar_t* const ptr, std::ptrdiff_t length) GSL_NOEXCEPT
|
||||
{
|
||||
return details::wstring_length(ptr, length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user