
I have a mpl::map as follows, with a template parameter of a passed in type and a template parameter of "supported_type" that is a class. using boost::mpl; enum { value = 1 + supported_type::value }; typedef typename insert<typename supported_type::type_map, pair<T, int_<value> > >::type type_map; I'm trying to create a function that searches the map for a given type and returns a numeric value if it's found or -1 if it's not found. template <typename S> int typeValue(void) { return at< type_map, S, int_<-1> >::type::value; } The documentation says I can specify a default value for "at" that is returned if the given key isn't found. The compiler, though, says that I've provided too many arguments. Have I called "at" incorrectly? Is the documentation incorrect? Is the fault with the compiler (VS 2005)? Ryan