For educational reasons, I'm studying the C++ language using clang-12 std=c++17
And I have the following code:
Fullcode
#include <cstdio>
#include <iostream>
#include <type_traits>
using namespace std;
struct S {
void operator()(int) {}
};
int main()
{
S(*d)(int);
//d = whatValue??
return 0;
}
I'm studying the types of variables that exist in the C++ language, and I came across this situation above.
What value can I assign to the d variable?
Could it be a language bug? I've already researched several topics on stackoverflow and cppreference and haven't found any way to initialize this variable S(*d)(int) .