[sldev] [VWR] gcc 4.1.2 and viewer 1.20.10
Kent Quirk (Q Linden)
q at lindenlab.com
Thu Jun 26 07:19:09 PDT 2008
Yes, I *believe* that in this case that's equivalent to the
constructor form (don't have my C++ reference handy), but it's an old
style cast, which is often equivalent to reinterpret_cast and a bit of
a blunt instrument. In general, using the constructor form or a C++-
style cast is the preferred methodology these days.
Q
On Jun 26, 2008, at 9:33 AM, Dana Fagerstrom wrote:
> I was getting the same problem with gcc 3.4! I fixed it with:
>
> (LLHTTPClient::ResponderPtr) this != mRegion-
> >getHttpResponderPtr())
>
> D
>
> Kent Quirk (Q Linden) wrote:
>> Hi,
>> I'm deep in another branch right now, but from looking over the
>> code briefly, I'm guessing that you're running into a problem
>> comparing a smart pointer to a base class to a smart pointer to a
>> subclass.
>> Instead of:
>> this != LLViewerRegion::getHttpResponderPtr()
>> Please try:
>> !(this == LLViewerRegion::getHttpResponderPtr())
>> If that fails, another option might be:
>> LLHTTPClient::ResponderPtr(this) !=
>> LLViewerRegion::getHttpResponderPtr()
>> These are boost::intrusive_ptr objects, so that last one should be
>> safe.
>> Q
>> On Jun 26, 2008, at 7:05 AM, Robin Cornelius wrote:
>>> Hi everyone,
>>>
>>> Having a gcc issue on 1.20.10 also reported on JIRA as VWR-7831.
>>>
>>> x86_64-linux-client-release/newview/llviewerregion.cpp:111: error:
>>> no
>>> match for 'operator!=' in 'this !=
>>> LLViewerRegion::getHttpResponderPtr() const()'
>>>
>>> I'm assuming gcc 4.1.2 cannot handle the implicit casting required
>>> here. 4.1.3 and newer seems ok but this is a particular problem
>>> for me
>>> as i need to build on 4.1.2 (the version in debian etch) to avoid a
>>> whole world of distribution issues with my viewer packages.
>>>
>>> Is the fix as simple as an explicit cast? or is gcc just deciding
>>> the
>>> pointers are of different classes and as there is no = operator
>>> defined, balking at what it thinks it cannot do?
>>>
>>> Thanks for any help on this one!
>>>
>>> Robin
>>> _______________________________________________
>>> Policies and (un)subscribe information available here:
>>> http://wiki.secondlife.com/wiki/SLDev
>>> Please read the policies before posting to keep unmoderated
>>> posting privileges
>> _______________________________________________
>> Policies and (un)subscribe information available here:
>> http://wiki.secondlife.com/wiki/SLDev
>> Please read the policies before posting to keep unmoderated posting
>> privileges
>
> --
> =====================================================================
> Dana Fagerstrom Phone: 877.851.6343
> Sun Services Fax: 877.851.6343
> 400 Atrium Dr. Email: dana.fagerstrom at Sun.COM
> Somerset, NJ 08873 SneakerNet: USMT01
> =====================================================================
> Pressure - It can turn a lump of coal into a flawless diamond,
> and an average person into a perfect basketcase.
> -- www.despair.com
> =====================================================================
>
More information about the SLDev
mailing list