I got a trouble when used boost::mpl.
This code works for std::vector, but fail for std::map (gcc 3.4.2)
#include
#include
#include
#include <iostream>
#include <vector>
#include <map>
#include <utility>
namespace mpl=boost::mpl;
template<typename Pair>
struct first {
typedef typename Pair::first_type type;
};
template<typename Pair>
struct second {
typedef typename Pair::second_type type;
};
int main ()
{
typedef mpl::lambda<
std::vector< second< mpl::arg<1> > > > vector;
std::cout << boost::is_same<
mpl::apply >::type,
std::vector<int> >::value << std::endl;
typedef mpl::lambda<
std::map< first< mpl::arg<1> >, second< mpl::arg<1> > > > map;
std::cout << boost::is_same<
mpl::apply