Re: GCC 4 + no inline template functions => undefined symbol ! ?

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

 



Hi Sébastien,

>May be gcc 4 just support inline functions for templates? (but why gcc 3.4 has no problem with that?)

GCC 4 supports non-inline functions for templates for me, just fine.

template <typename T>
T NonInline(T input)
{
    return input - 1;
}

template <typename T>
inline T Inline(T input)
{
    return input + 1;
}

int main()
{
    int i = 10;
    i = NonInline(i);
    i = NonInline(i);
    i = NonInline(i);
    i = NonInline(i);

    int j = 10;
    j = Inline(j);
    j = Inline(j);
    j = Inline(j);
    j = Inline(j);
}

Sincerely,
--Eljay



[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