sarray: allow copy construction

This commit is contained in:
Danny Robson 2018-12-19 17:14:35 +11:00
parent f3886d6089
commit 8f2d036123

View File

@ -23,6 +23,12 @@ namespace cruft {
template <std::size_t S, typename T> template <std::size_t S, typename T>
class sarray { class sarray {
public: public:
//---------------------------------------------------------------------
sarray (sarray const &rhs)
: sarray (cruft::view (rhs))
{ ; }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
sarray (T const &data) sarray (T const &data)
: sarray<S,T> (&data, &data + 1) : sarray<S,T> (&data, &data + 1)