Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

`TEMPLATE_PRODUCT_TEST_CASE` trips up `-Wsign-conversion`

Open cjdb opened this issue 3 years ago • 1 comments

Describe the bug TEMPLATE_PRODUCT_TEST_CASE's internals do something to trip up -Wsign-conversion, which causes problems for user code.

Expected behavior No warning should be visible from user code.

Reproduction steps

// g++-11 -Werror=sign-conversion
#include <catch.hpp>
#include <vector>

TEMPLATE_PRODUCT_TEST_CASE("hello", "", (std::vector), (int)) {}

Compiler Explorer

Platform information:

  • OS: Ubuntu 20.04
  • Compiler+version: GCC 11
  • Catch version: v2.13.8 locally; trunk on Compiler Explorer

cjdb avatar Jan 06 '22 21:01 cjdb

Okay, I see this is open against v2 branch. AFAIK this commit should fix it but it won't apply cleanly.

horenmar avatar Jan 29 '22 20:01 horenmar