【问题标题】:template specialization round-lambda notation模板特化 round-lambda 表示法
【发布时间】:2011-04-04 01:51:45
【问题描述】:
template <class T, class I> struct A;  //EDIT:    template <class T> struct A; : OK

template <class T, class I>
struct A<T(I)>
{

};


void main()
{
    A< int(char) > b;
}

此代码无法编译。哪里错了? 谢谢

【问题讨论】:

  • 我希望 A b 会调用 A 的特化形式

标签: c++ templates


【解决方案1】:
template <class T> struct A; and no template <class T,class I> struct A;

很抱歉回答我自己,但也许这对其他用户有用

【讨论】:

  • 不用道歉,回答自己的问题完全OK。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-07-05
  • 1970-01-01
  • 2012-01-09
  • 2020-12-24
  • 2012-08-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多