Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE in view.cartesian_product with VS2019 16.0 #1222

Open
CaseyCarter opened this issue Jun 19, 2019 · 0 comments
Open

ICE in view.cartesian_product with VS2019 16.0 #1222

CaseyCarter opened this issue Jun 19, 2019 · 0 comments
Assignees
Labels

Comments

@CaseyCarter
Copy link
Collaborator

Partially reduced:

#include <range/v3/range/access.hpp>
#include <range/v3/range/primitives.hpp>
#include <range/v3/view/span.hpp>
#include <range/v3/view/cartesian_product.hpp>
#include <range/v3/view/empty.hpp>

int main() {
    auto e = ranges::view::empty<char>;
    auto rng = ranges::view::cartesian_product(
        ranges::span<int, 42>{},
        e
    );

    auto const first = ranges::begin(rng);
    auto const last = ranges::end(rng);

    for(auto i = 0; i <= ranges::distance(rng); ++i)
    {
        for(auto j = 0; j <= ranges::distance(rng); ++j)
        {
            (void)((ranges::next(first, i) - ranges::next(first, j)) == i - j);
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant