[multi-index] multi-index type trait
Hi
how to test if the first index of boost::multi-index is key based or
sequence based at compile time. I need to write something like this :
template
Elizabeta
Hi how to test if the first index of boost::multi-index is key based or sequence based at compile time[...]
This can do:
#include
Joaquin M Lopez Munoz
Elizabeta
writes: Hi how to test if the first index of boost::multi-index is key based or sequence based at compile time[...]
This can do:
Correction: this is terser and is prepared for Boost 1.59 (which
includes a new type of key-based indices, namely ranked indices):
#include
Joaquin M Lopez Munoz
Joaquin M Lopez Munoz
writes: Elizabeta
writes: Hi how to test if the first index of boost::multi-index is key based or sequence based at compile time[...]
This can do:
Correction: this is terser and is prepared for Boost 1.59 (which includes a new type of key-based indices, namely ranked indices):
Just for the fun of it, the following variation is more future-proof
in the sense that it does not depend on the particular catalog of
indices that Boost.MultiIndex is providing for a given Boost version:
#include
Hi thank you for you reply. This is straightforward solution, but how to the same without using variadic templates. I am using vs2010 and it doesn't support them -- View this message in context: http://boost.2283326.n4.nabble.com/multi-index-multi-index-type-trait-tp4678... Sent from the Boost - Users mailing list archive at Nabble.com.
Elizabeta
Hi thank you for you reply. This is straightforward solution , but how to the same without using variadic templates. I am using vs2010 and it doesn't support them
Please keep some of the post you're answering to in yours, so as to provide context. I can deduce you refer to one of my first two solutions (the third does not use variadic args), but which in particular is lost in the process. Check http://www.boost.org/community/policy.html#quoting for useful info on Boost posting guidelines. As for not using variadic args, simply replace typename... Args with as many template args the index specifier takes (3 for ordered and ranked indices, 4 for hashed indices, 1 for sequenced and random access indices). Joaquín M López Muñoz Telefónica
participants (2)
-
Elizabeta
-
Joaquin M Lopez Munoz