16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
}
template< typename T >
class TempStorage
{
public:
template< typename TT >
void set( uint32_t cfgId, uint32_t index, TT&& x )
{
auto [it, inserted] = m_storage.try_emplace( cfgId );
if( it->second.size() <= index )
it->second.resize( index + 1 );
it->second[index] = forward< TT >( x );
}
template< typename TT >
void setVec( uint32_t cfgId, TT&& x )
{
auto [it, inserted] = m_storage.try_emplace( cfgId );
it->second = forward< TT >( x );
|
|
>
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
}
template< typename T >
class TempStorage
{
public:
template< typename TT >
auto& set( uint32_t cfgId, uint32_t index, TT&& x )
{
auto [it, inserted] = m_storage.try_emplace( cfgId );
if( it->second.size() <= index )
it->second.resize( index + 1 );
it->second[index] = forward< TT >( x );
return it->second[index];
}
template< typename TT >
void setVec( uint32_t cfgId, TT&& x )
{
auto [it, inserted] = m_storage.try_emplace( cfgId );
it->second = forward< TT >( x );
|