top-level0.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include <boost/parameter.hpp>
  2. namespace test {
  3. BOOST_PARAMETER_NAME(title)
  4. BOOST_PARAMETER_NAME(width)
  5. BOOST_PARAMETER_NAME(titlebar)
  6. BOOST_PARAMETER_FUNCTION((int), new_window, tag,
  7. (required (title,*)(width,*)(titlebar,*))
  8. )
  9. {
  10. return 0;
  11. }
  12. BOOST_PARAMETER_TEMPLATE_KEYWORD(deleter)
  13. BOOST_PARAMETER_TEMPLATE_KEYWORD(copy_policy)
  14. template <typename T>
  15. struct Deallocate
  16. {
  17. };
  18. struct DeepCopy
  19. {
  20. };
  21. struct Foo
  22. {
  23. };
  24. template <typename T, typename A0, typename A1>
  25. struct smart_ptr
  26. {
  27. smart_ptr(test::Foo*)
  28. {
  29. }
  30. };
  31. }
  32. #include <boost/core/lightweight_test.hpp>
  33. int main()
  34. {
  35. char const* alert_s = "alert";
  36. int x = test::new_window(alert_s, test::_width=10, test::_titlebar=false);
  37. test::Foo* foo = new test::Foo();
  38. test::smart_ptr<
  39. test::Foo
  40. , test::deleter<test::Deallocate<test::Foo> >
  41. , test::copy_policy<test::DeepCopy>
  42. > p(foo);
  43. delete foo;
  44. return boost::report_errors();
  45. }