Timeline for Implementing Conway's Game of Life
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 12, 2016 at 22:08 | vote | accept | Mo Moallim | ||
Sep 21, 2014 at 23:12 | comment | added | vnp | @Memleak: I stand corrected, although still looking for the right place in the Standard. | |
Sep 21, 2014 at 16:26 | comment | added | Memleak |
@vnp So is std::cout << "hy";;;;;;;;;; or ;; std::cout << "hy" ;; but that doesn't mean it is OK to write code like that. Jamal comment stating that #include directives shouldn't end with a semicolon is perfectly valid. Same applies for macros or other preprocessing commands, loops (exception being do...while) conditionals, namespaces or anonymous scopes.
|
|
Sep 20, 2014 at 17:51 | comment | added | Jamal | @vnp: unexpected tokens following preprocessor directive - expected a newline | |
Sep 20, 2014 at 8:18 | comment | added | vnp | @Jamal: Chapter and verse, I believe, is 6.2(1) of a latest draft Standard (isocpp.org/files/papers/N3690.pdf) as well as similar paragraphs of earlier Standards, which explains that expression_statement is optional expression followed by a semicolon. What is an exact nature of a warning you are given? | |
Sep 20, 2014 at 7:57 | comment | added | vnp | @Jamal: #include <foo> is a textual substitution. Assume it is C++ text valid per se. If it is followed by a semicolon, the semicolon would represent an empty statement, still valid. I am not sure I can point a chapter and verse. PS: there are sick cases (two sequential #includes not valid on their own) when my assertion doesn't hold. | |
Sep 20, 2014 at 6:44 | comment | added | Jamal | @vnp: If so, could you direct me to an explanation? I cannot find one anywhere. Also, after testing it myself, my compiler gives a warning. | |
Sep 20, 2014 at 6:42 | comment | added | vnp | @Jamal: #includes should not end with a semicolon but they may. It is perfectly valid syntax. | |
Sep 20, 2014 at 2:07 | comment | added | Jamal |
@Code_LOVER: Some C++11 compilers actually don't support it, and you should be able to check which ones support which feature. You can just stick with typedef and leave out the default constructor if it's not needed; no problem.
|
|
Sep 20, 2014 at 2:06 | history | edited | Jamal | CC BY-SA 3.0 |
added 275 characters in body
|
Sep 20, 2014 at 1:57 | comment | added | Mo Moallim | I can't use using as my compiler doesn't understand and when I try to to make the default constructor default the compiler says pure specifier or abstract override specifier only allowed on virtual function. | |
Sep 20, 2014 at 1:47 | history | answered | Jamal | CC BY-SA 3.0 |