Ticket #11141: test_noncopyable2.cpp

File test_noncopyable2.cpp, 335 bytes (added by Andreas Fenkart <afenkart@…>, 8 years ago)

boost::noncopyable correctly working

Line 
1
2#include <iostream>
3#include <vector>
4
5#include <boost/noncopyable.hpp>
6
7class Foo : private boost::noncopyable
8{
9public:
10 Foo() {};
11};
12
13class DerivedCopy : public Foo
14{
15public:
16 DerivedCopy() : Foo() {}
17};
18
19int main()
20{
21 std::cout << "Hello World\n";
22 DerivedCopy f;
23 std::cout << "Now copy the thing\n";
24 DerivedCopy g(f);
25}