Ticket #7763: boost_parameter_issue.cpp

File boost_parameter_issue.cpp, 510 bytes (added by John Bytheway <jbytheway+boost@…>, 10 years ago)

Example C++ source demonstrating the issue

Line 
1#include <boost/parameter/name.hpp>
2#include <boost/parameter/preprocessor.hpp>
3
4BOOST_PARAMETER_NAME(tag_1)
5
6struct A {
7 A() = default;
8 A(const A&) = delete;
9 A(A&&) = delete;
10};
11
12struct constructor_impl {
13 template<typename ArgumentPack>
14 constructor_impl(ArgumentPack const&)
15 {
16 }
17};
18
19struct 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
32int main()
33{
34 A a;
35 B b(a);
36}
37