C plus plus 需要学习的知识点 - shigaopb/doc GitHub Wiki

1、移动语义(move,forward) 左值:有标识符,可取地址;纯右值:没有标识符,不能取地址,不能放在赋值运算符左边(lamba表达式是纯右值) std::move()强制转换为右值的引用。 2、lambda表达式 3、初始化列表(std::initializer_liststd::stringls) 4、类型推导(auto,decltype) 5、内存模型(sequential consistency;Total Store Ordering;memory_order_seq_cst;Acquire-Release;memory_order_acquire;memory_order_release;memory_order_acq_rel;Release-Consume;memory_order_relaxed;) 6、智能指针:shared_ptr;unique_ptr;weak_ptr;使用make_shared,make_unique初始化智能指针的效率比shard_ptr,unique_ptr高。但如果要自己定义清理内存的函数,就要使用shard_ptr,unique_ptr 7、并发编程:atomic;thread;mutex;condition_varibable;future;库 加锁 std::lock_guard;