读书笔记 effective modern c++
判断一个表达式是lvalue or rvalue
A useful heuristic to determine whether an expression is an lvalue is to ask if you can take its address. If you can, it typically is. If you can’t, it’s usually an rvalue.
一般情况下, 可以根据以上所述进行判断。
关于exception safe
如果一个函数是exception safe的,则它表示提供basic exception safety guarantee ,至少要保证:即使函数有exception抛出,pragram invariants remain intact(比如: 没有数据结构出错) and no resources are leaked 如果函数提供strong exception safety guarantee, 则保证:if an exception arises, the state of the program remains as it was prior to the call.
decltype
int x = 0