SOLVED!<br><br>boost::fusion::result_of::as_vector solved my problem.<br><br>Thanks.<br><br><div class="gmail_quote">On 17 September 2010 12:03, Paul Graphov <span dir="ltr">&lt;<a href="mailto:graphov@gmail.com">graphov@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello Boost Users,<br><br>I&#39;ve encountered a trouble using fusion adapted struct as mpl sequence:<br>
when I call mpl::push_front with fusion::vector it works but if I try to call it with<br>adapted struct, it fails. Do I miss something? Is there any concise solution or <br>
I have to convert it by hand?<br><br>source:<br><br><a href="http://pastebin.com/3ELipu1M" target="_blank">http://pastebin.com/3ELipu1M</a><br><br><div style="font-family: monospace;"><ol><li><div><span>#include &lt;string&gt;</span></div>

</li><li><div> </div></li><li><div><span>#include &lt;boost/fusion/adapted/struct/adapt_struct.hpp&gt;</span></div></li><li><div><span>#include &lt;boost/fusion/mpl.hpp&gt;</span></div>
</li><li><div><span>#include &lt;boost/fusion/container/vector.hpp&gt;</span></div></li><li><div><span>#include &lt;boost/mpl/push_front.hpp&gt;</span></div>
</li><li><div> </div></li><li><div><span>typedef</span> boost<span>::</span><span>fusion</span><span>::</span><span>vector</span><span>&lt;</span>std<span>::</span><span>string</span>, <span>int</span><span>&gt;</span> employee_1<span>;</span></div>

</li><li><div> </div></li><li><div><span>struct</span> employee_2</div></li><li><div><span>{</span></div></li><li>
<div>  std<span>::</span><span>string</span> name<span>;</span></div></li><li><div>  <span>int</span> age<span>;</span></div>
</li><li><div><span>}</span><span>;</span></div></li><li><div> </div></li><li><div>BOOST_FUSION_ADAPT_STRUCT<span>(</span></div>
</li><li><div>  employee_2,</div></li><li><div>  <span>(</span>std<span>::</span><span>string</span>, name<span>)</span></div>
</li><li><div>  <span>(</span><span>int</span>, age<span>)</span><span>)</span></div></li><li><div> </div></li><li>
<div><span>/* this line compiles just fine */</span></div></li><li><div><span>typedef</span> boost<span>::</span><span>mpl</span><span>::</span><span>push_front</span><span>&lt;</span>employee_1, <span>bool</span><span>&gt;</span><span>::</span><span>type</span> bool_employee_1<span>;</span></div>

</li><li><div> </div></li><li><div><span>/* this fails */</span></div></li><li><div><span>typedef</span> boost<span>::</span><span>mpl</span><span>::</span><span>push_front</span><span>&lt;</span>employee_2, <span>bool</span><span>&gt;</span><span>::</span><span>type</span> bool_employee_2<span>;</span></div>

</li><li><div> </div></li><li><div><span>int</span> main<span>(</span><span>)</span> <span>{</span></div></li><li>
<div>  <span>return</span> <span>0</span><span>;</span></div></li><li><div><span>}</span></div></li></ol></div><br>Thanks!<br>
</blockquote></div><br>