In the code below:
template<typename T>
struct X {};
int main()
{
X<int()> x; // what is the type of T ?
}
What is the type of T? I saw something like this in the boost sources.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Consider the function
int func(). It has a function typeint(void). It can be implicitly converted to pointer type as the C++ Standard says in 4.3/1, but it this case there’s no need in such conversion, soThas the function typeint(void), not a pointer to it.