Add template inheritance to the stream templates