
28 Feb
2011
28 Feb
'11
12:43 p.m.
On 28/02/2011 04:07, Lorenzo Caminiti wrote:
Hello all,
Before I spend 2+ weeks updating Boost.Local docs... can you please express an opinion about Boost.Local new and simplified syntax?
If variadic macros are supported by your compiler:
#include<boost/local/function.hpp> #include<iostream>
int main() { double sum = 0.0; int factor = 10;
void BOOST_LOCAL_FUNCTION_PARAMS(double num, const bind factor, bind& sum) { sum += factor * num; std::clog<< "Summed: "<< sum<< std::endl; } BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0); return 0; }
Nice!