看板 C_and_CPP 關於我們 聯絡資訊
※ 引述《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