-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put trampolines in original class namespace
- This simplifies wrapping somewhat and avoids compile errors when the trampoline references a class in a parent namespace - This is a breaking change -- bindings need to be recompiled to match each other
- Loading branch information
Showing
5 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
namespace n { | ||
enum class E { | ||
Item, | ||
}; | ||
}; | ||
|
||
namespace o { | ||
struct O { | ||
O() = default; | ||
virtual ~O() = default; | ||
}; | ||
}; | ||
|
||
namespace n::h { | ||
class C : public o::O { | ||
public: | ||
// E is resolved here because it's in the parent namespace but our | ||
// trampoline was originally in a different namespace and failed | ||
virtual E fn() { return E::Item; } | ||
}; | ||
}; |