2006-10-12から1日間の記事一覧
以下のように書くとコンパイルエラー template typeof(*(T*)0+*(U*)0) add(const T& x, const U& y) { return x+y; } http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11078回避策 template struct C { typedef typeof(*(T*)0+*(U*)0) type; };template typena…
以下のように書くとコンパイルエラー template typeof(*(T*)0+*(U*)0) add(const T& x, const U& y) { return x+y; } http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11078回避策 template struct C { typedef typeof(*(T*)0+*(U*)0) type; };template typena…