I want to try to forward declare a templated class with a default template parameter.
My code looks like this:
template <typename T = int> class temp;
int main()
{
temp<> def; // error here
}
template <typename T>
class temp
{
T val;
public:
temp() = default;
// other stuff can go here, not relevant though
}
I am working in c++11. Is there any way around this error or am I just stuck?