From 8f2d0361238aad48b2e93243f376abe0489d7457 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 19 Dec 2018 17:14:35 +1100 Subject: [PATCH] sarray: allow copy construction --- array/sarray.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/array/sarray.hpp b/array/sarray.hpp index 52f6bfc8..2ddc60da 100644 --- a/array/sarray.hpp +++ b/array/sarray.hpp @@ -23,6 +23,12 @@ namespace cruft { template class sarray { public: + //--------------------------------------------------------------------- + sarray (sarray const &rhs) + : sarray (cruft::view (rhs)) + { ; } + + //--------------------------------------------------------------------- sarray (T const &data) : sarray (&data, &data + 1)