Construction of a void Type?
问题 I was given a piece of code that uses void() as an argument. The code doesn't compile... obviously? Can we instantiate anything of type void ? I believed the answer was no, with the exception of a void* . For example: Writing the function void askVoid(void param) {} errors: A parameter may not have void type Writing the function void askNaught() {} and calling it with askNaught(void())` errors: error C2660: takeNaught : function does not take 1 arguments Writing the templatized function