<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_compiler_capabilities.hpp, branch v3.8.1</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: 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>
<entry>
<title>Add macro for suppressing Wshadow</title>
<updated>2023-05-28T19:07:31+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-05-17T09:10:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f60c15364bb4be1c9a34f19eac06f085828a2c5e'/>
<id>f60c15364bb4be1c9a34f19eac06f085828a2c5e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress -Wunused-result warning in gcc</title>
<updated>2023-05-23T21:31:55+00:00</updated>
<author>
<name>Cristian Morales Vega</name>
</author>
<published>2023-05-22T08:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=535205e2ac0d26d03126d93327b15c79ac35d3ef'/>
<id>535205e2ac0d26d03126d93327b15c79ac35d3ef</id>
<content type='text'>
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425.
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress declared_but_not_referenced warning for NVHPC</title>
<updated>2023-02-08T11:40:55+00:00</updated>
<author>
<name>Jayesh Badwaik (FZ Juelich)</name>
</author>
<published>2023-02-08T11:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=644294df60b45cb9ac150cff8ffe49c119cdb349'/>
<id>644294df60b45cb9ac150cff8ffe49c119cdb349</id>
<content type='text'>
  Catch2 suppresses unused variable and equivalent warnings in a couple
  of places, but most importantly, in the declaration of autoRegistrar
  in test registry. This warning gets triggered by NVHPC compiler. The
  current patch adds three macros, namely:

      CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
      CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS
      CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

  for the NVHPC Compiler which in particular prevents that warning from
  occurring. The compiler is detected completely separately from the
  other compilers in this patch, because from what I found out, NVHPC
  defines __GNUC__ as well for some reason. (I suspect because it
  advertises itself as GNU compatible.)

  We also add a condition to make sure that the `__GNUC__` path is not
  taken by the NVHPC compiler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Catch2 suppresses unused variable and equivalent warnings in a couple
  of places, but most importantly, in the declaration of autoRegistrar
  in test registry. This warning gets triggered by NVHPC compiler. The
  current patch adds three macros, namely:

      CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
      CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS
      CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

  for the NVHPC Compiler which in particular prevents that warning from
  occurring. The compiler is detected completely separately from the
  other compilers in this patch, because from what I found out, NVHPC
  defines __GNUC__ as well for some reason. (I suspect because it
  advertises itself as GNU compatible.)

  We also add a condition to make sure that the `__GNUC__` path is not
  taken by the NVHPC compiler.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compatibility with previous CUDA versions</title>
<updated>2023-01-18T10:57:00+00:00</updated>
<author>
<name>Tommy Carozzani</name>
</author>
<published>2023-01-17T07:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=aa8da505ec3ce0ef08728c4bb3c104bfd23506eb'/>
<id>aa8da505ec3ce0ef08728c4bb3c104bfd23506eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix macro-redefinition issue with MSVC+CUDA</title>
<updated>2023-01-18T10:57:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-01-14T23:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e27bb7198d351d5b3db21d3c9dd81b5002545682'/>
<id>e27bb7198d351d5b3db21d3c9dd81b5002545682</id>
<content type='text'>
Closes #2603
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2603
</pre>
</div>
</content>
</entry>
</feed>
