sarray: add make_sarray function for arrays
This commit is contained in:
parent
82a319f3d0
commit
3faa64a02b
@ -94,6 +94,15 @@ namespace util {
|
|||||||
|
|
||||||
const std::size_t m_size;
|
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
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user