Skip to content

Warnings on constexpr testing #88

Open
@pantolin

Description

@pantolin

Hi guys,

maybe someone here can help me.

I don't quite understand the idea of the constexpr tests. My compiler (Apple Clang 15.0.0) resolves the static checks at compile time, and then throws warnings like

warning: Condition 'factorial_constexpr(0)==1' is always true [knownConditionTrueFalse]
STATIC_REQUIRE(factorial_constexpr(0) == 1);

/.../.../constexpr_tests.cpp:7:37: note: Calling function 'factorial_constexpr' returns 1
STATIC_REQUIRE(factorial_constexpr(0) == 1);

/.../.../constexpr_tests.cpp:7:41: note: Condition 'factorial_constexpr(0)==1' is always true
 STATIC_REQUIRE(factorial_constexpr(0) == 1);

and then, because warnings are promoted to errors, the build fails.

Is this on purpose? I mean, the idea is to check that this is the behavior and then disable the tests?

Thanks.

Pablo

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