chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

Remove the requires clause on array #283

Closed danakj closed 1 year ago

danakj commented 1 year ago

This fails to compile on clang 16, with it claiming that the forward declaration differs from the friend declaration, even though they have the same clause.

https://github.com/llvm/llvm-project/issues/58859#issuecomment-1638529533

It also makes things very noisy with little benefit - code won't need to branch based on Array<T, N> being a type, the way it can for an overload existing. So change it to a static_assert as we have done for other class-level requirements.

Avoid requires on types, keep it for functions/methods.