C++11: deleted copy control

這裏寫圖片描述

// Because the copy constructor is defined, the compiler will not syn-
// thesize a move constructor for class B. As a result, we can neithe-
// r move nor copy objects of type B. If a class derived from B wante-
// d to allow its objects to be copied or moved, that derived class w-
// ould have to defined its own versions of these construtors.
// ---from C++ primer 5th(p.624)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章