Bug #9234 2006-10-22 17:10

snija

Wrong behavior while parsing friend operator in the class

Details: trival code like this:
/*****************************************/
#include <iostream>
/* class A*/
class clsA
{
    int m_iclsA;
};
 
/* class B*/
class clsB
{
    int m_iclsB;
    public:
    clsB(int x=0){m_iclsB=x;}
    ~clsB(){;}
    void value(){std::cout << "The value is "<< m_iclsB << std::endl;}
    friend clsB operator + (const clsB & para0,const clsB & para1){
        clsB temp;
        temp = para0.m_iclsB + para1.m_iclsB;
        return temp;
    }
};
 
/* class C*/
class clsC
{
    int m_iclsC;
};
/**/
 
int main()
{
    clsB obB0(0),obB1(1),obB2(2);
    obB0.value();
    obB0 = obB1 + obB2;
    obB0.value();
    std::cout << "Ends" << std::endl;
    return 0;
}
/*****************************************/
clsC can not be recognized by the symbols viewer, also,
code completion doesn`t work with those three classes(clsA, clsB, clsC).
 
Category
Plugin::CodeCompletion
Group
 
Status
Closed
Close date
2010-10-16 01:52
Assigned to
loaden
loaden 2010-10-16 01:52

This bug has been already fixed in HEAD.

Thank you.