From: peter lin on
Hi Group,

Is there an compiler option can be set to view/generate the result
of template instantiation?
The option should be similiar to "/E (Preprocess to stdout)"

Best regards,
Lin
From: Carl Daniel [VC++ MVP] on
peter lin wrote:
> Hi Group,
>
> Is there an compiler option can be set to view/generate the result
> of template instantiation?
> The option should be similiar to "/E (Preprocess to stdout)"

No.

-cd


From: peter lin on
On Jun 5, 12:51 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...(a)mvps.org.nospam> wrote:
> peter lin wrote:
> > Hi Group,
>
> >    Is there an compiler option can be set to view/generate the result
> > of template instantiation?
> >    The option should be similiar to "/E (Preprocess to stdout)"
>
> No.
>
> -cd

Thanks. Do you know any compiler provide this?

Best regards,
Lin
From: Ben Voigt [C++ MVP] on
Carl Daniel [VC++ MVP] wrote:
> peter lin wrote:
>> Hi Group,
>>
>> Is there an compiler option can be set to view/generate the result
>> of template instantiation?
>> The option should be similiar to "/E (Preprocess to stdout)"
>
> No.

Unlike macros, templates are not substituted as C++ source code, but during
compilation. So the result of instantiation is object code.

Turning on the mixed source/assembler listing in the output file options
should show the instantiated code.

>
> -cd


 | 
Pages: 1
Prev: Classes
Next: Need help with templates and VC6