面试coding的时候需要考虑Exception safety/constness吗?# JobHunting - 待字闺中
p*n
1 楼
比如实现BST的时候,内部节点用auto_ptr或者shared_ptr封装起来,避免naked
pointer;用copy_and_swap idiom(from effective c++)实现exception safety;
member function尽量用const,etc
还是说为了突出BST的算法而尽量简化代码?
Thanks
pointer;用copy_and_swap idiom(from effective c++)实现exception safety;
member function尽量用const,etc
还是说为了突出BST的算法而尽量简化代码?
Thanks