Re: [分享] typedef dereference of a type
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 5 之 5 篇):