Re: Problems with templates ???

Serge Iovleff <[email protected]>
Newsgroups gmane.comp.documentation.synopsis
Organization Université de Lille 1
Message-ID <[email protected]>
Hi Stefan,

> thanks. Yes, your code exposes a bug in the current parser,
> so I submitted a bug report (http://synopsis.fresco.org/issues/bug43).
> I'm working on a new implementation for symbol lookup, replacing
> the problematic code. However, I'll try to come up with a short-term
> solution, too, as the bug seems quite serious.
With synopsis v0.5 the result was correct : except the dummy and prev...
but, I recall I use the option -Wp,-g in order to obtain this result.

> 
> In a related note: you include the '.cpp' files containing
> your template function definitions. You may consider removing
> the 'using namespace' directives at the top of these files, as
> they pollute your global namespace, probably not quite what you want.
> 

In fact with old version of gcc (and many other compiler) it was not
possible to pre-compile the implementation for template class definition.
Thus I had to include the impementation in the declaration and then to
include the resulting file in the program using the template class.

If the namespace STK is used for the declaration of "Myclass,
in the implementation I don't want to write STK::MyClass,
thus I think taht the 'using namespace' directive is not misplaced.

Thanks,
Serge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.