-
Notifications
You must be signed in to change notification settings - Fork 111
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
[UR] Fix some print operators not being exported #1091
Conversation
Why should those operators be exported anyway? They are in the header so it shouldn't matter I think. |
They are not visible in the loader's |
But why is that a problem? Do we expect to need a function pointers to those operators or something like that? If not, what's the benefit of having those operators exported? |
No, there is no need for function pointers to these operators, I suppose. I thought that these operators can't be used by an external binary by merely including the Shall all exports in this header be removed then? The exporting policy should be the same for all operators to keep the code clean. |
I'm also not an expert on that but I found this answer which would suggest that if we don't need to take the address of such functions, exporting them is not necessary: https://stackoverflow.com/a/44183940/5935594 so yes, I would say that we should either remove exports for all functions that are defined in the header as inline or to define those functions in a .cpp file and export them. Btw, why did we decide to implement those operators as inline in the header in the first place? |
Right, based on these resources we can remove all exports from this file as it is not necessary to provide pointers to the operators. Inlining was introduced so that printing won't hurt performance, I suppose. I think that we want this to remain. |
Agreed. This is header only, so makes complete sense. Please close this PR and open a new one that removes the export markers. |
Changes in this PR are dropped and replaced with #1115 |
No description provided.