In looking at the documentation for the intrinsic metafunction mpl::at,
it seems to suggest that a three argument version that returns a default
type when a key is not found exists for associative sequences. I don't
see this implemented anywhere in the code, and the simple example below
doesn't compile. Am I missing something or is this an error in the
documentation? Thanks, Nate
#include
#include
#include
#include
#include
#include
using namespace boost::mpl;
int main() {
typedef map< pair,int_<3> > > map_t;
typedef at, int_<0> >::type missing;
BOOST_MPL_ASSERT(( boost::is_same< missing, int_<0> > ));
}
With gcc 4.0.1 and Boost 1.37 on OS X I get
test.cpp: In function 'int main()':
test.cpp:12: error: wrong number of template arguments (3, should be 2)
../BoostInstall/boost_1_37_0/boost/mpl/at_fwd.hpp:20: error: provided
for 'template struct boost::mpl::at'
...