Re: [分享] typedef dereference of a type

看板C_and_CPP作者 (如雲如風的人生)時間15年前 (2011/01/17 12:57), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/5 (看更多)
※ 引述《yoco315 (眠月)》之銘言: : 最近寫個東西,遇到一個需求, : template < typename IterType > : class Foo { : typename ??? ValueType ; : } ; 有點好奇,一般不是都寫成 struct Foo { template<class A> A operator()(A &a) { return a + 1; // for example } }; IterType it; Foo()(*it); 上面這樣嗎? 可以請教什麼時機會用到Foo<IterType>()(it)呢...<(_ _)> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.19.66
文章代碼(AID): #1DCymZEk (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1DCymZEk (C_and_CPP)