c++ - Taking type of a template class -


Is there a way to take the type of a template class, for example

  / / I have a template function template & lt; Typename T & gt; IData * createData (); // a template class example std :: vector & lt; Int & gt; a; // The type of this example is imaginary in any other template / quotation mark / part: D idtime * newData = createData & lt; "TypeOf (A)" & gt; ();  

Is it possible in C ++? Or a shortcut option

yes - use

  IData * NewData = createData & lt; Typef (A)> ();  

The new standard ( C ++ 0x ) will provide a built-in method for this.

Note that you can

  template < Typename T & gt; DDA  A dummy-logic that can be used to estimate compiler type. IData * createData (Constant and Dummy); IData * newData = createData (A);  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -