Boost C++ Libraries: Ticket #6507: fusion::at missing compile time check and overflows stack https://svn.boost.org/trac10/ticket/6507 <p> Here are the test cases: </p> <pre class="wiki">BOOST_AUTO_TEST_CASE(testing_at_c) { boost::fusion::tuple&lt;int, double&gt; t; boost::fusion::at_c&lt;2&gt;(t); // runtime stack overflow } BOOST_AUTO_TEST_CASE(testing_at) { boost::fusion::tuple&lt;int, double&gt; t; boost::fusion::at&lt;boost::mpl::int_&lt;2&gt; &gt;(t); // runtime stack overflow } </pre><p> Can be fixed, by adding: </p> <pre class="wiki">typedef typename result_of::size&lt;Sequence&gt;::type size_type; BOOST_STATIC_ASSERT((size_type::value &gt; N::value)); BOOST_STATIC_ASSERT((size_type::value &gt;= 0)); </pre><p> to both fusion::at functions in <code>#include &lt;boost/fusion/sequence/intrinsic/at.hpp&gt;</code> and including </p> <pre class="wiki">#include &lt;boost/fusion/sequence/intrinsic/size.hpp&gt; #include &lt;boost/static_assert.hpp&gt; </pre><p> headers. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6507 Trac 1.4.3 Antony Polukhin Fri, 10 May 2013 19:33:57 GMT type changed https://svn.boost.org/trac10/ticket/6507#comment:1 https://svn.boost.org/trac10/ticket/6507#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Joel de Guzman Tue, 18 Nov 2014 22:34:16 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6507#comment:2 https://svn.boost.org/trac10/ticket/6507#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed by <a class="ext-link" href="https://github.com/boostorg/fusion/pull/41"><span class="icon">​</span>https://github.com/boostorg/fusion/pull/41</a> </p> Ticket