enumerate on arrays
parent
cd5c98d748
commit
27d1b94493
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
include(cmake/color.cmake)
|
include(cmake/color.cmake)
|
||||||
|
|
||||||
set(BLT_VERSION 0.18.10)
|
set(BLT_VERSION 0.18.11)
|
||||||
set(BLT_TEST_VERSION 0.0.1)
|
set(BLT_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
set(BLT_TARGET BLT)
|
set(BLT_TARGET BLT)
|
||||||
|
|
|
@ -163,6 +163,18 @@ namespace blt
|
||||||
return enumerator{container.begin(), container.end()};
|
return enumerator{container.begin(), container.end()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T, blt::size_t size>
|
||||||
|
static inline auto enumerate(const T(&container)[size])
|
||||||
|
{
|
||||||
|
return enumerator{&container[0], &container[size]};
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T, blt::size_t size>
|
||||||
|
static inline auto enumerate(T(&container)[size])
|
||||||
|
{
|
||||||
|
return enumerator{&container[0], &container[size]};
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static inline auto enumerate(T& container)
|
static inline auto enumerate(T& container)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8a889d3699b3c09ade435641fb034427f3fd12b6
|
Subproject commit d88c5e15079047777b418132ece5879e7c9aaa2b
|
Loading…
Reference in New Issue