Re: [sigc] libsigc++ & Forte: template operator()
- From: Martin Schulze <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: Sun, 21 Mar 2004 19:54:52 +0100
Am 2004.03.20 17:30 schrieb(en) Murray Cumming:
On Sat, 2004-03-20 at 15:03, Martin Schulze wrote:
> Marray, did you check whether:
[snip]
> thing_./*template */operator()<int>(1, 2);
> }
>
> (with the template keyword commented out) compiles with the FORTE?
> I don't remember anyone actually confirming this. (Attachment
> test_template_keyword1.cc)
No, I forgot to check that. I see now that it fails:
bash-2.03$ CC template_operator_simple.cc
"template_operator_simple.cc", line 20: Error: Badly formed
expression.
1 Error(s) detected.
It does work if I rename operator() to somemethod(). I suspect that
that
is fixed in Damien's Forte C++ 5.5 (I have 5.4)
This might mean that we have to give up on Forte C++ < 5.5.
a) We want to use this technique because it enables us to pass
references and const objects through adaptors.
b) We want to use operator()() and not somemethod() because
inventing some method name would rule out compatibility with
adaptors from other libraries.
If the Forte C++ 5.5 also can't do template specialization with
operators the way to go would be to give up on b) for this compiler.
I'll trigger Damien ...
> Also we should check whether the newly added template keywords
cause
> any troubles with the FORTE before doing a new release. I'm
attaching
> test_template_keyword2.cc for this. test_template_keyword3.cc has
the
> template keyword commented out.
Both compile without problems.
That's fine then.
Regards,
Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]