1 2 #include <boost/parameter.hpp> 3 #include <iostream> 4 5 using namespace boost::parameter; 6 7 BOOST_PARAMETER_NAME(arg1) 8 9 struct somebody 10 { 11 BOOST_PARAMETER_MEMBER_FUNCTION( 12 (void), static f, tag, (optional (arg1,(int),0)) 13 ) 14 { 15 std::cout << arg1 << std::endl; 16 } 17 }; 18 19 #include <boost/core/lightweight_test.hpp> 20 main()21int main() 22 { 23 somebody::f(); 24 somebody::f(4); 25 return boost::report_errors(); 26 } 27 28