<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_compiler_capabilities.hpp, branch v3.14.0</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>Suppress __COUNTER__ warning from newest Clang versions</title>
<updated>2026-04-01T08:34:58+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-04-01T08:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=51b0532d1fba061d0802ccfd906cc87fc2dd49c2'/>
<id>51b0532d1fba061d0802ccfd906cc87fc2dd49c2</id>
<content type='text'>
Ideally we could suppress the warning locally in the `UNIQUE_NAME` macro,
but that runs into at least 2 issues:

1) Clang actually does not consider the warning as coming from inside the
   `UNIQUE_NAME` macro, even though it correctly points to its expansion
   as the problem. This means that adding `_Pragma`s inside the macro
   around the __COUNTER__ usage does not actually silence the warning.

2) Adding the local suppressions anyway breaks the expansion of
   `MAKE_NAMESPACE` macro inside the templated test case macros. This can
   be fixed for the newest clang version by removing its use and using
   the uniqued `TestName` for the namespace name directly, but this breaks
   compilation on GCC, and older Clang versions.

Because of these issues, we introduce global warning suppression for
`-Wc2y-extensions` to be done with it. We should revisit this if Clang 23
fixes the local pragma based suppression, when it might be worth the effort
to rework the templated test case macros to support it.

Closes #3076
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ideally we could suppress the warning locally in the `UNIQUE_NAME` macro,
but that runs into at least 2 issues:

1) Clang actually does not consider the warning as coming from inside the
   `UNIQUE_NAME` macro, even though it correctly points to its expansion
   as the problem. This means that adding `_Pragma`s inside the macro
   around the __COUNTER__ usage does not actually silence the warning.

2) Adding the local suppressions anyway breaks the expansion of
   `MAKE_NAMESPACE` macro inside the templated test case macros. This can
   be fixed for the newest clang version by removing its use and using
   the uniqued `TestName` for the namespace name directly, but this breaks
   compilation on GCC, and older Clang versions.

Because of these issues, we introduce global warning suppression for
`-Wc2y-extensions` to be done with it. We should revisit this if Clang 23
fixes the local pragma based suppression, when it might be worth the effort
to rework the templated test case macros to support it.

