update numeric key interface

This commit is contained in:
IlyaShurupov 2024-04-01 14:10:40 +03:00 committed by Ilya Shurupov
parent 3148e2c020
commit 13bcbcb23f
3 changed files with 25 additions and 23 deletions

View file

@ -12,12 +12,13 @@ namespace tp {
template <typename Type>
using InitialierList = std::initializer_list<Type>;
template <typename tType, typename tTypeResult>
using ShouldPassByValue = typename TypeSelect<(sizeof(tType) > sizeof(tp::alni)), const tType&, tType>::Result;
// Selects whether to pass by constant reference or by value
template <typename tType>
using SelectValueOrReference = typename TypeSelect<(sizeof(tType) > sizeof(tp::alni)), const tType&, tType>::Result;
using SelectValueOrReference = typename TypeSelect<(sizeof(tType) > sizeof(void*)), const tType&, tType>::Result;
template <typename tType, typename tTypeResult>
using SelectValueOrReferenceOf =
typename TypeSelect<(sizeof(tType) > sizeof(void*)), const tTypeResult&, tTypeResult>::Result;
template <typename tType>
using VoidType = void;