template <typename T=void> ??

This is a discussion on template <typename T=void> ?? within the C++ Programming forums, part of the General Programming Boards category; I've seen this in a lot of example code:
Code:
template <typename T=void>
but I don't quite understand why you ...

but I don't quite understand why you would default it to void?
You can create a void* variable, but not a void variable, so what's going on?

Sometimes these things are used to deliberately cause compile errors in certain situations. For instance, if you want to restrict the types of template parameters which are allowed to be used. See boost::enable_if