Lines Matching defs:copies
40 // Particularly important in this test to ensure no copies are made.
52 // Particularly important in this test to ensure no copies are made.
97 // Used for probing the number of copies and moves that occur if a type must be
100 DerivedCopyMoveCounter(int* copies,
104 : copies_(copies),
114 // Used for probing the number of copies and moves in an argument.
117 CopyMoveCounter(int* copies,
121 : copies_(copies),
142 // Probing for copies from coercion.
182 int copies() const {
193 // Used for probing the number of copies in an argument. The instance is a
197 CopyCounter(int* copies, int* assigns)
198 : counter_(copies, assigns, nullptr, nullptr) {}
207 int copies() const { return counter_.copies(); }
281 return counter.copies();
735 int copies = 0;
739 CopyMoveCounter counter(&copies, &assigns, &move_constructs, &move_assigns);
743 EXPECT_EQ(0, copies);
899 int copies = 0;
902 CopyCounter counter(&copies, &assigns);
904 EXPECT_EQ(1, copies);
907 copies = 0;
909 Bind(&VoidPolymorphic<CopyCounter>::Run, CopyCounter(&copies, &assigns));
910 EXPECT_EQ(1, copies);
913 copies = 0;
916 EXPECT_EQ(2, copies);
919 copies = 0;
921 Bind(&VoidPolymorphic<CopyCounter>::Run).Run(CopyCounter(&copies, &assigns));
922 EXPECT_EQ(1, copies);
925 copies = 0;
927 DerivedCopyMoveCounter derived(&copies, &assigns, nullptr, nullptr);
929 EXPECT_EQ(2, copies);
932 copies = 0;
936 DerivedCopyMoveCounter(&copies, &assigns, nullptr, nullptr)));
937 EXPECT_EQ(2, copies);
977 int copies = 0;
982 CopyMoveCounter counter(&copies, &assigns, &move_constructs, &move_assigns);
984 EXPECT_EQ(1, copies);
989 copies = 0;
994 CopyMoveCounter(&copies, &assigns, &move_constructs, &move_assigns));
995 EXPECT_EQ(0, copies);
1000 copies = 0;
1005 EXPECT_EQ(1, copies);
1010 copies = 0;
1015 .Run(CopyMoveCounter(&copies, &assigns, &move_constructs, &move_assigns));
1016 EXPECT_EQ(0, copies);
1021 DerivedCopyMoveCounter derived_counter(&copies, &assigns, &move_constructs,
1023 copies = 0;
1029 EXPECT_EQ(1, copies);
1034 copies = 0;
1040 &copies, &assigns, &move_constructs, &move_assigns)));
1041 EXPECT_EQ(0, copies);