Closed
Description
Input C/C++ Header
class Foo {
Foo() { printf("%d", this);}
void bar() const { printf("%d", this);}
}
When using this from Rust like this
let foo = Foo::new();
foo.bar();
Then the printf calls will print different numbers. This is probably expected behavior, but it doesn't seem to be documented (would've saved me 1 hour of debugging). For example, people may use the this
pointer to pass the class as some listener interface to one of its fields.
Metadata
Metadata
Assignees
Labels
No labels