Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-07-27 10:46:18 +0200
committerMartin Hořeňovský2017-07-27 11:32:04 +0200
commit5ebbec7dabf4ed7bef108d6d01cc29b4b096c99b (patch)
tree2979e0013bc1c72af68215063626e3ca7d1352bf /include
parenta40add315382ef4673279d5c71282715ff7b2247 (diff)
downloadcatch3-5ebbec7dabf4ed7bef108d6d01cc29b4b096c99b.tar.gz
Move all stringref function bodies out of line
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_stringref.cpp12
-rw-r--r--include/internal/catch_stringref.h12
2 files changed, 15 insertions, 9 deletions
diff --git a/include/internal/catch_stringref.cpp b/include/internal/catch_stringref.cpp
index 7cf75a75..9572c56f 100644
--- a/include/internal/catch_stringref.cpp
+++ b/include/internal/catch_stringref.cpp
@@ -124,6 +124,18 @@ namespace Catch {
auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool {
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 {
StringBuilder buf;
diff --git a/include/internal/catch_stringref.h b/include/internal/catch_stringref.h
index dd223beb..d7f1efbe 100644
--- a/include/internal/catch_stringref.h
+++ b/include/internal/catch_stringref.h
@@ -51,17 +51,11 @@ namespace Catch {
auto operator == ( StringRef const& other ) const noexcept -> bool;
auto operator != ( StringRef const& other ) const noexcept -> bool;
- auto operator[] ( size_type index ) const noexcept -> char {
- return m_start[index];
- }
+ auto operator[] ( size_type index ) const noexcept -> char;
public: // named queries
- auto empty() const noexcept -> bool {
- return m_size == 0;
- }
- auto size() const noexcept -> size_type {
- return m_size;
- }
+ auto empty() const noexcept -> bool;
+ auto size() const noexcept -> size_type;
auto c_str() const -> char const*;
public: // substrings and searches