Re: [sigc] libsigc++ & Forte: template operator()
- From: martin-ml hippogriff de
- To: Murray Cumming <murrayc murrayc com>
- Cc: libsigc++ list <libsigc-list gnome org>
- Subject: Re: [sigc] libsigc++ & Forte: template operator()
- Date: Fri, 19 Mar 2004 18:39:55 +0100
Am 18.03.2004 um 12:42 Uhr haben Sie geschrieben:
> On Thu, 2004-03-18 at 01:58, Murray Cumming wrote:
> > On Thu, 2004-03-18 at 00:16, Martin Schulze wrote:
> > > you could try to compile current cvs.
> >
> > In case you don't see the same thing yourself already:
> >
> > The build is now broken with regular gcc++ 3.2.2 (RedHat 9)
>
> The __GCC__ macro does not seem be be defined. I'm trying to write
a
> configure-time test (see the attached code) but it fails on my SUN
Forte
> (5.3) compiler with or without the "template" word on line 31.
I don't know want went wrong on Wednesday evening. I did compile the
whole thing before committing to cvs - I will check again as soon as
possible.
> Martin, is this an appropriate test?
I think it can be stripped down. The following should do:
class Thing
{
public:
Thing()
{}
template <class T>
void operator()(T a, T b)
{
T c = a + b;
std::cout << c << std::endl;
}
};
int main(int, char*[])
{
Thing thing_;
thing_.template operator()<int>(1, 2);
}
Regards,
Martin
> Damien, does it build for you? Does it build without the template
word
> on line 31?
#include <iostream>
class Thing
{
public:
Thing()
{}
template <class T>
void operator()(T a, T b)
{
T c = a + b;
std::cout << c << std::endl;
}
};
int main(int, char*[])
{
Thing thing_;
thing_.template operator()<int>(1, 2);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]