...ing logging 4.0

はてなブログに移行しました。D言語の話とかいろいろ。

2010-08-09から1日間の記事一覧

typename

まずはC++. #include <iostream> template <typename T> struct A { typename T::X v; }; struct B { typedef int X; }; void main() { A<B> x; x.v = 42; std::cout << x.v << std::endl; } 次にD言語. import std.stdio; struct A(T) { T.X v; } struct B { alias int X; } void m</b></typename></iostream>…