sarray: add make_sarray function for arrays

This commit is contained in:
Danny Robson 2017-06-15 13:19:50 +10:00
parent 82a319f3d0
commit 3faa64a02b

View File

@ -94,6 +94,15 @@ namespace util {
const std::size_t m_size;
};
//-------------------------------------------------------------------------
template <typename T, std::size_t S>
auto
make_sarray (const T(&data)[S], std::size_t count = S)
{
return sarray<S,T> (data, data + count);
}
}
#endif