You can write the containers as a ".x" file, which is just C with all of the type names replaced by a macro name. Then you #include the .x file where needed, #define the type before, then #undef it after. Token pasting in the C preprocessor makes for unique names, so multiple container types can be used in the same namespace.