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

fix bug int/size_t #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix bug int/size_t #1

wants to merge 1 commit into from

Conversation

timocafe
Copy link

Hello,

I find a bug (not really I just improve). If you are doing a range like

std::size_t size(9999);
for(int i: range(0:size))
     //blablabla

This will not compile as size is uint64_t and 0 is an int. The compiler will complain because there are two type and range use only one.

I fix it using an identity struct from my past experience (http://stackoverflow.com/questions/26705581/operator-and-float-argument)
Some more advance meta-programming may do the job, but I am not template guru.

Free to you to merge it, but at least in my version I fix it.

Best,

Tim

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

Successfully merging this pull request may close these issues.

1 participant