C++ std::vector::emplace_back doesn't compile with string-value class

后端 未结 0 1723
情歌与酒
情歌与酒 2020-12-20 18:00
/* Item.h */
struct Item {
    std::string name;

    Item(std::string _name) : name( std::move(_name) ) { }
};

/* main.cpp */
/* ... */
const int amount_of_items =         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题