forked from microsoft/GSL
Cleanup additional GCC warnings
When turning on the following flags, several additional warnings were generated, which have been cleaned up in this patch. The flags included: -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wctor-dtor-privacy -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Woverloaded-virtual
This commit is contained in:
committed by
Neil MacIntosh
parent
38f453d608
commit
d641796b21
+1
-1
@@ -331,7 +331,7 @@ public:
|
||||
// Container signature should work for basic_string after C++17 version exists
|
||||
template <class Traits, class Allocator>
|
||||
constexpr basic_string_span(std::basic_string<element_type, Traits, Allocator>& str)
|
||||
: span_(&str[0], str.length())
|
||||
: span_(&str[0], narrow_cast<std::ptrdiff_t>(str.length()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user