1 | #include <boost/parameter/name.hpp>
|
---|
2 | #include <boost/parameter/preprocessor.hpp>
|
---|
3 |
|
---|
4 | BOOST_PARAMETER_NAME(tag_1)
|
---|
5 |
|
---|
6 | struct A {
|
---|
7 | A() = default;
|
---|
8 | A(const A&) = delete;
|
---|
9 | A(A&&) = delete;
|
---|
10 | };
|
---|
11 |
|
---|
12 | struct constructor_impl {
|
---|
13 | template<typename ArgumentPack>
|
---|
14 | constructor_impl(ArgumentPack const&)
|
---|
15 | {
|
---|
16 | }
|
---|
17 | };
|
---|
18 |
|
---|
19 | struct B :
|
---|
20 | private constructor_impl
|
---|
21 | {
|
---|
22 | BOOST_PARAMETER_CONSTRUCTOR(
|
---|
23 | B,
|
---|
24 | (constructor_impl),
|
---|
25 | tag,
|
---|
26 | (required
|
---|
27 | (in_out(tag_1), (A))
|
---|
28 | )
|
---|
29 | )
|
---|
30 | };
|
---|
31 |
|
---|
32 | int main()
|
---|
33 | {
|
---|
34 | A a;
|
---|
35 | B b(a);
|
---|
36 | }
|
---|
37 |
|
---|