例1:
void f() {}
int main()
{
using FunctionPtr = void (*)(); //相当于 typedef void (*FunctionPtr)();
FunctionPtr ptr = f;
}
例2:
typedef unsigned char u1;
typedef unsigned short u2;
using u4 = uint32_t;
using u8 = uint64_t;
例3:
using line_no = std::vector<string>::size_type;
相当于:typedef vector<string>::size_type line_no;
例4:
typedef std::unique_ptr<std::unordered_map<std::string, std::string>> UPtrMapSS;
using UPtrMapSS = std::unique_ptr<std::unordered_map<std::string, std::string>>;