<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_stringref.cpp, branch v2.11.3</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Rework StringRef interface and internals</title>
<updated>2019-10-25T11:57:52+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-10-21T15:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=50cc14c94c972fc743afca92b22ad7bdc63c429a'/>
<id>50cc14c94c972fc743afca92b22ad7bdc63c429a</id>
<content type='text'>
Now it no longer tries to be this weird hybrid between an owning
and non-owning reference, and is only ever non-owning. This is also
reflected in its interface, for example `StringRef::isNullTerminated`
is now public, and `StringRef::c_str()` has the precondition that it
is true.

Overview of the changes:
* The `StringRef::m_data` member has been completely removed, as it
had no more uses.
* `StringRef::isSubstring()` has been made public and renamed to
`StringRef::isNullTerminated()`, so that the name reflects what the
method actually does.
* `StringRef::currentData()` has been renamed to `StringRef::data()`,
to be in line with common C++ containers and container-alikes.
* `StringRef::c_str()` will no longer silently make copies. It instead
has a precondition that `isNullTerminated()` is true.
* If the user needs a null-terminated string, they should use the
`std::string` conversion operator and call `c_str()` on the resulting
`std::string`.
* Some small optimizations in various places.
* Basic functionality is now `constexpr`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it no longer tries to be this weird hybrid between an owning
and non-owning reference, and is only ever non-owning. This is also
reflected in its interface, for example `StringRef::isNullTerminated`
is now public, and `StringRef::c_str()` has the precondition that it
is true.

Overview of the changes:
* The `StringRef::m_data` member has been completely removed, as it
had no more uses.
* `StringRef::isSubstring()` has been made public and renamed to
`StringRef::isNullTerminated()`, so that the name reflects what the
method actually does.
* `StringRef::currentData()` has been renamed to `StringRef::data()`,
to be in line with common C++ containers and container-alikes.
* `StringRef::c_str()` will no longer silently make copies. It instead
has a precondition that `isNullTerminated()` is true.
* If the user needs a null-terminated string, they should use the
`std::string` conversion operator and call `c_str()` on the resulting
`std::string`.
* Some small optimizations in various places.
* Basic functionality is now `constexpr`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reinline some StringRef methods with trivial bodies</title>
<updated>2019-09-08T19:08:37+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-08T19:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a156440b19c1103419b6e4d3ebbfe3c7ddb948dc'/>
<id>a156440b19c1103419b6e4d3ebbfe3c7ddb948dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove (mostly) unused overloads of StringRef operator +</title>
<updated>2019-09-08T19:01:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-08T19:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9f4c4777a5136a3e1f276398799961e9ccb4b572'/>
<id>9f4c4777a5136a3e1f276398799961e9ccb4b572</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the ill-considered StringRef::numberOfCharacters</title>
<updated>2019-09-07T18:13:22+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-07T18:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fe967b1f4122a67ae1b31febf26cf1751917a0eb'/>
<id>fe967b1f4122a67ae1b31febf26cf1751917a0eb</id>
<content type='text'>
It never counted characters, only codepoints. If you think these
are interchangeable, you should not touch non-ascii text.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It never counted characters, only codepoints. If you think these
are interchangeable, you should not touch non-ascii text.
</pre>
</div>
</content>
</entry>
<entry>
<title>StringRef no longer repoints m_start to m_data after c_str() on a substring.</title>
<updated>2019-05-20T23:04:44+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-05-20T23:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=96355da34edf51cc813400115984050bd7c50630'/>
<id>96355da34edf51cc813400115984050bd7c50630</id>
<content type='text'>
This fixes an issue where a self-assignment of a StringRef copy would point into internally (and now dangling) data.
(now self-assignment check is no longer needed)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an issue where a self-assignment of a StringRef copy would point into internally (and now dangling) data.
(now self-assignment check is no longer needed)
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide a public method to get StringRef's underlying pointer</title>
<updated>2018-02-28T21:49:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-02-28T21:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=05cd05743a75caeffbd6ad4c675ac68bc8e270f1'/>
<id>05cd05743a75caeffbd6ad4c675ac68bc8e270f1</id>
<content type='text'>
This allows reducing the amount of friends needed for its interface
and some extra tricks later.

The bad part is that the pointer can become invalidated via
calls to other StringRef's public methods, but c'est la vie.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows reducing the amount of friends needed for its interface
and some extra tricks later.

The bad part is that the pointer can become invalidated via
calls to other StringRef's public methods, but c'est la vie.
</pre>
</div>
</content>
</entry>
<entry>
<title>StringRef appends itself to std::string efficiently</title>
<updated>2018-02-28T15:02:25+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-02-28T15:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=950ccf4749dc3324543c0cba44f85ff81dd300af'/>
<id>950ccf4749dc3324543c0cba44f85ff81dd300af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>StringRef will not take ownership when writing itself to stream</title>
<updated>2018-02-17T19:41:50+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-02-17T19:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4e57661919e07d8f9e7fcefe73db31a96ab18867'/>
<id>4e57661919e07d8f9e7fcefe73db31a96ab18867</id>
<content type='text'>
This also fixes some tests that were previously failing unnoticed - WTF?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also fixes some tests that were previously failing unnoticed - WTF?
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable -Wpedantic, fix unconditional use of C++14 extension</title>
<updated>2018-02-05T09:04:59+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-02-05T09:04:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ba6d33fb8c74cf1a453368c07f59145a0b0d429c'/>
<id>ba6d33fb8c74cf1a453368c07f59145a0b0d429c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed templated StringRef ctor and added StringRef literal</title>
<updated>2017-11-21T11:08:39+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-11-21T11:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e4a898eaaa0f0458cd5d9f6d63a311366aa8eb0a'/>
<id>e4a898eaaa0f0458cd5d9f6d63a311366aa8eb0a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
