From cppreference.com
| Defined in header <meta>
|
||
consteval bool is_vararg_function( std::meta::info r );
|
(since C++26) | |
Returns true if r represents a vararg function. Otherwise returns false.
A vararg function (also known as variadic function) is a function whose parameter list ends with an ellipsis that is not a pack expansion. Such functions take a variable number of arguments.
Parameters
| r | - | a reflection value |
Return value
true if r represents a vararg function; otherwise false.
Example
Run this code
#include <meta>
void f(...);
static_assert(std::meta::is_vararg_function(^^f));
void g(auto...);
static_assert(!std::meta::is_vararg_function(^^g));
int main() {}
See also
(C++26) |
checks if reflection represents a function (function) |