I have this code and GCC prints "what!?". How can I avoid that, so that the void cast simply has the C meaning "Ignore the lonely 'a;'"?
#include <iostream>
struct A {
template<typename T>
operator T() {
std::cout << "what!?";
}
};
int main() {
A a;
(void)a;
}