コード例 #1
0
 void Assign(const Optional& other)
 {
     if (other.IsInit())
     {
         Copy(other.m_data);
         m_hasInit = true;
     }
     else
     {
         Destroy();
     }
 }
コード例 #2
0
 Optional(const Optional& other)
 {
     if (other.IsInit())
         Assign(other);
 }