13#include "Stroika/Foundation/Math/Common.h"
22 template <
typename CONTAINER>
23 inline typename CONTAINER::value_type*
Start (CONTAINER& c)
25 size_t cnt = c.size ();
26 return cnt == 0 ? nullptr : &c[0];
28 template <
typename CONTAINER>
29 inline const typename CONTAINER::value_type*
Start (
const CONTAINER& c)
31 size_t cnt = c.size ();
32 return cnt == 0 ? nullptr : &c[0];
40 template <
typename CONTAINER>
41 inline typename CONTAINER::value_type*
End (CONTAINER& c)
43 size_t cnt = c.size ();
44 return cnt == 0 ? nullptr : &c[0] + cnt;
46 template <
typename CONTAINER>
47 inline const typename CONTAINER::value_type*
End (
const CONTAINER& c)
49 size_t cnt = c.size ();
50 return cnt == 0 ? nullptr : &c[0] + cnt;
CONTAINER::value_type * End(CONTAINER &c)
For a contiguous container (such as a vector or basic_string) - find the pointer to the end of the co...
CONTAINER::value_type * Start(CONTAINER &c)
For a contiguous container (such as a vector or basic_string) - find the pointer to the start of the ...