
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
05.10.2006, 11:07
|
|||
|---|---|---|---|
Отнаследовать шаблонный класс |
|||
|
#18+
Что - то не врублюсь. Варнинги лезут Код: plaintext 1. 2. 3. 4. 5. 6. 7. варнинги is imlicitly a typename ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.10.2006, 11:15
|
|||
|---|---|---|---|
Отнаследовать шаблонный класс |
|||
|
#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:23
|
|||
|---|---|---|---|
|
|||
Отнаследовать шаблонный класс |
|||
|
#18+
вот так прокатило: Код: plaintext 1. 2. под GCC собираетесь? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.10.2006, 11:28
|
|||
|---|---|---|---|
Отнаследовать шаблонный класс |
|||
|
#18+
Голенков Владимирвот так прокатило: Код: plaintext 1. 2. под GCC собираетесь? Спасибо. Да под gcc 3.3.3. Начал рыть в инете нашел typename - не помогло. Для gcc v3 нашел class1<T>:: - тоже не помогло. А так как у тебя - работает, я не успел еще попробовать. :) Блин, как написано в инете комитет ANSI потихоньку сходит с ума ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.10.2006, 11:30
|
|||
|---|---|---|---|
|
|||
Отнаследовать шаблонный класс |
|||
|
#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: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. Компилятор просит уточнить "что вы имели ввиду" ) А резве у меня есть варианты? В данном случае эти имена уникальны. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.10.2006, 11:39
|
|||
|---|---|---|---|
Отнаследовать шаблонный класс |
|||
|
#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:50
|
|||
|---|---|---|---|
|
|||
Отнаследовать шаблонный класс |
|||
|
#18+
AkhИ даже, если на счет шаблонов (я смог даже дальше перевести ;) ), то у меня easy шаблон, т.к. от одного класса. Тут вообще, не может быть непоняток. Переводим ещё чуть дальше: "However" - "несмотря на это" ;) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.10.2006, 12:02
|
|||
|---|---|---|---|
Отнаследовать шаблонный класс |
|||
|
#18+
Dmitrii K. AkhИ даже, если на счет шаблонов (я смог даже дальше перевести ;) ), то у меня easy шаблон, т.к. от одного класса. Тут вообще, не может быть непоняток. Переводим ещё чуть дальше: "However" - "несмотря на это" ;) Ага, "чем дальше в лес, тем толще партизаны". This is minus of standart C++. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=57&mobile=1&tid=2030366]: |
0ms |
get settings: |
8ms |
get forum list: |
12ms |
check forum access: |
6ms |
check topic access: |
6ms |
track hit: |
407ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
56ms |
get tp. blocked users: |
2ms |
| others: | 211ms |
| total: | 723ms |

| 0 / 0 |
