[C++-sig] Re: [Pyste] template instantiation with a user defined type

David Abrahams dave at boost-consulting.com
Fri Apr 8 16:54:14 CEST 2005


Jaroslav Gresula <jgresula at seznam.cz> writes:

> I have a problem with the following scenario:
>
> // -- file type.h
> class Type {};
>
> // -- file template.h
> template<class T>
> class Templ
> {
>   T m_data;
> };
>
> // -- test.pyste
> Type = Class( "Type", "type.h" )
> Templ = Template( "Templ", "template.h" )
> Templ( "Type" )
>
>
> When I run Pyste, it internally creates the following temporary file:
> // -- ~temporary
> #include "c:\absolute\path\to\template.h"
>
> typedef Templ< Type > Templ_Type;
> void __instantiate_Templ_Type()
       ^^

I know this has no relevance to your problem, but all identifiers
containing double underscores are reserved to the C++ implementation.
Pyste should never be generating such names.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list