Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
89cf362
CWG2228 Ambiguity resolution for cast to function type
burblebee Jun 18, 2026
8971337
CWG2684 thread_local dynamic initialization
burblebee Jun 18, 2026
0ce80e0
CWG2756 Completion of initialization by delegating constructor
burblebee Jun 18, 2026
b0df5d4
CWG2974 Non-deduced context for qualified-id naming a template
burblebee Jun 18, 2026
4f35cf8
CWG3023 Default arguments in list-initialization
burblebee Jun 18, 2026
63bec0a
CWG3027 Equivalence of pack-index-specifiers
burblebee Jun 18, 2026
8324d65
CWG3046 Enumerations as part of the common initial sequence
burblebee Jun 18, 2026
0c887f1
CWG3146 Usual arithmetic conversions for enumerations are different in C
burblebee Jun 18, 2026
62ec2b0
CWG3159 Instantiation of variables with incomplete array types
burblebee Jun 18, 2026
77b974a
CWG3164 Location of specification of __STDCPP_FLOAT16_T__ macro
burblebee Jun 18, 2026
1a72a9b
CWG3166 Protected access rule for a pointer-to-member from a reflect-…
burblebee Jun 18, 2026
e19b623
CWG3167 Initializing typedefs
burblebee Jun 18, 2026
7b43c61
CWG3168 Issues with integer conversion ranks
burblebee Jun 18, 2026
c21257d
CWG3176 Sequencing default arguments during constant evaluation
burblebee Jun 18, 2026
0284794
CWG3177 Formation of a header-name preprocessing token
burblebee Jun 18, 2026
991a3d6
CWG3179 More edge cases for a void function parameter
burblebee Jun 18, 2026
5ec7f2d
CWG3182 Notional template parameters introduced for an array parameter
burblebee Jun 18, 2026
1cf474a
CWG3183 No expressions in an expression-list
burblebee Jun 18, 2026
2f4e4aa
CWG3184 Pointer arithmetic with similar types
burblebee Jun 18, 2026
550d740
CWG3186 Argument-dependent lookup is for a name
burblebee Jun 18, 2026
452a1f5
CWG3188 Behavior change for class template argument deduction
burblebee Jun 18, 2026
a8d3b41
CWG3190 Ambiguous lookup for type aliases in reflection
burblebee Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CWG3179 More edge cases for a void function parameter
  • Loading branch information
burblebee authored and tkoeppe committed Jul 11, 2026
commit 991a3d690e2b62d4f12e1fa0154bc48084577162
23 changes: 20 additions & 3 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3822,13 +3822,30 @@
If the
\grammarterm{parameter-declaration-clause}
is empty, the function takes no arguments.
A parameter list consisting of a single unnamed non-object parameter of
non-dependent type \keyword{void} is equivalent to an empty parameter
list.
A parameter list consisting of a single unnamed non-object parameter
whose type is the same as\iref{temp.over.link} \keyword{void}
is interpreted as an empty parameter list.
\indextext{parameter!\idxcode{void}}%
Except for this special case, a parameter shall not have type \cv{}~\keyword{void}.
A parameter with volatile-qualified type is deprecated;
see~\ref{depr.volatile.type}.
\begin{example}
\begin{codeblock}
template<class T>
struct S {
void f(std::void_t<T*>); // \#1
};
S<int> x; // error: \#1 has a parameter of type \tcode{void}

template<class T>
struct S2 {
void f(std::void_t<int*>); // \#2
};
S2<int> y; // OK, \#2 is a zero-parameter function
\end{codeblock}
\end{example}

Comment thread
burblebee marked this conversation as resolved.
Resolved
\pnum
If the
\grammarterm{parameter-declaration-clause}
\indextext{argument type!unknown}%
Expand Down