我正在通过Nicolai M. Josuttis的“C++标准库(第二版)”阅读,刚刚到达std::pair部分。作者指出: 由于C++ 11,pair<>使用只有非恒定拷贝构造函数的类型将不再编译。 他接着给下面的例子: class A
{
public:
...
A(A&); // copy constructor with nonconstant refere
我有一个下面的类: class Op
{
private:
std::vector<std::string> m_operands;
std::string m_op;
public:
Op(std::string op = "") : m_op(op){}
std::string GenCode();
vo