I have a template class(CrMultiIndex) that receive a template parameter a definition of boost multi index(GlobalHash).I work with c++14
I need a way to translate index to tag(n_to_tag)? And to loop on indexes in CrMultiIndex ctor or Init function? My original purpose is to loop on indexes and generate tags names string with typeid(T).name() at init. So i can display statistics according to Tag name
I have template class
template <typename KeysType, typename MultiIndexType>
class CrMultiIndex
{
std::vector<SrStatisticsByIndex> m_StatsByIndex;
public:
MultiIndexType *m_pMultiIndex=NULL;
CrMultiIndex()
{
m_pMultiIndex = new MultiIndexType(typename
MultiIndexType::ctor_args_list());
}
Here is the definition of boost multi index container:
typedef boost::multi_index::multi_index_container<
CrUsersKeys,
UsersKey_hash_indices/*,
bip::allocator<CrUsersKeys,bip::managed_shared_memory::segment_manager>*/
> GlobalHash;
Code is at http://coliru.stacked-crooked.com/a/d97195a6e4bb7ad4
I asked a similar question at Find boost multi index Tag to index and number of indices