static-member-functions0.cpp 424 B

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