So if I explicitly list the template parameters, does it work? Hmmm...
No, this doesn't work:
for_each(ell.begin(), ell.end(), cout << _1 << endl
); I was hopeful --- I'm pretty sure I have the syntax right. I'm simply curious now: is it possible to make this work?
Explicit specialization should work, just tested under gcc3.2.
Here's another option, a helper function manip
that takes a stream and a manipulator and chooses the appropriate
instantiation of the endl template. Much nicer to just give the stream
object rather than the stream template args:
#include "boost/lambda/lambda.hpp"
#include <iostream>
namespace boost {
namespace lambda {
template
Ken -- Ken Yarnall Dept. of Mathematical Sciences Lebanon Valley College Assoc. Professor of Math and CS (717)867-6085 yarnall@lvc.edu
Yahoo! Groups Sponsor ADVERTISEMENT [d_300x250_071_4for49_1.gif]
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
-- -- -- Jaakko Järvi email: jajarvi@cs.indiana.edu -- Post Doctoral Fellow phone: +1 (812) 855-3608 -- Pervasive Technology Labs fax: +1 (812) 855-4829 -- Indiana University, Bloomington