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