Move all stringref function bodies out of line

This commit is contained in:
Martin Hořeňovský 2017-07-27 10:46:18 +02:00
parent a40add3153
commit 5ebbec7dab
2 changed files with 15 additions and 9 deletions

View File

@ -124,6 +124,18 @@ namespace Catch {
auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool { auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool {
return !operator==( other ); return !operator==( other );
} }
auto StringRef::operator[](size_type index) const noexcept -> char {
return m_start[index];
}
auto StringRef::empty() const noexcept -> bool {
return m_size == 0;
}
auto StringRef::size() const noexcept -> size_type {
return m_size;
}
auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> String { auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> String {
StringBuilder buf; StringBuilder buf;

View File

@ -51,17 +51,11 @@ namespace Catch {
auto operator == ( StringRef const& other ) const noexcept -> bool; auto operator == ( StringRef const& other ) const noexcept -> bool;
auto operator != ( StringRef const& other ) const noexcept -> bool; auto operator != ( StringRef const& other ) const noexcept -> bool;
auto operator[] ( size_type index ) const noexcept -> char { auto operator[] ( size_type index ) const noexcept -> char;
return m_start[index];
}
public: // named queries public: // named queries
auto empty() const noexcept -> bool { auto empty() const noexcept -> bool;
return m_size == 0; auto size() const noexcept -> size_type;
}
auto size() const noexcept -> size_type {
return m_size;
}
auto c_str() const -> char const*; auto c_str() const -> char const*;
public: // substrings and searches public: // substrings and searches