void maptest() { typedef typename S::template map<int, int>::type map; map m; BOOST_CHECK( insert(m,1,0).second); BOOST_CHECK(find_second(m,1)!=NULL); BOOST_CHECK(*(find_second(m,1))==0); BOOST_CHECK( !insert(m,1,2).second); BOOST_CHECK( insert(m,1,2).first != m.end());// == m.find(m,1) BOOST_CHECK( insert(m,3,4).second); BOOST_CHECK(m.find(1)->first == 1); BOOST_CHECK(m.find(3)->first == 3); BOOST_CHECK(m.find(3)->second == 4); BOOST_CHECK(find_second(m,3) == &m.find(3)->second); BOOST_CHECK(m.find(0)==m.end()); }
Result *find(const Arg &a) { return find_second(memo, a); }