一、using-directives(打开命名空间)
using namespace std;
using std::cout;
using Base::date; //(Base为类名)
二、type alias
using value_type = _Ty;
using allocator_type = _Alloc;
using pointer = typename _Mybase::pointer;
using const_pointer = typename _Mybase::const_pointer;
using reference = _Ty&;
using const_reference = const _Ty&;
//或
typedef Memory::TSharedPtr<ICamera> ICameraPtr;
using CameraObjSptr = Dahua::GenICam::ICameraPtr;
三、Alias template
template<typename T>
using Vec = std::vector<T,MyAlloc<T>>;
Vec<int> coll;
如有错误或不足欢迎评论指出!创作不易,转载请注明出处。如有帮助,记得点赞关注哦(⊙o⊙)
更多内容请关注个人博客:https://blog.csdn.net/qq_43148810