From 6cdcdcd75b70c90f38256d3ca79f0b6b69330fc5 Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Tue, 28 Apr 2020 10:34:05 +0200 Subject: [PATCH] array from C-array --- include/gp/array.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/gp/array.hpp b/include/gp/array.hpp index f0b1e19..8d56c2b 100644 --- a/include/gp/array.hpp +++ b/include/gp/array.hpp @@ -19,6 +19,14 @@ namespace gp{ : ary{gp::forward(v...)} {} + template<> + array(T (&& oth)[sz]) { + gp::move_uninitialized( + gp::nameless_range(oth, oth+sz), + gp::nameless_range(*this) + ); + } + constexpr T& operator[] (size_t off) { if constexpr (gp_config::has_buffer_bounds)