File indexing completed on 2024-05-05 05:41:40
0001 struct Test 0002 { 0003 Test() {} 0004 ~Test() { } 0005 0006 Test(const Test &) {} 0007 Test& operator=(const Test&) = default; 0008 }; 0009 0010 void test() 0011 { 0012 Test t; 0013 Test t2; 0014 t = t2; // OK, the developer explicitly says he wants the default copy-assign op 0015 } 0016 0017 struct Test2 0018 { 0019 Test2() {} 0020 ~Test2() { } 0021 0022 Test2(const Test2 &) {} 0023 }; 0024 0025 void test2() 0026 { 0027 Test2 t; 0028 Test2 t2; 0029 t = t2; // Warn 0030 }