-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constexpr and decltype parsing #125
Conversation
Parses constexpr (in the manner of const) and decltype (in the manner of __typeof). Adds flags for them and also for other already parsed items (mutual, auto). Signed-off-by: John Bowler <jbowler@acm.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank! Seems to be ok, as far as I can see, though I may miss something of course. The proof of the pudding... @usiems - please have a look at this, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that, if new keywords are, for our purposes, equivalent to recognized ones, one might probably as well add a #define
to the pp-qt-configuration file. The embedded preprocessor should not care.
Not directly related to this commit, but because support for auto
was prepared in the code:
If auto
is used for return types in the Qt headers, the generator has a problem, because the parser will not automatically derive the returned type, which in turn means that the correct code can't be generated.
This should be seldom be the case in Qt though, since this would mean that a method implementation is in the header file, which would somewhat defeat the promised stable binary interface. The only valid use case would be for templated container types, which PythonQt doesn't wrap anyway. Still, something we should be aware of.
Add .vimrc to ensure that expandtabs is always done. Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: John Bowler <jbowler@acm.org>
It is used in that way in Qt6.5.3, which is why I added it. It's like decltype() or __typeof(). Typeof is ignored which means the type will be wrong. 'auto' might work if preserved. I simply don't use C++ class auto so I'm not familiar with the restrictions. decltype is likely to occur in templates (function templates maybe) which are not currently handled. No problem until Qt6 then the function will just have to be disabled in the relevant typesystem file. I added auto mainly so I could add big warning message when it is encountered. |
For function definitions. Signed-off-by: John Bowler <jbowler@acm.org>
- parses constexpr (in the manner of const) and decltype (in the manner of __typeof) and adds flags for them
- parses constexpr (in the manner of const) and decltype (in the manner of __typeof) and adds flags for them
- parses constexpr (in the manner of const) and decltype (in the manner of __typeof) and adds flags for them
- parses constexpr (in the manner of const) and decltype (in the manner of __typeof) and adds flags for them
Parses constexpr (in the manner of const) and decltype (in the manner of __typeof). Adds flags for them and also for other already parsed items (mutual, auto).