On Tuesday, November 3, 2020 10:01 PM, D'Alessandro, Luke K via Std-Proposals <std-proposals@lists.isocpp.org> wrote:


template <typename T>
constexpr array<T, 0> to_array(std::array<T, 0>);

I see no particular constraints on T in [array.zero], nor do any of the constructor traits appear to be relevant here, thus I have no preconditions and merely carried forward the is_array_v mandate from the existing overloads.

Since you get rationale and examples,
that fits in a small paper.

I slightly prefer a tag solution, because
array<T, 0> is not physically zero (or 1) size.
Accepting one as an argument may have
some cost.  Another issue is that the type
array<T, 0> is public.  You don't mean to
allow people to do

  std::array<int, 0> a;
  foo(to_array(a));

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________