Closes #3076
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: add missing backslash in macro definition</title>
<updated>2026-03-30T12:23:17+00:00</updated>
<author>
<name>Joseph Edwards</name>
</author>
<published>2026-03-27T16:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2ec64d12b198cd25a9ca84230a2be7cfd24494fa'/>
<id>2ec64d12b198cd25a9ca84230a2be7cfd24494fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>🐛 Clang on Windows will define _MSC_VER and trip up these checks -- make it actually Visual C++-specific</title>
<updated>2026-01-19T14:14:53+00:00</updated>
<author>
<name>ThePhD</name>
</author>
<published>2026-01-16T04:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=de7e8630134f46e67a6b59269436f9cab94cd28e'/>
<id>de7e8630134f46e67a6b59269436f9cab94cd28e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress static analysis warning 26426 for Windows/MSVC builds (#3057)</title>
<updated>2026-01-01T21:56:14+00:00</updated>
<author>
<name>OliverBeeckAVM</name>
</author>
<published>2026-01-01T21:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b7e31c9ab3a4b6f7ef5f11d01aa3453c03e695b6'/>
<id>b7e31c9ab3a4b6f7ef5f11d01aa3453c03e695b6</id>
<content type='text'>
Suppress `Global initializer calls a non-constexpr function 'Catch::makeTestInvoker' (i.22).`,
which is issued when using macro `TEST_CASE` for windows/MSVC builds.


---------

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suppress `Global initializer calls a non-constexpr function 'Catch::makeTestInvoker' (i.22).`,
which is issued when using macro `TEST_CASE` for windows/MSVC builds.


---------

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fix non-desktop Windows platforms not defining CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 correctly</title>
<updated>2025-09-17T18:25:26+00:00</updated>
<author>
<name>Silent</name>
</author>
<published>2025-09-17T11:23:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dc3a4ea41a78c643fbfa07b1cb456738c9e25ef6'/>
<id>dc3a4ea41a78c643fbfa07b1cb456738c9e25ef6</id>
<content type='text'>

Fixes building on non-desktop GDK platforms.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Fixes building on non-desktop GDK platforms.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: Clang 19 -Wc++20-extensions warning (#2910)</title>
<updated>2025-04-07T21:45:34+00:00</updated>
<author>
<name>abhishekbelgaonkar23</name>
</author>
<published>2024-11-16T08:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f51dc98dfcaecf402e2d3aa3e0282b27beb4e237'/>
<id>f51dc98dfcaecf402e2d3aa3e0282b27beb4e237</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow disabling use of __builtin_constant_p in internal macros</title>
<updated>2024-10-27T19:27:03+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-10-27T16:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e26028880790addff43cc5546de1e39214d86a04'/>
<id>e26028880790addff43cc5546de1e39214d86a04</id>
<content type='text'>
Turns out that even in GCC, the expression in `__builtin_cosntant_p`
can end up evaluated and side-effects executed. To allow users to
work around this bug, I added a configuration option to disable its
use in internal macros.

Related to #2925
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out that even in GCC, the expression in `__builtin_cosntant_p`
can end up evaluated and side-effects executed. To allow users to
work around this bug, I added a configuration option to disable its
use in internal macros.

Related to #2925
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove obsolete C++14 define</title>
<updated>2024-02-12T23:01:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-02-12T23:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4570fca24b2fd04f82f2376b090abfa5dde965c3'/>
<id>4570fca24b2fd04f82f2376b090abfa5dde965c3</id>
<content type='text'>
There is no reason to have code conditional on C++14, because C++14
is the minimum supported language standard for v3.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no reason to have code conditional on C++14, because C++14
is the minimum supported language standard for v3.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support literal-zero detectors using consteval int constructors</title>
<updated>2024-02-11T23:52:53+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2024-02-08T21:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dc51386b9fd61f99ea9c660d01867e6ad489b403'/>
<id>dc51386b9fd61f99ea9c660d01867e6ad489b403</id>
<content type='text'>
This was originally motivated by `REQUIRE((a &lt;=&gt; b) == 0)` no
longer compiling using MSVC. After some investigation, I found
that they changed their implementation of the zero literal
detector from the previous pointer-constructor with deleted
other constructors, into one that uses `consteval` constructor
from int.

This breaks the previous detection logic, because now
`is_foo_comparable&lt;std::strong_ordering, int&gt;` is true, but
actually trying to compare them is a compile-time error...
The solution was to make the decomposition `constexpr` and rely
on a late C++20 DR that makes it so that `consteval` propagates
up through the callstack of `constexpr` functions, until it either
runs out of `constexpr` functions, or succeeds.

However, the default handling of types in decomposition is to
take a reference to them. This reference never becomes dangling,
but because the constexpr evaluation engine cannot prove this,
decomposition paths taking references to objects cannot be
actually evaluated at compilation time. Thankfully we already
did have a value-oriented decomposition path for arithmetic types
(as these are common linkage-less types), so we could just
explicitly spell out the `std::foo_ordering` types as also being
supposed to be decomposed by-value.

Two more fun facts about these changes
 1) The original motivation of the MSVC change was to avoid
    trigering a `Wzero-as-null-pointer-constant` warning. I still
    do not believe this was a good decision.
 2) Current latest version of MSVC does not actually implement the
    aforementioned C++20 DR, so even with this commit, MSVC cannot
    compile `REQUIRE((a &lt;=&gt; b) == 0)`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was originally motivated by `REQUIRE((a &lt;=&gt; b) == 0)` no
longer compiling using MSVC. After some investigation, I found
that they changed their implementation of the zero literal
detector from the previous pointer-constructor with deleted
other constructors, into one that uses `consteval` constructor
from int.

This breaks the previous detection logic, because now
`is_foo_comparable&lt;std::strong_ordering, int&gt;` is true, but
actually trying to compare them is a compile-time error...
The solution was to make the decomposition `constexpr` and rely
on a late C++20 DR that makes it so that `consteval` propagates
up through the callstack of `constexpr` functions, until it either
runs out of `constexpr` functions, or succeeds.

However, the default handling of types in decomposition is to
take a reference to them. This reference never becomes dangling,
but because the constexpr evaluation engine cannot prove this,
decomposition paths taking references to objects cannot be
actually evaluated at compilation time. Thankfully we already
did have a value-oriented decomposition path for arithmetic types
(as these are common linkage-less types), so we could just
explicitly spell out the `std::foo_ordering` types as also being
supposed to be decomposed by-value.

Two more fun facts about these changes
 1) The original motivation of the MSVC change was to avoid
    trigering a `Wzero-as-null-pointer-constant` warning. I still
    do not believe this was a good decision.
 2) Current latest version of MSVC does not actually implement the
    aforementioned C++20 DR, so even with this commit, MSVC cannot
    compile `REQUIRE((a &lt;=&gt; b) == 0)`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation on Xbox platforms</title>
<updated>2023-12-02T21:03:48+00:00</updated>
<author>
<name>SupSuper</name>
</author>
<published>2023-12-01T10:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4a7be16c8ca0a121853962b9298e38252afbd0c8'/>
<id>4a7be16c8ca0a121853962b9298e38252afbd0c8</id>
<content type='text'>
Xbox does not support getenv
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Xbox does not support getenv
</pre>
</div>
</content>
</entry>
</feed>
