- Typedefs: practically I don't use typedefs. I know I did, but I just cannot recall when I used them (it must have been a long time ago). What's the problem with them?
I'm using typedefs all the time, mostly for containers. Identifiers are shorter and type modifications (like std::list to std::vector) are only necessary in one place.
The problem with them is that you have to decide whether you use "C" for typedefs, too. If you do, you go against the original intention, namely to abstract from types. When you suddenly use a BigInt class instead of int, you have to rename all corresponding typedefs. If you don't, you break with the convention that all class types are prefixed with "C", so you cannot rely on it anymore. In both cases, you're better off without any prefix.
It is even more extreme for struct and class: These keywords are absolutely identical except for the default visibility. Structures
are classes. Especially if you use private and public to denote all members, you can directly replace struct/class by the other keyword and have exactly the same semantic. Nevertheless, your convention enforces a change in the type name.
- Templates: I'm trying to avoid them, whenever it's possible. If they're a must, I only use them for smaller classes.
I have a lot of templates in reusable libraries, and a few in client projects. Again, you loosen your convention, since class templates are actually no classes. Also consider the template parameters (like T): In generic code, you can't say whether a type is a class or not. Anyway, it is completely irrelevant. But again, you suddenly have class types in your code without being prefixed, which is inconsistent.
But more important, why do you need to know whether a type is a class or not? It often doesn't matter. In cases where it
does matter, you need to know more about the type anyway in order to use it (e.g. which methods it provides). You don't get any relevant information by using prefixes, but still have the above mentioned drawbacks.
Notice that this naming convention with "C" prefixes had another origin (sort of namespace for MFC classes, like "gl" for OpenGL). It was considered a good idea to use in own code by some programmers, with the result that MFC classes and own user code cannot be distinguished anymore. And somehow, it has gained popularity, although there is no reason to use it in modern C++. No one of the big C++ experts (Sutter, Meyers, Alexandrescu, ...) makes use of type prefixes. Neither do the standard library, nor Boost, nor SFML (which I consider one of the most properly designed C++ libraries).