简体   繁体   中英

C++ Use alias for 'typename'?

I'm working with templates, and it's getting kinda tedious to write "typename" multiple times. Is it possible to assign an alias to it? I understand that the below doesn't work, is there any other ways?

typedef typename tn;

You might use MACRO

#define tn typename

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM