Похожие чаты

Hi There. I derived class from instantiating template CA : public

CB<T>
I make specialication for type CB<T> on source file of CA.
But when I used it and link it, gcc cannot find reference to CB<T> and its method.
If I put on source file of CB. It works.
I dont want modification to be made on class CB. Which means every derivation would need compilation.
Do you have any idea ?

*Sorry for any language inconvinient.

3 ответов

10 просмотров

could you send a minimal example that reproduces the issue?

you have to specify the type T in the declaration

John- Автор вопроса
Nameful
could you send a minimal example that reproduces t...

Hi There, Thanks for responding. I've tried to make minimal example, but seems doubt whether it can represent error. So upload my entire project to github. This is parent class. https://github.com/ipgdbali/C-Variant-Type-System/blob/master/source/CSimpleType.cpp And this is the child class. https://github.com/ipgdbali/C-Variant-Type-System/blob/master/source/CCString.cpp If template instantiation & specialization is moved to CSimpleType, everything is fine.

Похожие вопросы

Обсуждают сегодня

А как старый хаскел с новым стыковать ? потому как тут работает https://play.haskell.org/saved/C3xpMzcd, а вот тут https://stepik.org/lesson/7602/step/9?unit=1473 нет ошибка C...
Fedor
131
Guys what is ur real (no jokes) expectation of link price during this cycle?
Hobbyist
22
Hey, it seems like a solid project for the gaming industry. What are your initial thoughts?
Josh
26
Ребят, что лучше для реверса: гидра или ида?
En Vind Av Sorg
26
if (user?.choseType === 'oneDay') { await ctx.reply( 'Добро пожаловать в команду «Магнита»! Правда, на один день ☺️ ', ); await ctx.s...
Kokni
1
Вопрос я правильно понимаю что в коде newtype ArrowMap k v = ArrowMap { getArrowMap :: k -> Maybe v } getArrowMap есть функция типа k -> Maybe v, если да, то не понимаю задач...
Fedor
64
Делаю велосипед логгер. К сообщению хочу прикрутить некоторую информацию, типа, кем отправлено, какой уровень, и всякое такое. И тут подумалось мне, почему бы не хранить весь...
Serjone
24
Всем привет! Использую gitlab-ci. Настроил gitlab-agent для деплоя в куб. При деплое проекта в логах такая ошибка: Executing deploy plan failed to watch "ns:my-project/Ingress...
Konstantin Moiseev
4
Всем добрый вечер, подскажите пожалуйста, я вот вот начинаю пользоваться linux, перешёл с винды и хотелось бы узнать есть ли аналоги onedrive чтобы хранить документы в облаке ...
Malik
14
Как Вы считаете нормально ли в двадцатых годах 21 века в ВУЗах Российской Федерации обучать студентов работе с TASM? Не слишком ли это "архаично"? (Если оффтоп или флейм для э...
Spiker01
52
Карта сайта