Skip to content

[range.istream.view] Remove constexpr-ness? #6757

Open
@hewillk

Description

@hewillk

As we all know, it is unreasonable to create basic_istream during compile-time. However, the member functions of basic_istream_view are all declared as constexpr. I don’t quite understand why?

If the intention here is to support constexpr basic_istream (which is not unreasonable), then why are almost all the members of basic_istream_view::iterator non-constexpr except for the constructor? I'm confused by such inconsistency.

Would it be more appropriate to remove all constexpr qualifiers from this section (although end() can be constexpr by its implementation)?

Did I miss something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions