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

Explicit instantation of websocket::stream fails #1279

Closed
djarek opened this issue Oct 29, 2018 · 6 comments
Closed

Explicit instantation of websocket::stream fails #1279

djarek opened this issue Oct 29, 2018 · 6 comments
Labels

Comments

@djarek
Copy link
Contributor

djarek commented Oct 29, 2018

https://wandbox.org/permlink/NhmB6f9y3wanpVdz

@vinniefalco
Copy link
Member

Well, this is kind of tricky, because pmd_opts_ is not present if deflateSupported==false. But with explicit instantiation, the compiler has to emit both functions just in case. One solution is to just put pmd_opts_ in the declaration even if it isn't needed. I don't know what else to do. @glenfe ?

@vinniefalco
Copy link
Member

@djarek
Copy link
Contributor Author

djarek commented Nov 5, 2018

@vinniefalco I believe that if open_pmd used SFINAE, this problem would go away, because the compiler wouldn't try to instantiate both.

@vinniefalco
Copy link
Member

it has to instantiate both, how does it know ahead of time which one it will need?

@djarek
Copy link
Contributor Author

djarek commented Nov 7, 2018

@vinniefalco
Copy link
Member

This will help people reduce their build times by putting the definitions in a .cpp file instead of the .hpp.

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

No branches or pull requests

2 participants