Liste des Groupes | Revenir à cl c |
On 11/04/2024 02:18, Lawrence D'Oliveiro wrote:On Wed, 10 Apr 2024 16:46:43 +0200, David Brown wrote:>
Just for your entertainment, with C++ lambdas this is now legal code:C programmer still has habit of writing “(void)” when C++ allows
>
void foo(void) {
[](){}();
}
“()”
instead.
I do that sometimes, yes. I could argue that I think it is better to
be explicit than implicit, but it's just my fingers on automatic. The
kinds of programs I work on can rarely be pure C++ - there's always
lots of C code too, and it's often useful to write code in a way that
is suitable for both C and C++.
>
In this particular case, of course, there's not much advantage to
having a C-style function declaration!
>Does the latest C spec now also take “()” to mean “no args”>
(synonymous
with “(void)”) instead of “unspecified args”?
It does, yes, in C23. If you want to declare a function with no
information about the number or type of parameters, you can now write
"void foo(...);". (Prior to C23 you needed at least one normal typed
parameter before the ellipsis.)
Date | Sujet | # | Auteur | |
7 Apr 24 | Recursion, Yo | 102 | Lawrence D'Oliveiro | |
7 Apr 24 | Re: Recursion, Yo | 100 | fir | |
9 Apr 24 | Re: Recursion, Yo | 99 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 7 | Lawrence D'Oliveiro | |
9 Apr 24 | Re: Recursion, Yo | 5 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 4 | Ben Bacarisse | |
9 Apr 24 | Re: Recursion, Yo | 3 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
10 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 1 | bart | |
9 Apr 24 | Re: Recursion, Yo | 91 | Ben Bacarisse | |
9 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
10 Apr 24 | Re: Recursion, Yo | 89 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 1 | Chris M. Thomasson | |
10 Apr 24 | Re: Recursion, Yo | 86 | David Brown | |
10 Apr 24 | Re: Recursion, Yo | 84 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 83 | David Brown | |
10 Apr 24 | Re: Recursion, Yo | 73 | bart | |
10 Apr 24 | Re: Recursion, Yo | 71 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 70 | Lawrence D'Oliveiro | |
11 Apr 24 | Re: Recursion, Yo | 4 | Kaz Kylheku | |
11 Apr 24 | Heh heh... (Was: Recursion, Yo) | 3 | Kenny McCormack | |
11 Apr 24 | Re: Heh heh... (Was: Recursion, Yo) | 2 | Kaz Kylheku | |
11 Apr 24 | Re: Heh heh... (Was: Recursion, Yo) | 1 | Kenny McCormack | |
11 Apr 24 | Re: Recursion, Yo | 65 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 62 | Kaz Kylheku | |
11 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
12 Apr 24 | Re: Recursion, Yo | 60 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 2 | Kaz Kylheku | |
12 Apr 24 | Re: Recursion, Yo | 1 | Dan Cross | |
12 Apr 24 | Re: Recursion, Yo | 57 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 6 | David Brown | |
12 Apr 24 | Re: Recursion, Yo | 5 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 3 | David Brown | |
13 Apr 24 | Re: Recursion, Yo | 2 | Janis Papanagnou | |
13 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
13 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 45 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 44 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 1 | bart | |
13 Apr 24 | Re: Recursion, Yo | 42 | Lawrence D'Oliveiro | |
13 Apr 24 | Re: Recursion, Yo | 14 | Michael S | |
14 Apr 24 | Re: Recursion, Yo | 11 | Ben Bacarisse | |
14 Apr 24 | Re: Recursion, Yo | 10 | Michael S | |
15 Apr 24 | Re: Recursion, Yo | 9 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 8 | Keith Thompson | |
15 Apr 24 | Re: Recursion, Yo | 7 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 6 | Keith Thompson | |
15 Apr 24 | Re: Recursion, Yo | 2 | bart | |
15 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 3 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
14 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
14 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
13 Apr 24 | Re: Recursion, Yo | 27 | Janis Papanagnou | |
14 Apr 24 | Re: Recursion, Yo | 26 | Lawrence D'Oliveiro | |
14 Apr 24 | Re: Recursion, Yo | 25 | Ben Bacarisse | |
14 Apr 24 | Re: Recursion, Yo | 2 | bart | |
14 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 22 | Lawrence D'Oliveiro | |
15 Apr 24 | Re: Recursion, Yo | 20 | Chris M. Thomasson | |
15 Apr 24 | Re: Recursion, Yo | 5 | Ben Bacarisse | |
16 Apr 24 | Re: Recursion, Yo | 4 | Lawrence D'Oliveiro | |
17 Apr 24 | Re: Recursion, Yo | 3 | Ben Bacarisse | |
18 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 14 | Janis Papanagnou | |
16 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
16 Apr 24 | Re: Recursion, Yo | 11 | Michael S | |
19 Apr 24 | Re: Recursion, Yo | 9 | Tim Rentsch | |
19 Apr 24 | Re: Recursion, Yo | 4 | bart | |
20 Apr 24 | Re: Recursion, Yo | 3 | Ben Bacarisse | |
20 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
20 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
19 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
19 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
20 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
20 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
12 Apr 24 | Re: Recursion, Yo | 4 | bart | |
12 Apr 24 | Re: Recursion, Yo | 2 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 1 | bart | |
13 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
13 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
11 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
12 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
14 Apr 24 | Re: Recursion, Yo | 1 | fir | |
10 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
10 Apr 24 | Re: Recursion, Yo | 2 | Kaz Kylheku | |
10 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
11 Apr 24 | Re: Recursion, Yo | 4 | Lawrence D'Oliveiro | |
11 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
11 Apr 24 | Re: Recursion, Yo | 2 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
10 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
9 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro |
Les messages affichés proviennent d'usenet.