Lines Matching refs:Y2
75 struct Y2 struct
81 Y2() noexcept: v(0) { ++instances; } in Y2() argument
82 explicit Y2(int v) noexcept: v(v) { ++instances; } in Y2() function
83 Y2(Y2 const& r) noexcept: v(r.v) { ++instances; } in Y2() argument
84 Y2(Y2&& r) noexcept: v(r.v) { ++instances; } in Y2() argument
86 ~Y2() noexcept { --instances; } in ~Y2() argument
88 Y2& operator=( Y2 const& r ) noexcept { v = r.v; return *this; } in operator =() argument
89 Y2& operator=( Y2&& r ) noexcept { v = r.v; return *this; } in operator =() argument
92 int Y2::instances = 0;
117 BOOST_TEST_EQ( Y2::instances, 0 ); in main()
120 variant<Y1, Y2> v; in main()
123 BOOST_TEST_EQ( Y2::instances, 0 ); in main()
126 variant<Y1, Y2> v2; in main()
128 BOOST_TEST_EQ( Y2::instances, 0 ); in main()
132 BOOST_TEST_EQ( Y2::instances, 0 ); in main()
134 v2 = Y2{1}; in main()
136 BOOST_TEST_EQ( Y2::instances, 1 ); in main()
140 BOOST_TEST_EQ( Y2::instances, 2 ); in main()
144 BOOST_TEST_EQ( Y2::instances, 1 ); in main()
149 BOOST_TEST_EQ( Y2::instances, 0 ); in main()
151 v.emplace<Y2>(); in main()
154 BOOST_TEST_EQ( Y2::instances, 1 ); in main()
158 BOOST_TEST_EQ( Y2::instances, 0 ); in main()