-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[io] Fix std::complex on Windows
#20327
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
base: master
Are you sure you want to change the base?
Conversation
|
If problem resolved one can remove special windows ref files. |
Oh right, indeed, thanks! |
linev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me changes are fine, but probably @pcanal want comment as well
|
Seems to be all tests from |
| #pragma extra_include "root_std_complex.h"; | ||
|
|
||
| #ifdef _WIN32 | ||
| #pragma create TClass _C_float_complex+; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does remove the warnings by generating the dictionary but I think this results in files that are not readable on Linux. I.e. one might not be able to load the std::complex from the Windows produce file into the Linux std::complex object.
For example, contrast he output of:
TClass::GetClass("std::complex<int>")->GetStreamerInfo()->ls();
on both platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here is the output on Windows:
C:\root-dev\build\x64\relwithdebinfo>root -l
root [0] TClass::GetClass("std::complex<int>")->GetStreamerInfo()->ls();
StreamerInfo for class: complex<int>, checksum=0x1bd95fcc
_Complex_base<int,_Complex_value<int> > BASE offset= 0 type= 0
int _real offset= 0 type= 3
int _imag offset= 4 type= 3
i= 0, _Complex_base<int,_Complex_value<int> > type= 0, offset= 0, len=1, method=0
i= 1, _real type= 23, offset= 0, len=2, method=0 [optimized]
root [1]
I'll try on Linux once the build is over (on a VM with 4 cores...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux:
[bellenot@alma9-bb relwithdebinfo]$ root -l
root [0] TClass::GetClass("std::complex<int>")->GetStreamerInfo()->ls();
StreamerInfo for class: complex<int>, checksum=0x55a2a7c3
int _real offset= 0 type= 3
int _imag offset= 4 type= 3
i= 0, _real type= 23, offset= 0, len=2, method=0 [optimized]
root [1]
So if I understand correctly, this PR solves std::complex on Windows, but makes it incompatible with other platforms.
Then what do you suggest?
Test Results 22 files 22 suites 3d 18h 42m 58s ⏱️ For more details on these failures, see this check. Results for commit d7372e1. |
This PR fixes #20312
Fixes the following warnings: