That&#39;s basically what I did in the previous post, the only differences are:<br><br>1) You&#39;re using boosts version of integral (which I didn&#39;t know about), however I could make my integral struct a wrapper for integral_c (since integral_c specifies one additional template parameter that will always be the same in this case).
<br>2) You&#39;re specifying &quot;using namespace&quot; inside of namespace scope, which extends out into global namespace. &#39;using&#39; does not respect namespace scope. This conflicts with a lot of objects I have defined outside of the namespace.
<br><br>Thanks for your help.<br><br><div class="gmail_quote">On Nov 16, 2007 8:22 PM, Cromwell Enage &lt;
<a href="mailto:sponage@yahoo.com" target="_blank">
sponage@yahoo.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>--- Robert Dailey wrote:<br>&gt; So far, this is all I&#39;ve been able to come up with:
<br>&gt;<br>&gt; #include &lt;boost/mpl/map.hpp&gt;<br>&gt; #include &lt;boost/mpl/at.hpp&gt;<br>&gt;<br>&gt; namespace detail<br>&gt; {<br>&gt; &nbsp; &nbsp; template&lt; unsigned int t_value &gt;<br>&gt; &nbsp; &nbsp; struct integral<br>&gt; &nbsp; &nbsp; {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; static const unsigned int value = t_value;<br>&gt; &nbsp; &nbsp; };<br>&gt;<br>&gt; &nbsp; &nbsp; typedef boost::mpl::map&lt;<br>&gt; boost::mpl::pair&lt;float, integral&lt;GL_FLOAT&gt;<br>&gt; &gt;,<br>&gt;<br>&gt; boost::mpl::pair&lt;double, integral&lt;GL_DOUBLE&gt;
<br>&gt; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt; glTypeMap;<br>&gt; };<br>&gt;<br>&gt; template&lt; typename t_type &gt;<br>&gt; struct Vertex<br>&gt; {<br>&gt; &nbsp; &nbsp; static const unsigned int type =<br>&gt; boost::mpl::at&lt;detail::glTypeMap,
<br>&gt; t_type&gt;::type::value;<br>&gt; &nbsp; &nbsp; t_type x, y, z;<br>&gt; };<br><br></div>Try this:<br><br>#include &lt;boost/mpl/integral_c.hpp&gt;<br><div>#include &lt;boost/mpl/map.hpp&gt;<br>#include &lt;boost/mpl/at.hpp&gt;
<br><br>namespace detail {<br></div> &nbsp; &nbsp;using namespace boost;<br> &nbsp; &nbsp;using namespace mpl;<br><br> &nbsp; &nbsp;typedef map&lt;<br> &nbsp; &nbsp; &nbsp; &nbsp;pair&lt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;float<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, integral_c&lt;unsigned int,GL_FLOAT&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;&gt;
<br> &nbsp; &nbsp; &nbsp;, pair&lt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, integral_c&lt;unsigned int,GL_DOUBLE&gt;<br><div> &nbsp; &nbsp; &nbsp; &nbsp;&gt;<br> &nbsp; &nbsp;&gt; glTypeMap;<br><br> &nbsp; &nbsp;template &lt;typename t_type&gt;<br> &nbsp; &nbsp;struct Vertex
<br> &nbsp; &nbsp;{<br> &nbsp; &nbsp; &nbsp; &nbsp;static const unsigned int type =<br></div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;at&lt;glTypeMap,t_type&gt;::type::value;<br><div> &nbsp; &nbsp; &nbsp; &nbsp;t_type x, y, z;<br> &nbsp; &nbsp;};<br></div>} &nbsp;// namespace detail<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HTH,
<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cromwell D. Enage<br><div><br><br><br> &nbsp; &nbsp; &nbsp;____________________________________________________________________________________<br>Be a better pen pal.<br>Text or chat with friends inside Yahoo! Mail. See how. &nbsp;
<a href="http://overview.mail.yahoo.com/" target="_blank">http://overview.mail.yahoo.com/</a><br>_______________________________________________<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org" target="_blank">


Boost-users@lists.boost.org</a><br><a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br></div></blockquote></div><br>