Re: VC8 Compiler bizarreness
- From: Murrgon <murrgon@xxxxxxxxxxx>
- Date: Wed, 04 Jun 2008 12:43:34 -0400
Alex Blekhman wrote:
"Murrgon" wrote:Correction to previous post: the 'built-in C++' operator!=() that were suggested obviously has that operator, but none of the classes suggested has that operator.
I think that the culprit is `GTL::TSmartPtr<TYPE>' template. Either it defines `operator !=', which is too generic or some other conversion operator that kicks in. Could you post the definition of this template?
It does define operator!=(), but the classes it's suggesting as the TYPE
don't.
namespace GTL {
// ===========================================================================
// TSmartPtr class
// ===========================================================================
template <class TYPE>
class TSmartPtr
{
// Member variables ========================================================
private:
TYPE* m_pRefCountObject; // Reference counting object
// <... snipped for brevity ...>
public:
// Boolean operators =====================================================
TBool operator!()
{
return(NULL == m_pRefCountObject);
}
TBool operator==(const TSmartPtr& kObject)
{
return(m_pRefCountObject == kObject.m_pRefCountObject);
}
TBool operator==(TYPE* ptr)
{
return(m_pRefCountObject == ptr);
}
TBool operator!=(const TSmartPtr& kObject)
{
return(m_pRefCountObject != kObject.m_pRefCountObject);
}
TBool operator!=(TYPE* ptr)
{
return(m_pRefCountObject != ptr);
}
friend INL TBool operator==(TYPE* ptr, const TSmartPtr<TYPE>& kObject)
{
return(kObject == ptr);
}
friend INL TBool operator!=(TYPE* ptr, const TSmartPtr<TYPE>& kObject)
{
return(kObject != ptr);
}
};
} // namespace GTL
.
- Follow-Ups:
- Re: VC8 Compiler bizarreness
- From: Alex Blekhman
- Re: VC8 Compiler bizarreness
- References:
- VC8 Compiler bizarreness
- From: Murrgon
- Re: VC8 Compiler bizarreness
- From: Bo Persson
- Re: VC8 Compiler bizarreness
- From: Murrgon
- Re: VC8 Compiler bizarreness
- From: Victor Bazarov
- Re: VC8 Compiler bizarreness
- From: Murrgon
- Re: VC8 Compiler bizarreness
- From: Alex Blekhman
- VC8 Compiler bizarreness
- Prev by Date: Re: Externs
- Next by Date: Re: VC8 Compiler bizarreness
- Previous by thread: Re: VC8 Compiler bizarreness
- Next by thread: Re: VC8 Compiler bizarreness
- Index(es):