<div class="gmail_quote">On Tue, Jun 12, 2012 at 10:39 AM, Jeffrey Lee Hellrung, Jr. <span dir="ltr"><<a href="mailto:jeffrey.hellrung@gmail.com" target="_blank">jeffrey.hellrung@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div class="gmail_quote">On Tue, Jun 12, 2012 at 9:11 AM, <span dir="ltr"><<a href="mailto:dariomt@gmail.com" target="_blank">dariomt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi list,<br><br>I'm trying to use the version of mpl::at with three template parameters, as specified here (<a href="http://www.boost.org/doc/libs/1_46_0/libs/mpl/doc/refmanual/at.html" target="_blank">http://www.boost.org/doc/libs/1_46_0/libs/mpl/doc/refmanual/at.html</a>)<br> <br>But I'm getting a compiler error saying 'boost::mpl::at' : too many template arguments.<br><br>What am I doing wrong?<br><br><br>#include <boost/mpl/map.hpp><br>#include <boost/mpl/at.hpp><br> #include <boost/mpl/size.hpp><br> #include <boost/mpl/empty.hpp><br>#include <boost/type_traits/is_same.hpp><br><br>using namespace boost;<br>using namespace boost::mpl;<br><br>typedef map<<br>����� pair<int,unsigned><br>��� , pair<char,unsigned char><br> ��� , pair<long_<5>,char[17]><br>��� , pair<int[42],bool><br>��� > m;<br><br>BOOST_MPL_ASSERT_RELATION( size<m>::value, ==, 4 );<br>BOOST_MPL_ASSERT_NOT(( empty<m> ));<br><br>BOOST_MPL_ASSERT(( is_same< at<m,int>::type, unsigned > ));<br> BOOST_MPL_ASSERT(( is_same< at<m,long_<5> >::type, char[17] > ));<br>BOOST_MPL_ASSERT(( is_same< at<m,int[42]>::type, bool > ));<br>BOOST_MPL_ASSERT(( is_same< at<m,long>::type, void_ > ));<br> <br>BOOST_MPL_ASSERT(( is_same< at<m,long,void_>::type, void_ > )); // fails!<br></blockquote><div><br>It seems there is a discrepancy between the documentation and the code; if you take a look at boost/mpl/at_fwd.hpp, it forward declares boost::mpl::at with only 2 template parameters :(<br> <br>Please file a trac ticket, and I'll try to find out what the correct resolution is on the developer's list.<br><br>- Jeff<br></div></div> </blockquote></div><br>Argh, sorry dariomt, Gordon has found this already in the trac database :/ My trac searching skills are evidently pretty poor :(<br><br>- Jeff<br><br>