Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7873 Discussions

best practice for overloading operators (&, |) for __int64 in icpc


Dear All,

One of our client (academic) researchers is using a third party R package which installs successfully on our compute cluster using R without MKL, gcc, and g++ (having support for said operators with __int64), but fails in R-with-MKL AFAIK due to lack of overload defined for said operators with __int64 in icpc.

I presume it's possible to introduce such overload definitions for use by icpc via additional, local code - independent of the said third party code, true?

If so, I'd appreciate if someone could provide a simple example or link thereto, thanks.

Also, if so, is it nonetheless better to request the third party owner to add such support - since AFAIK __int64 is not a standard c++ feature?

Please let me know if you need more info.


0 Kudos
1 Reply
Black Belt

Any overloaded operators are only effective for code generated with the overloads specified and active. I am surprised that your (academic) researcher to expect this to be otherwise. Does he/she expect there overloads to affect the operations in a printed book? (Newton's Mathematica). I would hope not. Then why would they expect (already compiled) 3rd party libraries to use their overloads?

Your client should seek out a support library that is in source form, to be compiled with the overloads defined. *** However, then they also must bear the burden of providing any support for code that no longer works as intended by the designer(s) of the original code.

“When I use a word,” Humpty Dumpty said, in rather a scornful tone, “it means just what I choose it to mean—neither more nor less.”

Jim Dempsey

0 Kudos