Removed statements[edit]

@Spitzak: Several points I noted about your recent removals:

- you can add that back in without undoing the important changes

- again you can add that in without undoing the important changes, though I really don't think it is an important detail. Also I think the example which I re-added does a much better job.

- There is very little difference in the result on various compilers. ALL of them will do the assert and abort at the same time. IMHO this example does much much more in explaining things than all the text you seem to want to add. Also I HAD to undo a lot of mistakes, in particular about "compiling" (it will compile whether or not the assert will throw), and to change the program to one that will actually trigger an assert.

- The fact that the expression is not evaluated when debugging is disabled is probably infinitely far more important than which compiler macro is used or what header file abort() is in, so I am confused why you think that should not be there. The template stuff is an attempt to explain why static_assert showed up in C++ before it was in C.

- Here was by far the biggest mistakes. You left tons on stuff about assert mixed in here (the C++ header file was one of those), duplicated stuff, and mangled the text so the fact that it is compile-time seemed to be only for C99 and not C++. Please do not change this unless you clearly keep on subject and only talk about static_assert!

I understand having different mindsets about how to work an article, but everything I've stated is sourced, unless I'm overlooking something here. Perhaps you mean mistakes as in prose mistakes, rather than factual mistakes? elijahpepe@wikipedia (he/him) 03:55, 18 March 2023 (UTC)[reply]

Yes because the big paragraph duplicated information, contained completely erroneous statements, and merged multiple subjects (don't talk about assert in a section titled static_assert, for one thing!).Spitzak (talk) 15:52, 18 March 2023 (UTC)[reply]
I can't seem to find any such duplicated information that you're talking about. elijahpepe@wikipedia (he/him) 16:57, 18 March 2023 (UTC)[reply]

In C99, the assert macro explicitly allows any scalar type.[edit]

Can anybody explain what this means? I am suspicious this is a meaningless statement from the Linux man page that people keep copying, and that all the "new types" are in C99 anyway and therefore the C89 assert was capable of doing every type that could work. Is there an example of something that did not work in C89 assert statement that should? What are these types that are "scalar" but cannot be cast to int? Spitzak (talk) 19:37, 19 March 2023 (UTC)[reply]

There's no difference, but the distinction should still be noted as part of changes made to the macro. elijahpepe@wikipedia (he/him) 21:52, 19 March 2023 (UTC)[reply]