Boost logo

Boost Users :

From: Scott Meyers (usenet_at_[hidden])
Date: 2008-03-26 00:43:10


John Femiani wrote:
> Try this:
>
> template<typename S, typename T>
> struct IndexOf: mpl::distance<typename mpl::begin<S>::type,
> typename mpl::find<S, T>::type
> >
> {};

Brilliant, thanks very much!

Scott


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net