Skip to content

Build assertion against conditions which cannot be evaluated. #106

@PengZheng

Description

@PengZheng

According to the documentation:

Your compile will fail if the condition isn't true, or can't be evaluated by the compiler.

I find no tests for the latter case, so write one myself:

    int val = 0;
    BUILD_ASSERT(val != 0);
    BUILD_ASSERT(val == 0);

It compiles without any complaining.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions