Lines Matching refs:X2
37 struct X2 struct
43 X2(): v(0) { ++instances; } in X2() function
44 explicit X2(int v): v(v) { ++instances; } in X2() argument
45 X2(X2 const& r): v(r.v) { ++instances; } in X2() function
46 X2(X2&& r): v(r.v) { ++instances; } in X2() argument
48 ~X2() noexcept { --instances; } in ~X2() argument
50 X2& operator=( X2 const& r ) { v = r.v; return *this; } in operator =() argument
51 X2& operator=( X2&& r ) { v = r.v; return *this; } in operator =() argument
54 int X2::instances = 0;
161 BOOST_TEST_EQ( X2::instances, 0 ); in main()
164 variant<X1, X2> v; in main()
167 BOOST_TEST_EQ( X2::instances, 0 ); in main()
170 variant<X1, X2> v2; in main()
172 BOOST_TEST_EQ( X2::instances, 0 ); in main()
176 BOOST_TEST_EQ( X2::instances, 0 ); in main()
178 v2 = X2{1}; in main()
180 BOOST_TEST_EQ( X2::instances, 1 ); in main()
184 BOOST_TEST_EQ( X2::instances, 2 ); in main()
188 BOOST_TEST_EQ( X2::instances, 1 ); in main()
193 BOOST_TEST_EQ( X2::instances, 0 ); in main()
195 v.emplace<X2>(); in main()
198 BOOST_TEST_EQ( X2::instances, 1 ); in main()
202 BOOST_TEST_EQ( X2::instances, 0 ); in main()