///< 構(gòu)造函數(shù)調(diào)用
///---> 1. 調(diào)用所有虛基類的構(gòu)造函數(shù)鉴吹, 從左到右叁执, 又深到淺
//? ? ? ? ? a.列入初始化列表中的成員初始化
//? ? ? ? ? b.未列入初始化列表的成員奈揍,對(duì)象調(diào)用默認(rèn)構(gòu)造函數(shù)
//? ? ? ? ? c.初始化vfptr, vbfptr
///---> 2. new expression, operator new , placement new
///? ? ? ? a. new A() (三個(gè)步驟)
//? ? ? ? ? ? ? ---> operator new (sizeof(A))
//? ? ? ? ? ? ? ---> ctor()
//? ? ? ? ? ? ? ---> assign addr to pointer
///---> 3. delete 野指針情況
///---> 4. virtual 析構(gòu)函數(shù)嗽桩, 在基類指向子類的情況下析構(gòu)爸邢,析構(gòu)時(shí)需要調(diào)用子類的析構(gòu)函數(shù)
///c++11引用綁定規(guī)則:
// a. 非常量左值引用(X&) : 只能綁定到X類型的對(duì)象
// b. 常量左值引用(const X&) : 可以綁定到X浆西, const X類型的左值對(duì)象,也可以綁定X,const X的右值對(duì)象
// c. 非常量右值引用(X&&) : 只能綁定到X類型的右值
// d. 常量右值引用(const X&&) : 可以綁定到X汰蓉,const X類型的右值
? ? int i = 0;?
? ? const int ii = 0;
? ? int &j = i;? ? ? ? ? ? ? ? ? ? ///> a
? ? const int& k = i;? ? ? ? ? ? ? ///> b
? ? const int& g = 101;? ? ? ? ? ? ///> b
? ? const int& m = std::move(i);? ? ///> b
? ? const int& m0 = ii;? ? ? ? ? ? ///> b
? ? int &&n = std::move(i);? ? ? ? ///> c
? ? int &&o = 102;? ? ? ? ? ? ? ? ? ///> c
? ? int &&o1 = (i + k);? ? ? ? ? ? ///> c
? ? const int&& p = std::move(i);? ///> d
? ? const int&& q = 103;? ? ? ? ? ? ///> d
? ? const int&& r = static_cast<int&&>(i);
/// 引用疊加
//? Type& &? ? -->? ? Type&
//? Type& &&? ? -->? ? Type&
//? Type&& &? ? -->? ? Type&
//? Type&& &&? -->? ? Type&&
//? eg:
//? ? ? template<typename T> void func(T&& f);
//? ? ? auto fp = func<int&&>();
//? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ---> decaltype(fp) -> void (*)(int&& && f);
//? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ---> void (*)(int&& f);