3 pointsby thunderbong8 hours ago1 comment
  • bencornia5 hours ago
    > With this bug, we are in the last case: the Response type is a non-POD struct (due to the std::string data field), so the default constructor is called. Response does not implement a default constructor. This means that the compiler generates a default constructor for us, and in this generated code, each struct field is default initialized. So, the std::string constructor is called for the data field and all is well. Except, the other two fields are not initialized in any way. Oops.