----- Original Message ----- From: "Terje Slettebų" <[EMAIL PROTECTED]>
> > And since there are techniques for making out-of-class definitions easier > > (and automatic), which may be instantiated if needed, like you showed, then > > static const seems clearly best. > > That's not nearly so easy to take care of if the metafunction in > question is something like alignment_of<T> which could potentially > have lots of values, depending on the T chosen. <quote> In what way would this affect Paul's suggestion: template<class T, T V> struct map_integral { static const T value = V; }; template<class T, T V> const T map_integral<T, V>::value; By the way, this could have been done with mpl::integral_c, as well, provided the out-of-class definition is given. Do you maybe refer to that each value may take up space in the executable, if used in such a way that instantiation is needed? That's right, and that's not the case for enum. Still, there are the issues for enum, as well. </quote> You would have to have more than one "map_integral" with a different value name, where the values are dependent on one another and are part of the public interface. It isn't a complete solution, but it does work in most cases. Paul Mensonides _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost