Error: cannot call public/export function someFunction from invariant
bearophile
bearophileHUGS at lycos.com
Fri Oct 18 02:04:25 PDT 2013
simendsjo:
> See topic. Why is this not allowed? The function in question is
> not virtual.
>
> struct S {
> void someFunction() const {}
> const invariant() { someFunction(); }
> }
> void main() {
> S s;
> }
It being not virtual is not important. In what cases is
invariant() called, simendsjo? I sense an infinite loop.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list