[omniORB] omniEvents 2.6.1 install error on irix6
Maks Verver
m.verver at student.utwente.nl
Sat Apr 23 17:59:43 BST 2005
Hi,
Alex Tingle wrote:
> You are not quite right to say that temporary objects are always
> const. I CAN call a non-const method on a temporary object, BUT I
> cannot bind a temporary object to a non-const reference. I don't
> think my code breaks this rule here, so I suspect SGI's compiler
> may be incorrect.
I see. Although I couldn't find the exact rules in the '97 standard
draft, apparently I memorized the rule as "treat temporaries as const",
which worked for me, but is too restrictive. I stand corrected.
> However, just because you CAN do a thing, doesn't mean you SHOULD.
> I think I'll take out this code - it's a bit too clever clever for
> its own good. ;-)
I'm more inclined to say the C++ standard is too elaborate for it's own
good; I wonder how many percentage of C++ programmers know all of these
details by heart and I can only image how often violations of the
specification in applications as well as compilers are only discovered
'by accident' like this. But that's a completely different topic.
Kind regards,
Maks Verver.
More information about the omniORB-list
mailing list