Gennaro Prota <[EMAIL PROTECTED]> writes: > On Sun, 09 Mar 2003 09:11:05 -0500, David Abrahams > <[EMAIL PROTECTED]> wrote: > >>Gennaro Prota <[EMAIL PROTECTED]> writes: >> >>> On Sat, 08 Mar 2003 15:31:58 -0500, David Abrahams >>> <[EMAIL PROTECTED]> wrote: >>> >>> >>>>"Make 'em MPL-compatible metafunctions." >>> ^^^ >>> |---- which ones? >> >>All of the traits. For example: >> >>template <class T> >>struct const_min >> : integral_c<T, /* calculate the value */> >>{}; > > > Well, why hardcoding that dependency?
You don't have to; it was just an example implementation. Another implementation would be: template <class T> struct const_min { BOOST_STATIC_CONSTANT(T, value = /*whatever*/); typedef const_min<T> type; typedef T value_type; }; > At most I would see the mpl > versions *in addition* to the ordinary ones. Of course, the former can > be constructed upon the latter by the user > > > template <typename T> > struct mpl_const_min : > integral_c<T, const_min<T> :: value > {}; > > > and everyone pays only for what he/she uses. Users also end up paying for what the library didn't provide. >>> PS: why the quotes? :-) >> >>I couldn't resist (?) > > > I still don't understand... it must be one of those C++ programmers > eccentricities ;-) Bingo. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost