由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - question on template and inheritance?
相关主题
Help: who has gcc 4.0 or highera c++ question
template 类的继承问题Any difference between class and typename identifier?
C++ Q88: nested non-template class (转载)[菜鸟问题]类模板问题
一个C++ template的问题文一个简单的c++
a c++ question for templatewhere to define my template function
[合集] 关于template和inheritance的问题请教C++ template question
C++ Q73: template (skillport) (转载)thrust help ~~~
C++ Q90 - Q92 (转载)c++ template question:
相关话题的讨论汇总
话题: base话题: nested话题: template话题: class
进入Programming版参与讨论
1 (共1页)
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?
1 (共1页)
进入Programming版参与讨论
相关主题
c++ template question:a c++ question for template
c++ template question:[合集] 关于template和inheritance的问题请教
私有成员不能用类成员函数修改?C++ Q73: template (skillport) (转载)
谁给详细说一下这句C++ Q90 - Q92 (转载)
Help: who has gcc 4.0 or highera c++ question
template 类的继承问题Any difference between class and typename identifier?
C++ Q88: nested non-template class (转载)[菜鸟问题]类模板问题
一个C++ template的问题文一个简单的c++
相关话题的讨论汇总
话题: base话题: nested话题: template话题: class