5UMVJBOXMEKW2H5JG7T4APWP4QSLSPQSXW6RJBZS6FQQ3BG2XXQAC
FUMQRGIGTXORIGJACBDFANU6ZOHBT45EVI4IZTPR7IE2NW2XE77AC
TUDUMVD5MTJJJGVYVOCALOOKOUYNB7LOFJRCYCZDVGN536JAO2OQC
QU4IBVXLLNKNFHT25ZP23INGTVGISDTTLPUBD5S7PCDBC3ZXF3QAC
FEMASUBNU32NSG4DNXZX54CGCA57PVRGYO46L3A6F2EJ4BCSJ3SAC
YIQN7NJTGEVKW7JZHL6CTH6EPCIXCNBYNURIGXPYZAOUX3VAJQMAC
OHAARXLBTFOIV5FOTY7IDMOIAE275CKXCE6XQMWV3EC63YCSMIWAC
L2PGFWL2UYCKFV7XQTNLUESMHCP2TBNE4IWFBDU4E4UNBNEMSKXAC
namespace {
template <typename T, size_t N, typename... Ts>
constexpr enable_if_t<(sizeof...(Ts) == N), array<T, N> >
array_from_initializer_list(const T *const beg, const T *const end,
const Ts &... xs) {
return array<T, N>{xs...};
}
template <typename T, size_t N, typename... Ts>
constexpr enable_if_t<(sizeof...(Ts) < N), array<T, N> >
array_from_initializer_list(const T *const beg, const T *const end,
const Ts &... xs) {
return array_from_initializer_list<T, N>(beg + 1, end, xs...,
beg < end ? *beg : T{});
}
} // namespace
template <int D1 = D, enable_if_t<D1 == 1, int> = 0>
explicit constexpr vect(T a0) : elts({a0}) {}
template <int D1 = D, enable_if_t<D1 == 2, int> = 0>
explicit constexpr vect(T a0, T a1) : elts({a0, a1}) {}
template <int D1 = D, enable_if_t<D1 == 3, int> = 0>
explicit constexpr vect(T a0, T a1, T a2) : elts({a0, a1, a2}) {}
template <int D1 = D, enable_if_t<D1 == 4, int> = 0>
explicit constexpr vect(T a0, T a1, T a2, T a3) : elts({a0, a1, a2, a3}) {}
static constexpr vect pure(T a) {
vect r;
for (int d = 0; d < D; ++d)
r.elts[d] = a;
return r;
}