c++ big three

886 ワード

   (  :rule of three,the Law of The Big Three,The Big Three;   ,    )  C++      ,                  ,        ,                   ,                        ,              。:

    (Destructor)
      (copy constructor)
       (copy assignment operator)

              ,                   ,             ,           。   ,                  ,                             。   (Rule of three)         Marshall Cline   1991     。

          ,          RAII(          ,Resource Acquisition Is Initialization),               (          ,The Law of The Big Two[3])。
      (  :implicitly-generated;        )                            [4],           ,              ,     ,                   ,                 ,               (  :         ),            (  :explicit;            )      ,         。

PS.
      ,                     ,            ,            ,