Topic: call to named function


Author: paul.black@vf.vodafone.co.uk
Date: 1996/08/15
Raw View
Alexander Krotoff <krotoff@boy.nmd.msu.ru> wrote:
> Hello, c++ gurus,
>
> Reading the April 95 WP I cannot understand the following rule:
> 13.3.1.1.1 Call to named function.
>
>  If the keyword this is not in scope or refers to another class
>  then name resolution found a static class member of some class T.
>
> Would you please provide any example for this rule.
>
> Thank you,
>  --
> Alexander N. Krotoff
> Research Computer Center
> Moscow State University

I took the draft to mean:
class A
{
public:
    void Func1();
};

class B
{
public:
    static void Func1();
    static void Func2();
};

void A::Func1()
{
    Func1();   // Recursive call
    Func2();   // Calls B::Func2(); // Line 17
}

void AnotherFunc()
{
    Func1();   // Calls B::Func1();  // Line 22
    Func2();   // Calls B::Func2();
}

However, HP C++ v3.72 complained:
CC: "a.cxx", line 17: error: undefined function Func2 called (1286)
CC: "a.cxx", line 22: error: undefined function Func1 called (1286)

Is it me (probably!) or my compiler that is misinterpreting the draft?

Paul



[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: Alexander Krotoff <krotoff@boy.nmd.msu.ru>
Date: 1996/08/14
Raw View
Hello, c++ gurus,

Reading the April 95 WP I cannot understand the following rule:
13.3.1.1.1 Call to named function.

 If the keyword this is not in scope or refers to another class
 then name resolution found a static class member of some class T.

Would you please provide any example for this rule.

Thank you,
--
Alexander N. Krotoff
Research Computer Center
Moscow State University
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]