M**********n 发帖数: 432 | 1 Suppose we have the following declaration:
template
class Derived: public Base::Nested {
......
For this declaration,
Is Base or Nested the class name for the base?
If base is base class name, then what is Nested?
If Nested is the base class name, what is Base? |
t****t 发帖数: 6806 | 2 没听说过namespace?
【在 M**********n 的大作中提到】 : Suppose we have the following declaration: : template : class Derived: public Base::Nested { : ...... : For this declaration, : Is Base or Nested the class name for the base? : If base is base class name, then what is Nested? : If Nested is the base class name, what is Base?
|
M**********n 发帖数: 432 | 3 You are saying namespace can also be templated?
【在 t****t 的大作中提到】 : 没听说过namespace?
|
P********e 发帖数: 2610 | 4 我估计你程序应该是这样的
template
class Base
{
pulic: class Nested{};
};
所以Nested is base
【在 M**********n 的大作中提到】 : Suppose we have the following declaration: : template : class Derived: public Base::Nested { : ...... : For this declaration, : Is Base or Nested the class name for the base? : If base is base class name, then what is Nested? : If Nested is the base class name, what is Base?
|
p****o 发帖数: 1340 | 5 Nested is a sub-class of Base.
【在 M**********n 的大作中提到】 : Suppose we have the following declaration: : template : class Derived: public Base::Nested { : ...... : For this declaration, : Is Base or Nested the class name for the base? : If base is base class name, then what is Nested? : If Nested is the base class name, what is Base?
|
t****t 发帖数: 6806 | 6 不是namespace, 但是都叫scope
【在 M**********n 的大作中提到】 : You are saying namespace can also be templated?
|