<div class="gmail_quote">On Tue, Jun 12, 2012 at 10:39 AM, Jeffrey Lee Hellrung, Jr. <span dir="ltr">&lt;<a href="mailto:jeffrey.hellrung@gmail.com" target="_blank">jeffrey.hellrung@gmail.com</a>&gt;</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">&lt;<a href="mailto:dariomt@gmail.com" target="_blank">dariomt@gmail.com</a>&gt;</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&#39;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&#39;m getting a compiler error saying &#39;boost::mpl::at&#39; : too many template arguments.<br><br>What am I doing wrong?<br><br><br>#include &lt;boost/mpl/map.hpp&gt;<br>#include &lt;boost/mpl/at.hpp&gt;<br>

#include &lt;boost/mpl/size.hpp&gt;<br>
#include &lt;boost/mpl/empty.hpp&gt;<br>#include &lt;boost/type_traits/is_same.hpp&gt;<br><br>using namespace boost;<br>using namespace boost::mpl;<br><br>typedef map&lt;<br>����� pair&lt;int,unsigned&gt;<br>��� , pair&lt;char,unsigned char&gt;<br>


��� , pair&lt;long_&lt;5&gt;,char[17]&gt;<br>��� , pair&lt;int[42],bool&gt;<br>��� &gt; m;<br><br>BOOST_MPL_ASSERT_RELATION( size&lt;m&gt;::value, ==, 4 );<br>BOOST_MPL_ASSERT_NOT(( empty&lt;m&gt; ));<br><br>BOOST_MPL_ASSERT(( is_same&lt; at&lt;m,int&gt;::type, unsigned &gt; ));<br>


BOOST_MPL_ASSERT(( is_same&lt; at&lt;m,long_&lt;5&gt; &gt;::type, char[17] &gt; ));<br>BOOST_MPL_ASSERT(( is_same&lt; at&lt;m,int[42]&gt;::type, bool &gt; ));<br>BOOST_MPL_ASSERT(( is_same&lt; at&lt;m,long&gt;::type, void_ &gt; ));<br>


<br>BOOST_MPL_ASSERT(( is_same&lt; at&lt;m,long,void_&gt;::type, void_ &gt; )); // 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&#39;ll try to find out what the correct resolution is on the developer&#39;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>