|
|
1.1 root 1: > A suggested rule of thumb: every inline member function must
2: > be defined in the header file that carries the corresponding
3: > class declaration.
4: >
5: > A more general rule: every inline function must be defined in
6: > every file that declares it.
7:
8: Pretty draconian. By analogy, the same thing should be true
9: of static functions. This trivial program would then be wrong:
10:
11: static f();
12: main() { }
13: To: C++ language issues mailing list
14: From: bs
15:
16: Both 2.0 and 2.1 accepts this:
17:
18: class A { public: f(); };
19: class B : public virtual A {};
20: class C : public A { g(); };
21:
22: C::g() { f(); }
23:
24: calling the A::f() in the non-virtual base.
25:
26: yet the manual states that a virtual class is an immediate base of ever
27: class directly or indirectly derived from it (or words to that effect).
28:
29: Should cfront be brought into line with the manual or should the manual
30: be brought into line with cfront? In the former case, do we break code?
31: in the latter, how?
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.