>>685
コンパイル時に型が決まらないテンプレートを使いたいとき、
仮想関数と組み合わせるというテクニックがある。
struct f_base{ virtual void f() = 0; };
template <typename T> struct f : f_base {
  void f() {
    C<T> c;
    g(c);
    // ...
  }
};