This is the mail archive of the sourcenav@sources.redhat.com mailing list for the Source Navigator.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

operator overloading and C++ parser


Hi all !

I searched the mailing list, but I didn't find this problem posted
(sorry for any duplicates). Here is the problem :

When there is an operator overloading in C++ code the parser does not
parse correctly the return types in following situations (in each of
these situations the return type will be int instead of the real return
type):

- when the return type is a class type returned by value (if it's
returned by reference, it parses it correctly)

- when the return type is a template argument type

- when the return type is a typedef.

I won't bother you with too many examples, here is just one (instead of
c4_Row there is int in the database) :

C++ code :

    class c4_StringProp : public c4_Property
    {
    public:
    ....

        c4_Row operator[] (const char*) const;
    ....
    };


SN .md database entry :

{c4_StringProp operator[] 000674.011 metakit-2.3.4-29/include/mk4.h}
{674.41 0x4 {int} {const char *} {} {}}


I tested it on metakit source code
(http://sourceforge.net/projects/metakit/).


Kind regards,
Marta.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]