MCPcopy Create free account
hub / github.com/boostorg/leaf / throws_on_copy

Class throws_on_copy

test/optional_test.cpp:55–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54#ifndef BOOST_LEAF_NO_EXCEPTIONS
55class throws_on_copy
56{
57 throws_on_copy & operator=( throws_on_copy const & )=delete;
58
59public:
60
61 int value;
62
63 throws_on_copy()
64 {
65 BOOST_TEST(++object_count>0);
66 }
67
68 throws_on_copy( throws_on_copy const & )
69 {
70 throw std::exception();
71 }
72
73 throws_on_copy( throws_on_copy && )
74 {
75 BOOST_TEST(++object_count>0);
76 }
77
78 ~throws_on_copy()
79 {
80 BOOST_TEST(--object_count>=0);
81 }
82};
83#endif
84
85void run_tests()

Callers 1

run_testsFunction · 0.85

Calls

no outgoing calls

Tested by 1

run_testsFunction · 0.68