TRIQS / nda

C++ library for multi-dimensional arrays
https://triqs.github.io/nda
Other
15 stars 12 forks source link

std::span fails to construct on top on a array<T, 1> #76

Open parcollet opened 3 months ago

parcollet commented 3 months ago

Description

std::span fails to construct from an array<T, 1>

Steps to Reproduce

   auto v= nda::vector<long>{1,2,3};
   auto s  std::span<long>{v.begin(), v.end()};

The issue is that the iterator of array<T, 1> should be a contiguous_iterator, not just a random_access_iterator

Expected behavior:

It should construct the span

Actual behavior:

Does not compile.

Versions

unstable (OS X).

parcollet commented 3 months ago