Fwd: Overloaded function called from template.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(I'm not used to gmail, accidentally replied to Eljay only.)

Certainly.  I didn't know if you wanted code like that on the list at first.

The issue in question happens without namespaces, but there are in
there for purposes of testing what we saw in our code.

The same error occurs with the templated method, or templated class.
I call it an error because I did not see anything specific changed for
this in 3.4 *other* than the two-pass.  If that change *properly*
affects code like this, that's what I am here to find out.  If there
is a spec. note on this order.

corey


On Thu, 20 Jan 2005 06:34:27 -0600, Eljay Love-Jensen <eljay@xxxxxxxxx> wrote:
> Hi Corey,
>
> I was unable to reproduce your issue.
>
> Could you provide a short code example that demonstrates the issue?
>
> Thanks,
> --Eljay
>
> At 11:24 PM 1/19/2005, you wrote:
> >Hello,
> >
> >   I am bringing this question from graphics3D development (
> >http://www.graphics3d.com ).
> >
> >   I did not want to flood the bug system with an unqualified report,
> >so if you could help me clarify if this is an issue.
> >
> >   This happens only with g++ 3.4
> >
> >   Simply put, calling an overloaded function from a template will fail
> >with no matching overload IF the overloaded function is declared after
> >the template.
> >
> >   In everything up to g++ 3.4, the overloaded function was properly
> >found when the template was used.  Considering that the template is
> >typically defined in a header, we don't see why it is expecting
> >overloaded functions defined before that in 3.4 and never before.
> >
> >   An example of the code flow:
> >
> >   void overloadedFunc(const std::string& var) {
> >
> >   }
> >
> >   void overloadedFunc(int var) {
> >   }
> >
> >--- templated code that calls overloadedFunc with template variable --
> >
> >   void overloadedFunc(const SpecialClass& var) {
> >   }
> >
> >--- Use the templated code with SpecialClass ----
> >
> >
> >If I can provide better information, or if you think this could be
> >filed as a bug-report, please reply.
> >
> >Corey Taylor
>
>

Attachment: overload.cpp
Description: Binary data

Attachment: overload.h
Description: Binary data


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux