Class template Function template. Inline assembly. Declarations Overview declaration syntax decl-specifier-seq declarator Specifiers typedef. It does not introduce a new type and it cannot change the meaning of an existing type name. There is no difference between a type alias declaration and typedef declaration. This declaration may appear in block scope, class scope, or namespace scope. Run this code. Compiler support. Freestanding and hosted.
Language support library. Technical specifications. Flow control. Function declaration. Lambda function expression. Fundamental types. Function types. Compound types. Storage duration specifiers. Default initialization. Value initialization.
Zero initialization. Skip to content. Change Language. Related Articles. Table of Contents. Improve Article. Save Article. Like Article. Output i and j are of similar type j and c are of different type. Output: ti1 is of type f ti2 is of type i ti3 is of type c. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Using typeid to check for template type Ask Question. Asked 7 years, 4 months ago.
Active 7 years, 4 months ago. Viewed 13k times. Thanks for your help. Improve this question. It sounds like you want template specialization. Or even just overloading. I think that overloading would do the trick.
Thanks a lot But is it safe to use typeid in this context? So it is a No I suppose : Thanks — tvery Show 1 more comment. Active Oldest Votes.
0コメント