
Hi All, I am reading about the lazy evaluation and nullary metafunction in the MPL book. While discussing the lazy evaluation technique the following code is presented (page 57): struct add_pointer_f { template <class T> struct apply : boost::add_pointer<T> {}; }; typedef mpl::vector<int, char*, double&> seq; typedef mpl::transform<seq, boost::add_pointer<_> > calc_ptr_seq; The point of the above code was to demonstrate that the nullary metafunction calc_ptr_seq represents the sequence "int*, char**, double&*", even though the last element in that sequence is not valid. Thanks to lazy evaluation. As long as we don't access the third element in the sequence represented by calc_ptr_seq, everything should work fine. Is my understanding correct? Also, other than nullary metafunction, is there any other approach to lazy evaluation? Or will lazy evaluation _always_ be implemented with the help of nullary metafunction? Thank you. Rgds, anna