【C++】template 統合 ..
[
2ch
|
▼Menu
]
■コピペモード
□
スレを通常表示
□
オプションモード
□このスレッドのURL
■項目テキスト
653:デフォルトの名無しさん 05/06/07 22:32:56 >>650 int f(int i); int g(int); // これも脳内エラーが出るか? 654:デフォルトの名無しさん 05/06/08 00:28:08 >>650 例えば、 template< template<class T, class A> class Vector> struct hoge { typedef T value_t; }; typedef hoge<std::vector> hv_t; としても、この時点では”T"はまだ決まってないわけだから 名前付けても使えないのです。 無論、”Vector"もこのままでは使えません。 実際の使用には template< tempalte<class,class> class V> struct hoge { template<class T,class A> struct bind { typedef V<T,A> type; }; }; typedef hoge<std::vector> hv; typedef typename hv::template bind<int,std::allo..>::type のように使うことになりますね。 655:デフォルトの名無しさん 05/06/08 00:31:15 補足ですが、 使えない == typedefできないということです。
次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
レスジャンプ
mixiチェック!
Twitterに投稿
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch
5397日前に更新/262 KB
担当:undef