|
Boost Users : |
Subject: [Boost-users] [lambda] Serialising Lmanda functions
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2008-10-07 11:57:14
Is there a 'standard' solution to this problem?
#include <list>
#include <iostream>
#include "boost/lambda/lambda.hpp"
typedef std::list<unsigned> List;
std::ostream & operator<<( std::ostream & s, const List & );
int main( )
{
using namespace boost::lambda;
List my_list;
( std::cout << _1 << "\n" )( my_list );
}
The compiler cannot find a match for operator<<() because the operator
and the type are defined in different namespaces, but it's really a
nuisance!
- Rob.
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