Fix some C++11 identifiers with special meaning parsing problems
Fix parsing of C++11 identifiers with special meaning (final and override) when they are used as part of the scope name of an identifier, such as a namespace name. Closes #1679
This commit is contained in:
parent
66752cde48
commit
aa47b4c438
3 changed files with 38 additions and 2 deletions
|
|
@ -138,3 +138,31 @@ void DerivedNoVirtualStruct::ef() {}
|
|||
DerivedNoVirtualStruct::~DerivedNoVirtualStruct() {}
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
namespace Outer {
|
||||
namespace final {
|
||||
template <typename T> struct smart_ptr {
|
||||
typedef T type;
|
||||
};
|
||||
}
|
||||
namespace override {
|
||||
template <typename T> struct dumb_ptr {
|
||||
typedef T type;
|
||||
};
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(SmartPtrBaseStruct) Outer::final::smart_ptr<DerivedStruct>;
|
||||
|
||||
%inline %{
|
||||
class ObjectDB
|
||||
{
|
||||
public:
|
||||
static void smart1(typename Outer::final::smart_ptr<DerivedStruct>::type *objectT) {}
|
||||
static void smart2(Outer::final::smart_ptr<DerivedStruct>::type *objectT) {}
|
||||
static void dumb1(typename Outer::override::dumb_ptr<DerivedStruct>::type *objectT) {}
|
||||
static void dumb2(Outer::override::dumb_ptr<DerivedStruct>::type *objectT) {}
|
||||
static Outer::final::smart_ptr<DerivedStruct>::type get() { return DerivedStruct(); }
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue