That's basically what I did in the previous post, the only differences are:<br><br>1) You're using boosts version of integral (which I didn'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're specifying "using namespace" inside of namespace scope, which extends out into global namespace. 'using' 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 < <a href="mailto:sponage@yahoo.com" target="_blank"> sponage@yahoo.com</a>> 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>> So far, this is all I've been able to come up with: <br>><br>> #include <boost/mpl/map.hpp><br>> #include <boost/mpl/at.hpp><br>><br>> namespace detail<br>> {<br>> template< unsigned int t_value ><br>> struct integral<br>> { <br>> static const unsigned int value = t_value;<br>> };<br>><br>> typedef boost::mpl::map<<br>> boost::mpl::pair<float, integral<GL_FLOAT><br>> >,<br>><br>> boost::mpl::pair<double, integral<GL_DOUBLE> <br>> ><br>> > glTypeMap;<br>> };<br>><br>> template< typename t_type ><br>> struct Vertex<br>> {<br>> static const unsigned int type =<br>> boost::mpl::at<detail::glTypeMap, <br>> t_type>::type::value;<br>> t_type x, y, z;<br>> };<br><br></div>Try this:<br><br>#include <boost/mpl/integral_c.hpp><br><div>#include <boost/mpl/map.hpp><br>#include <boost/mpl/at.hpp> <br><br>namespace detail {<br></div> using namespace boost;<br> using namespace mpl;<br><br> typedef map<<br> pair<<br> float<br> , integral_c<unsigned int,GL_FLOAT><br> > <br> , pair<<br> double<br> , integral_c<unsigned int,GL_DOUBLE><br><div> ><br> > glTypeMap;<br><br> template <typename t_type><br> struct Vertex <br> {<br> static const unsigned int type =<br></div> at<glTypeMap,t_type>::type::value;<br><div> t_type x, y, z;<br> };<br></div>} // namespace detail<br><br> HTH, <br> Cromwell D. Enage<br><div><br><br><br> ____________________________________________________________________________________<br>Be a better pen pal.<br>Text or chat with friends inside Yahoo! Mail. See how. <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>