-
Notifications
You must be signed in to change notification settings - Fork 23
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
Does IPR need a method type? #176
Comments
In the early design days of the IPR, we decided that we wanted to unify the notions of both non-static member functions and static member functions and that such unification should involve types (remember: types are the backbone of semantics in IPR). So, we didn't have "method types" (as you would find in the first versions of the MSVC's IFC format). Furthermore, we also had a strong desire to have the necessary infrastructure in place to support multi-methods; that required disentangling the whole non-static member function and overloading puzzle. Those issues are largely immaterial for nonstatic data members (fields) and ordinary variables and static data members. We never got to be doing that disentanglement as we all got busy. Note that the unification concern is now renewed with urgency with the proposed [Deducing |
In a recent discussion when this subject was touched. One of the ideas to explore was to add a In the following example: struct S { int f(double(); int d; }; The type of Possible interplay with deducing-this, struct Z { int g(this Z, double); }; Have a unary type constructor Method(C), so that the type of |
IPR distinguishes between non-static data members (Fields) and static data members (Var).
Thus taking an address of a Field, will result in an expression of Ptr_to_member type and taking an address of a Var, will result in an expression of Pointer type.
For Fundecl, IPR makes no distinction whether they are members or non-members. We need to resort to examining the specifiers() of the Fundecl and decide based on the presence of
DeclSpecifiers::Static
bit to see if it is a member function (Method) or static member function.We had a brief discussion on 8/4/2021 and this item is a reminder of this discussion to decide whether anything need to change in IPR or stay as it is.
The text was updated successfully, but these errors were encountered: