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

fixed.hpp syntax error compiler 0llu or 1llu #10

Open
ekcury opened this issue Jan 7, 2016 · 2 comments
Open

fixed.hpp syntax error compiler 0llu or 1llu #10

ekcury opened this issue Jan 7, 2016 · 2 comments

Comments

@ekcury
Copy link

ekcury commented Jan 7, 2016

Sorry fixed.hpp dont compile, my compiler(msvc10) no understand is: 0llu or 1llu
are constants?
Fixed() : value(0llu) {}

static const int64_t ShiftValue = (1llu<<Shift);

thanks!

@ekcury ekcury changed the title fixef.hpp syntax error compiler 0llu or 1llu ? fixed.hpp syntax error compiler 0llu or 1llu Jan 7, 2016
@ekcury
Copy link
Author

ekcury commented Jan 7, 2016

ok, 1llu is ((unsigned long long) 1<<Shift) ?

@barkovv
Copy link

barkovv commented Mar 11, 2018

opencv uses this macro to resolve the problem:

#if defined _MSC_VER || defined __BORLANDC__
   typedef __int64 int64;
   typedef unsigned __int64 uint64;
#  define CV_BIG_INT(n)   n##I64
#  define CV_BIG_UINT(n)  n##UI64
#else
   typedef int64_t int64;
   typedef uint64_t uint64;
#  define CV_BIG_INT(n)   n##LL
#  define CV_BIG_UINT(n)  n##ULL
#endif

I guess we should use it here too (to be crossplatform).

PS sorry for necrobump.

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

No branches or pull requests

2 participants