-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
spell out using declaration #178
Labels
enhancement
New feature or request
Comments
Hello @pseyfert, great idea, I like it. I will look how and when I add it. Andreas |
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
For example: ``` struct X { int f(int); int f(double); protected: int x; }; struct Y: X { using X::f; using X::x; }; ``` Will make the functions `f(int)` and `f(double)` available in `Y` as well as it moves `X::x` from `protected` to `public` in `Y`. All these functions or members are shown as comments only.
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
For example: ``` struct X { int f(int); int f(double); protected: int x; }; struct Y: X { using X::f; using X::x; }; ``` Will make the functions `f(int)` and `f(double)` available in `Y` as well as it moves `X::x` from `protected` to `public` in `Y`. All these functions or members are shown as comments only.
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
For example: ``` struct X { int f(int); int f(double); protected: int x; }; struct Y: X { using X::f; using X::x; }; ``` Will make the functions `f(int)` and `f(double)` available in `Y` as well as it moves `X::x` from `protected` to `public` in `Y`. All these functions or members are shown as comments only.
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
…a using. For example: ``` struct X { int f(int); int f(double); protected: int x; }; struct Y: X { using X::f; using X::x; }; ``` Will make the functions `f(int)` and `f(double)` available in `Y` as well as it moves `X::x` from `protected` to `public` in `Y`. All these functions or members are shown as comments only. Fixed #184 which points out the invalid prefix from a using decl.
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
…a using. For example: ``` struct X { int f(int); int f(double); protected: int x; }; struct Y: X { using X::f; using X::x; }; ``` Will make the functions `f(int)` and `f(double)` available in `Y` as well as it moves `X::x` from `protected` to `public` in `Y`. All these functions or members are shown as comments only. Fixed #184 which points out the invalid prefix from a using decl.
andreasfertig
added a commit
that referenced
this issue
May 13, 2019
Fixed #178, 184: Provide the functions pulled in from a base class via using
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was wondering about this example (source quoted below).
Y
has an overload set forf
that containerint f()
,int f(int)
,int f(double)
,int f(float)
but from the class declaration to the human readeronly
f(float
is visible andusing X::f
suggests there are more.Does it make sense to spell out the using declared overload set in
cppinsights.io?
I think it would be nice to see what one imports with the using declaration.
I see in cppinsights one can somewhat infer what's going on on the call site
vs
int two = y.f(...)
This reveals from which class
f
is used. But the full overload set forf
isnot visible.
Opinions/comments?
class sources
The text was updated successfully, but these errors were encountered: