Skip to content

Non standard return fails to compile #29

@zofer1

Description

@zofer1

This statement:
return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];

is a non-standard form of return.

In case we compile optimized code that lacks assert function but still want something this code fails to compile.

Separating this to a more standard form solves the issue:

BOOST_ASSERT_MSG( i < N, "out of range" );
return elems[i];

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