bcb2007的bug
bcb到了2007,还是没有改正bcb6的bug。
定义如下:
template<class T1>
class TMain
{
private:
T1 _t1;
};
template<class T>
class TParam
{
private:
template<class F>
friend TParam<F> & operator + (TParam<F> & p1, int n);
};
template<class F>
TParam<F> & operator + (TParam<F> & p1, int n)
{
}
以下实例化
typedef TParam<int> param_type;
typedef TMain<param_type > main_type;
编译不能通过。
如果把 TMain 的 _t1 声明为 指针,就可以编译通过。
gcc 3.4.2下都可以通过。