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

[input.output] Invalid use of injected-class-name of dependent base #1551

Closed
jwakely opened this issue Mar 18, 2017 · 4 comments
Closed

[input.output] Invalid use of injected-class-name of dependent base #1551

jwakely opened this issue Mar 18, 2017 · 4 comments
Assignees

Comments

@jwakely
Copy link
Member

jwakely commented Mar 18, 2017

[ifstream.cons] says "initializing the base class with basic_istream(&sb)" but as that's a dependent base we need to spell its name out in full: basic_istream<char, traits>(&sb).

This occurs in paragraphs 1 and 2, and [ofstream.cons] 1 & 2, and [fstream.cons] 1 & 2.

@jwakely
Copy link
Member Author

jwakely commented Mar 18, 2017

Or we could just say "initializing the base class with &sb"

@jensmaurer
Copy link
Member

Now that we have class template deduction, basic_istream(&sb) might actually work, deducing the charT and traits template parameters from the parameter.

@jensmaurer
Copy link
Member

[istringstream.cons] p1+2 and friends has the same issue, btw.

@jensmaurer
Copy link
Member

I would actually opt towards spelling out the name of the base class in full. I find that a bit more readable than just "initializing with &sb".

jensmaurer added a commit to jensmaurer/draft that referenced this issue Apr 5, 2017
@jensmaurer jensmaurer changed the title Invalid use of injected-class-name of dependent base [input.output] Invalid use of injected-class-name of dependent base Apr 5, 2017
@jensmaurer jensmaurer self-assigned this Apr 5, 2017
zygoloid pushed a commit that referenced this issue Jul 15, 2017
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

2 participants