-
Notifications
You must be signed in to change notification settings - Fork 897
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
static
random distribution does not update the intervals
#1681
Comments
also i think that having static objects in inline functions means that one has a static object per function call |
Oif. That sounds right to me. |
Ah, it seems the situation is not as bad as you thought. You're correct that we should remove the There are two functions involved:
The suggested use of |
It doesn't. From inline specifier:
|
So @dimitry-ishenko, what's your thought on my removing the |
maybe the best thing to do would be to time inline funcs vs non inline and in case nothing changes just remove the inline to remove unnecessy keywork or just leave as it is |
The problem with that approach is that this is helpful for all people who have my exact setup, as of February 2024. 😄 |
Since it's defined in the header file, it should be marked
There is no need. |
Here is a super simplified example: https://godbolt.org/z/nd7sE5qc6 The |
Discussed in #1680
Originally posted by niccolot February 18, 2025
I' ve just realized that one of the suggested way to generate random numbers, namely
produces numbers only in the first (min,max) range it is instanciated with, e.g.
prints
I think is kind of a coincidence that everything works regardless, the random_double() is always used with (0,1), the only problem could arise in
but i think it would not produce any particularly visible artifact.
The text was updated successfully, but these errors were encountered: