|
|
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Что - то не врублюсь. Варнинги лезут Код: plaintext 1. 2. 3. 4. 5. 6. 7. варнинги is imlicitly a typename ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:07 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Собственно, дело глубже. в классе class1: Код: plaintext 1. 2. в классе class2: Код: plaintext 1. Это упрощенно. Вообщем, ругается на конструктор class2: class2<T>::f is implicitly a type name, implicit typename i deprecated. Как исправить? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:15 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
вот так прокатило: Код: plaintext 1. 2. под GCC собираетесь? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:23 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Голенков Владимирвот так прокатило: Код: plaintext 1. 2. под GCC собираетесь? Спасибо. Да под gcc 3.3.3. Начал рыть в инете нашел typename - не помогло. Для gcc v3 нашел class1<T>:: - тоже не помогло. А так как у тебя - работает, я не успел еще попробовать. :) Блин, как написано в инете комитет ANSI потихоньку сходит с ума ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:28 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
http://www.agapow.net/programming/cpp/implicit-typename The problem here is that when a compiler encounters something like classname::something, it has to decide whether this is a member variable, member function, or name of a type declared inside the class (e.g. a typedef or nested class). In the case of dependent names (ones that depend on a template parameter) this is easy. Often, compilers assume it is a type name - which would be correct in this case. However more recent compilers demand that you resolve this ambiguity. Компилятор просит уточнить "что вы имели ввиду" ) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:30 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Dmitrii K. http://www.agapow.net/programming/cpp/implicit-typename The problem here is that when a compiler encounters something like classname::something, it has to decide whether this is a member variable, member function, or name of a type declared inside the class (e.g. a typedef or nested class). In the case of dependent names (ones that depend on a template parameter) this is easy. Often, compilers assume it is a type name - which would be correct in this case. However more recent compilers demand that you resolve this ambiguity. Компилятор просит уточнить "что вы имели ввиду" ) А резве у меня есть варианты? В данном случае эти имена уникальны. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:35 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Dmitrii K. http://www.agapow.net/programming/cpp/implicit-typename The problem here is that when a compiler encounters something like classname::something, it has to decide whether this is a member variable, member function, or name of a type declared inside the class (e.g. a typedef or nested class). In the case of dependent names (ones that depend on a template parameter) this is easy. Often, compilers assume it is a type name - which would be correct in this case. However more recent compilers demand that you resolve this ambiguity. Компилятор просит уточнить "что вы имели ввиду" ) И даже, если на счет шаблонов (я смог даже дальше перевести ;) ), то у меня easy шаблон, т.к. от одного класса. Тут вообще, не может быть непоняток. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:39 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
AkhИ даже, если на счет шаблонов (я смог даже дальше перевести ;) ), то у меня easy шаблон, т.к. от одного класса. Тут вообще, не может быть непоняток. Переводим ещё чуть дальше: "However" - "несмотря на это" ;) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 11:50 |
|
||
|
Отнаследовать шаблонный класс
|
|||
|---|---|---|---|
|
#18+
Dmitrii K. AkhИ даже, если на счет шаблонов (я смог даже дальше перевести ;) ), то у меня easy шаблон, т.к. от одного класса. Тут вообще, не может быть непоняток. Переводим ещё чуть дальше: "However" - "несмотря на это" ;) Ага, "чем дальше в лес, тем толще партизаны". This is minus of standart C++. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2006, 12:02 |
|
||
|
|

start [/forum/topic.php?fid=57&gotonew=1&tid=2030366]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
138ms |
get topic data: |
9ms |
get first new msg: |
5ms |
get forum data: |
2ms |
get page messages: |
51ms |
get tp. blocked users: |
1ms |
| others: | 210ms |
| total: | 446ms |

| 0 / 0 |
