StringRef conversions to/ from std::string

This commit is contained in:
Phil Nash 2017-08-14 08:39:14 +01:00
parent 1aab791d67
commit c659e0fd3d
3 changed files with 54 additions and 3 deletions

View file

@ -8,6 +8,7 @@
#define CATCH_STRINGREF_H_INCLUDED
#include <cstddef>
#include <string>
namespace Catch {
@ -43,9 +44,11 @@ namespace Catch {
StringRef( char const* rawChars, size_type size ) noexcept;
StringRef( String const& other ) noexcept;
StringRef( String&& other ) noexcept;
StringRef( std::string const& stdString ) noexcept;
~StringRef() noexcept;
auto operator = ( StringRef other ) noexcept -> StringRef&;
operator std::string() const;
void swap( StringRef& other ) noexcept;