Reputation: 10539
what is the simple way to loop through a mpl::map?
typedef mpl::string<'Curr'> key1;
typedef mpl::string<'Brid'> key2;
typedef mpl::map<pair<key1,int>, pair<key2,char> > m;
How can I loop through m ?
Upvotes: 2
Views: 597
Reputation: 99555
Why don't you use mpl::for_each
? Something like:
mpl::for_each<
m,
typename mpl::lambda<
mpl::key_type<
m,
mpl::_1
>
>
>( do_some() );
Upvotes: 5