This is usually done with compiler hooks. The compiler has special functions that "fill" the template with the apropriate value (at least in C++0x where type_traits has been standardized).
For instance the is_pod trait uses the __is_pod compiler hook under VC 10 to get the apropriate information.