5 Feb
2017
5 Feb
'17
8:40 p.m.
AMDG On 02/05/2017 02:42 AM, ☂Josh Chia (謝任中) wrote:
<snip> The essence of the problem is that my attempt to construct/build my keys using copy with back_inserter does not give me a mpl::vector<> of mpl::size_t<> that is_same to Count, the expected value. It does give me a sequence, and the elements have the right value and value_type but they are not is_same to the expected size_t<> types. So, if I use the elements together with the size_t<> in an mpl::map, won't they be considered to be different keys?
Yes. If you want to use a map this way, you'll
need to normalize the keys for insertion.
something like this should do the trick:
template<class T>
struct as_size_t { typedef mpl::size_t