Skip to content

test/ft/constexpr.cpp uses C++17 features but is not guarded in make test #693

@PavelGuzenfeld

Description

@PavelGuzenfeld

Description

test/ft/constexpr.cpp uses two C++17-only features:

  • Constexpr lambdas (added in C++17)
  • static_assert without message (added in C++17)

However, the root Makefile passes it unconditionally to g++ in the C++14
test target, causing make test c++14 to fail:

constexpr.cpp:12:30: error: lambda expressions are not allowed in unevaluated operands
constexpr.cpp:14:7: error: static assertion without a message is a C++17 extension

Scope

Fix

Add a C++14 guard in the Makefile:

# In the make test loop, skip constexpr.cpp when STD=c++14

Or exclude constexpr.cpp from the list when standard is c++14.

Reproduction

make test c++14
# → build fails on constexpr.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions