Skip to content

Can non-throwing operations on optional have some form of debug check? #1402

Description

I understand that it probably doesn't fit very well to current debug switches (e.g. _ITERATOR_DEBUG_LEVEL) but asserting on wrong access to optional seems to be even more important than bounds checking containers in some cases, because

  1. In many cases it will not lead to crash but to some random value based behavior (e.g. for optional<int>)
  2. It will not be found via runtime sanitizers.

It's a bit of question/suggestion mix, so sorry about that in advance 😄

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions