$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [lambda] Understanding placeholders
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-01-15 09:24:56
Why is this wrong?
#include "boost/lambda/lambda.hpp"
#include "boost/lambda/bind.hpp"
#include <iostream>
int main( )
{
using namespace boost :: lambda;
int i = 2, j = 3;
bind( bind( protect( _1 = _2 ), _2, _1 ), _1, _2 )( i, j );
std :: cout << "i = " << i << ", j = " << j << "\n";
}
Thanks, Rob.