From 46b3b9772bac56f7d784ccd2db4374b19814c84f Mon Sep 17 00:00:00 2001 From: Janos Buttgereit Date: Mon, 26 Feb 2024 14:35:22 +0100 Subject: [PATCH] Array: Added missing constraint to single value constructor --- include/vctr/Containers/Array.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/vctr/Containers/Array.h b/include/vctr/Containers/Array.h index 2c5c789..60e5e7f 100644 --- a/include/vctr/Containers/Array.h +++ b/include/vctr/Containers/Array.h @@ -88,16 +88,18 @@ class Array : public VctrBase T> + constexpr Array (T&& initialValue) + requires (extent == 1) + : Vctr (StdArrayType { initialValue }) {} + /** Creates an Array from a list of at least two initial values. */ template ... T> requires (sizeof...(T) > 1) constexpr Array (T&&... initialValues) : Vctr (StdArrayType { std::forward (initialValues)... }) {} - /** Creates an Array with extent 1 from an initial value. */ - template T> - constexpr Array (T&& initialValues) : Vctr (StdArrayType { initialValues }) {} - /** Creates an Array by moving a std::array into it */ template constexpr Array (std::array&& other) : Vctr (std::move (other)) {}