<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_stringref.h, branch v2.x</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>Fix MSVC deprecation warning for user-defined literals</title>
<updated>2026-07-27T12:08:43+00:00</updated>
<author>
<name>Zhe Feng</name>
</author>
<published>2026-07-27T12:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=c002f18535880a18cdaa7304af02cdfd5990279e'/>
<id>c002f18535880a18cdaa7304af02cdfd5990279e</id>
<content type='text'>
Remove the space between "" and the suffix in user-defined literal
operators (e.g. operator ""_a instead of operator "" _a) to avoid
MSVC deprecation warning C5311.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the space between "" and the suffix in user-defined literal
operators (e.g. operator ""_a instead of operator "" _a) to avoid
MSVC deprecation warning C5311.
</pre>
</div>
</content>
</entry>
<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>Make StringRef's operator std::string explicit</title>
<updated>2019-09-08T13:58:10+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-09-08T12:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7b865daccc7bba2dcc25a4f0b9ea7348b1b4d61f'/>
<id>7b865daccc7bba2dcc25a4f0b9ea7348b1b4d61f</id>
<content type='text'>
This way it is explicit when there is a `StringRef` -&gt; `std::string`
conversion and makes it easier to look for allocations that could
be avoided.

Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -&gt; `std::string`
conversion when parsing tags of a test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way it is explicit when there is a `StringRef` -&gt; `std::string`
conversion and makes it easier to look for allocations that could
be avoided.

Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -&gt; `std::string`
conversion when parsing tags of a test case.
</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>Remove commented out code</title>
<updated>2019-05-26T19:19:55+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-05-26T19:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a5a2d08fbb3f68cf3f0bfbaa11e8b7a2d4386d61'/>
<id>a5a2d08fbb3f68cf3f0bfbaa11e8b7a2d4386d61</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Fix StringRef self-assignment after substring</title>
<updated>2019-05-18T16:54:39+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2019-05-18T16:54:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3bce8ba14b5dfb55c0127b8ad9eddf5a92b662c0'/>
<id>3bce8ba14b5dfb55c0127b8ad9eddf5a92b662c0</id>
<content type='text'>
Thanks to Alex Tkachenko for spotting it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to Alex Tkachenko for spotting it.
</pre>
</div>
</content>
</entry>
<entry>
<title>small cleanup of code</title>
<updated>2019-01-10T12:07:54+00:00</updated>
<author>
<name>Jozef Grajciar</name>
</author>
<published>2019-01-06T13:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=bdee512057fd896025bde6dcd2b837de522161a1'/>
<id>bdee512057fd896025bde6dcd2b837de522161a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
