Removed templated StringRef ctor and added StringRef literal
This commit is contained in:
parent
c39109dce3
commit
e4a898eaaa
5 changed files with 15 additions and 17 deletions
|
@ -17,11 +17,9 @@
|
|||
#include <cstring>
|
||||
|
||||
namespace Catch {
|
||||
auto StringRef::fromRaw( char const* rawChars ) -> StringRef {
|
||||
return rawChars
|
||||
? StringRef( rawChars,static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
|
||||
: StringRef();
|
||||
}
|
||||
StringRef::StringRef( char const* rawChars ) noexcept
|
||||
: StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
|
||||
{}
|
||||
|
||||
StringRef::operator std::string() const {
|
||||
return std::string( m_start, m_size );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue