-
Notifications
You must be signed in to change notification settings - Fork 217
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 gameOfLife #2700
fix gameOfLife #2700
Conversation
@psychocoderHPC the constructor of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have nothing against these changes. However, doesn't the fact these are required mean that the default constructor of MappingDescription
(default parameter values) is actually harmful as it initializes in an invalid state?
@sbastrakov Thanks I missed the fact that there is a default for all parameter. I fully agree that it should not I will fix it by changing the interface of |
The game of life example has a runtime issue that the mapping description verification to check the number of supercells is always twrowing an error. The reason it that the not existing default constructor is `MappingDescription` is used. - create the object for mapping description inside the init method of `Evolution` - `MappingDescription` remove the default for the parameter `localGridCells`
b6152e5
to
577a297
Compare
I removed the default constructor for |
The game of life example has a runtime issue that the mapping description verification
to check the number of supercells is always twrowing an error. The reason it that the
not existing default constructor is
MappingDescription
is used.Please do not ask me why the code before is compiling. The class
MappingDescription
has no default constructor but is a not initialized member of the classEvolution<>
which means by definition the default constructor should be called. Due to the fact that there is a user defined constructor there should be no default constructor available.Error message:
Evolution
Evolution<...>::init()
MappingDescription
(it make no sense to allow a mapping with zero cells)