std::string in struct - Copy/assignment issues?

前端 未结 4 820
甜味超标
甜味超标 2020-12-19 10:10

Suppose I have a struct containing a std::string, like this:

struct userdata{
        int uid;
        std::string username;
    }

Do I nee

4条回答
  •  别那么骄傲
    2020-12-19 10:58

    You don't have to do anything special. C++ (and the implementation of STL) define this to just work.

提交回复
热议问题