Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

REQUIRE(std::indirect(42) == 42) fails to compile with gcc and clang #3073

Copy link
Copy link

Description

@jogerh
Issue body actions

Describe the bug
Using Catch2 with REQUIRE(std::indirect(42) == 42) triggers a recursive constraint satisfaction error with gcc and clang.

error: satisfaction of atomic constraint 'requires(const _Tp& __t, const _Up& __u) {__t == __u;} [with _Tp = _Tp; _Up = _Up]' depends on itself

Expected behavior
REQUIRE(std::indirect(42) == 42) should compile and pass.

Reproduction steps
Build this snippet with x86-64 gcc trunk and -std=c++26

#include <catch2/catch_all.hpp>
#include <memory>

TEST_CASE( "std::indirect(42) compares equal to 42" ) {
    REQUIRE(std::indirect(42) == 42);
}

Platform information:

  • OS: Compiler Explorer
  • Compiler+version: x86-64 gcc trunk and x86-64 clang trunk
  • Catch version: Tested with trunk and 3.0.1
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.