decltype(auto) on the select method
parent
74c1010118
commit
baa5952666
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
include(cmake/color.cmake)
|
||||
set(BLT_VERSION 3.0.5)
|
||||
set(BLT_VERSION 3.0.6)
|
||||
|
||||
set(BLT_TARGET BLT)
|
||||
|
||||
|
|
|
@ -191,13 +191,7 @@ namespace blt::random
|
|||
}
|
||||
|
||||
template<typename Container>
|
||||
constexpr auto& select(Container& container)
|
||||
{
|
||||
return container[get_u64(0, container.size())];
|
||||
}
|
||||
|
||||
template<typename Container>
|
||||
constexpr const auto& select(const Container& container)
|
||||
constexpr decltype(auto) select(Container& container)
|
||||
{
|
||||
return container[get_u64(0, container.size())];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue