[kopete-bugs] [Bug 222478] New: cannot reference a r-value
tropikhajma
tropikhajma at gmail.com
Wed Jan 13 00:33:35 CET 2010
https://bugs.kde.org/show_bug.cgi?id=222478
Summary: cannot reference a r-value
Product: kopete
Version: unspecified
Platform: Compiled Sources
OS/Version: Solaris
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kopete-bugs at kde.org
ReportedBy: tropikhajma at gmail.com
Version: 4.3.90 (using Devel)
Compiler: Suun Studio 12 U1
OS: Solaris
Installed from: Compiled sources
building kdenetwork 4.3.90 with Sun Studio 12u1 on opensolaris fails with:
...
"/home/test/packages/BUILD/kdenetwork-4.3.90/kopete/kopete/chatwindow/chatmessagepart.cpp",
line 1433: Warning: cannot take address of a temporary.
"/home/test/packages/BUILD/kdenetwork-4.3.90/kopete/kopete/chatwindow/chatmessagepart.cpp",
line 1433: Error: The "&" operator can only be applied to a variable or other
l-value.
the compiler is right, see the C++ standard:
"The result of the unary & operator is a pointer to its operand. The operand
shall be an lvalue [...]" (5.3.1/2) and "The result of calling a function that
does not return a reference is an rvalue" (3.10/5)."
the attached patch helped me move on
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the kopete-bugs
mailing list