C++
C++11/C++14
hushui
Coding Since 1998
展开
-
Google C++ Unit test sample
[lake@localhost source]$ git clone -b v1.8.x --depth 1 https://github.com/google/googletest.git Cloning into 'googletest'... remote: Enumerating objects: 369, done. remote: Counting objects: 100% (369/369), done. remote: Compressing objects:...原创 2021-09-14 14:50:09 · 627 阅读 · 0 评论 -
make_unique for c++11
// for c++ 11 as make_unique is only specified in c++ 14 template<typename T, typename... Args> std::unique_ptr<T> make_unique(Args&&... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); }原创 2021-09-07 09:41:05 · 234 阅读 · 0 评论 -
STL container value types can‘t be reference
No. STL container value types need to be assignable. References are not assignable. (You cannot assign them a different object to reference.)原创 2021-09-08 08:41:00 · 106 阅读 · 0 评论