On 2010/6/2 Andre Espaze wrote:
> Hello Denis,
>
> On Wed, Jun 02, 2010 at 10:30:15AM +0200, Denis Barbier wrote:
>> On 2010/6/2 Andre Espaze wrote:
>> > It is finally not necessary to build the module with the -g option,
>> > I have enclosed a patch that disable the GetIDMapper function inlining
>> > when built with g++ and optimizations.
>>
>> I am no C++ expert, but this looks very similar to
>>    http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13
>> and it is thus not clear whether this is really a g++ bug.
>> Here is a different fix, I tested this approach with Andre's
>> test.cpp, but not with salome.
> Thank you very much for the suggestion, it works but it seems to
> me that you forgot a 'template' keyword before the symbol export.

Oops, you are fully right, sorry.  A new patch is attached for reference.

> I have enclosed a patch tested on my machine, fell free to correct
> it if I was wrong.
[...]

I do not understand why you added #if tests, just adding 'template' at
the very beginning is enough.  It was not explicit in my previous
mail, but I tried to find an alternative solution because your's works
only with g++, and you will need those #if tests if you want to
forward it upstream.  OTOH mine is portable, and it could be adopted
more easily by upstream, I guess.  Within Debian, which patch is
checked in does not matter.

Denis

Attachment: instantiation2.patch
Description: application/empty

Reply via email to