25template<
class T_Key,
class T_Value,
class T_ValueOrSize,
class T_Traits>
29 static_assert(std::numeric_limits<T_ValueOrSize>::is_signed &&
sizeof(T_Value) <=
sizeof(T_ValueOrSize),
30 "T_Value/T_ValueOrSize criteria");
32 std::vector<T_Value> ret;
36 const auto end = k2v.
m_table - valOrSz;
37 auto found = std::lower_bound(k2v.
m_table, end, key,
41 while (found < end && found->m_key == key)
43 ret.emplace_back(found->m_value);
50 const auto ind = k2v.
m_conv(T_Key(key));
52 ret.emplace_back(T_Traits::map(valOrSz, ind));
60 return std::make_shared<C_LexDataT<T>>(
unlex<T>(lex));
64std::shared_ptr<C_LexDataT<T>>
tryDupLex(
const std::shared_ptr<const I_LexAttr> &lex)
67 return std::make_shared<C_LexDataT<T>>(*t);
76 return std::make_shared<C_LexDataT<T>>(*t);
FC_GetRelLexT< const I_LexAttr, std::shared_ptr > FC_GetRelLex
std::shared_ptr< C_LexDataT< T > > dupLex(const I_LexAttr &lex)
std::shared_ptr< C_LexDataT< T > > tryDupLex(const std::shared_ptr< const I_LexAttr > &lex)
std::vector< T_Value > index2values(U_K2V< T_Key, T_Value > k2v, T_ValueOrSize valOrSz, T_LexID key)
C_RetLvalT< const I_LexAttr, std::shared_ptr > C_RetLval
THE common namespace of bux library.
auto & unlex(I_LexAttr &lex)
T_CoConst< T_Data, T_Lex > * tryUnlex(const C_Ptr< T_Lex > &lex)
T_Value index2value(U_K2V< T_Key, T_Value > k2v, T_ValueOrSize valOrSz, T_LexID key)
const C_KVPair< T_Key, T_Value > * m_table