rotate_left() in ex.h => compilation failure
Hi! I've tried to compile a library using GiNaC (version 1.3) with GiNaC version 1.4. Compilation failed because ex.h defines `rotate_left' function: 55 /** Rotate bits of unsigned value by one bit to the left. 56 * This can be necesary if the user wants to define its own hashes. */ 57 inline unsigned rotate_left(unsigned n) 58 { 59 return (n & 0x80000000U) ? (n << 1 | 0x00000001U) : (n << 1); 60 } The library in question has a function static inline double rotate_left(double x, int i = 1) so the code like double x = rotate_left(5); fails to compile due to ambigously overloaded function. I think this is GiNaC's fault -- having such a helper function in a *public* header is not a good idea. So, I'd like to move it (say, to utils.h). Any objections? Best regards, Alexei -- All science is either physics or stamp collecting.
participants (2)
-
Alexei Sheplyakov
-
Jens Vollinga