Skip to content
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

typename(...) misconstrued as normal 'typename' keyword when used in base list #54

Open
drec357 opened this issue Nov 28, 2018 · 0 comments

Comments

@drec357
Copy link

drec357 commented Nov 28, 2018

Low priority problem with the typename(...) syntax:

struct A {};
struct B : A {};

//struct BCopy1 : typename(get<0>($B.bases()).type()) {};
//// ^ "error: 'typename' is redundant; base classes are implicitly types"

using B_base0 = typename(get<0>($B.bases()).type());
struct BCopy2 : B_base0 {};  //Works

The fix I suppose is that wherever Clang is throwing the "typename is redundant" error after a parse, it should now parse just beyond the typename to see if a left parens follows, and only throw the error if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant