Skip to content

Constructor from iterators is not properly constrained #69

@krsch

Description

@krsch

Example: https://godbolt.org/z/9MTYWPYqG
Fails with span-lite, works with std::span (e.g. by enabling -std=c++20)
The problem is that int& is convertible_to float const&. This is not true for int* and float const* so I think pointers can be used in span_REQUIRES_T on line 956, but I'm not sure if this solution has no other bugs.

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