File indexing completed on 2024-04-28 05:38:40

0001 
0002 
0003 struct ValueClass // OK
0004 {
0005     int m;
0006 };
0007 
0008 struct DerivedValueClass : public ValueClass // OK
0009 {
0010     int m;
0011 };
0012 
0013 struct PolymorphicClass1 // OK, not copyable
0014 {
0015     virtual void foo();
0016     PolymorphicClass1(const PolymorphicClass1 &) = delete;
0017     PolymorphicClass1& operator=(const PolymorphicClass1 &) = delete;
0018 };
0019 
0020 struct PolymorphicClass2 // OK, not copyable
0021 {
0022     virtual void foo();
0023 private:
0024     PolymorphicClass2(const PolymorphicClass2 &);
0025     PolymorphicClass2& operator=(const PolymorphicClass2 &);
0026 };
0027 
0028 struct PolymorphicClass3 // OK, not copyable
0029 {
0030     virtual void foo();
0031     PolymorphicClass3(const PolymorphicClass3 &) = delete;
0032 private:
0033     PolymorphicClass3& operator=(const PolymorphicClass3 &) = delete;
0034 };
0035 
0036 struct PolymorphicClass4 // Warning, copyable
0037 {
0038     virtual void foo();
0039     PolymorphicClass4(const PolymorphicClass4 &);
0040     PolymorphicClass4& operator=(const PolymorphicClass4 &);
0041 };
0042 
0043 struct PolymorphicClass5 // Warning, copyable
0044 {
0045     virtual void foo();
0046 };
0047 
0048 struct DerivedFromNotCopyable : public PolymorphicClass3 // OK, not copyable
0049 {
0050 };
0051 
0052 struct DerivedFromCopyable : public PolymorphicClass4 // Warning, copyable
0053 {
0054 };
0055 
0056 class ClassWithPrivateSection
0057 {
0058 public:
0059     virtual void foo();
0060 private:
0061     void bar();
0062     int i;
0063 };