Skip to content

operator[] not constexpr with contract checking on #71

@CrustyAuklet

Description

@CrustyAuklet

I am doing a little work on my constexpr bitpacking library and wanted to upgrade nonstd::span from 0.7.0 to 0.10.0. In doing so I noticed that operator[] is no longer constexpr if contracts are on. If I simply mark impl::is_positive as constexpr then all my tests pass. Unlike #70 I don't want to disable bounds checking, I like to leave it on in debug builds to enforce the contracts.

Seems like a trivial change, but i can open a MR if you would like. I have the change in my fork and all your tests passed.

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