[QUESTION] MSVC: INTERNAL COMPILER ERROR in combiation with boost::container and boost::movelib::unique_ptr
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Esaminare i file allegati SkinTimer.cpp e SkinTimerManager.cpp, concentrandosi su CSkinTimerManager::TimerIsRunning e sulla dichiarazione di boost::container::map. Riprodurre l'errore MSVC C1001 con la configurazione Boost 1.57.0 indicata, confrontare il caso boost::unordered_map e determinare se il suo utilizzo è appropriato o quali indicazioni di compatibilità siano necessarie.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi! I hope you won't mid if I ask here but I am having some issues with old version of boost. More precisly it is 1.57.0. In short, I am developer of XBMC 4.0 which is backport of modern Kodi to Original Xbox from 2001 using official XDK which is C++98. Since C++98 is missing lot of modern C++11 features I found that boost has lot of them and I am using them as replacement for stuff like smart pointers, lambdas, container algorithms etc.
Problem which I am facing is related to unique_ptr. Kodi is using lot of std::unique_ptr which ofcourse is not available in C++98, so as replacement I am using boost::movelib::unique_ptr. It's working fine as long as it is not used in std containers like vector, set or map. Because there is no concept of move in C++98, having std::map<std::string, boost::movelib::unique_ptr> as return value of method will cause compiler error:
class 'boost::movelib::unique_ptr<T>' : no copy constructor available or copy constructor is declared 'explicit'
I have read somewhere that using vector, map or set from boost::container should fix that. But unfortunately for me, when I use boost::container::map<std::string, boost::movelib::unique_ptr> I get INTERNAL COMPILER ERROR:
Compiling...
SkinTimerManager.cpp
lib\boost\boost\intrusive\bstree_algorithms.hpp(620) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
However, I've found out using boost::unordered_map won't crash compiler. So I am wondering why and can I use that instead of normal map?
Here is source code of files:
SkinTimer.cpp
SkinTimerManager.cpp
One of method which is failing is CSkinTimerManager::TimerIsRunning:
bool CSkinTimerManager::TimerIsRunning(const std::string& timer) const
{
boost::container::map<std::string, boost::movelib::unique_ptr<CSkinTimer> >::const_iterator iter = m_timers.find(timer);
if (iter != m_timers.end())
{
return iter->second->IsRunning(); <-- this line failes
}
CLog::Log(LOGERROR, "Couldn't find Skin Timer with name: {}", timer);
return false;
}
And sorry again if this is not a place to ask for a help :)
- Lingua principale
- HTML
- Stelle
- 8.6k
- Fork
- 2k
- Merge medio
- 9h 35m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di boostorg/boost
-
Add More GHA Runners to CIAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Boost 1.92.0 build errorAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
Tutte le issue di boostorg/boost
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sagemathinc/sagebrush#1683 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
baseballyama/rsvelte#5235 ·
I maintainer di solito rispondono entro 1 giorno
-
lang-core: member access on a component instance reads its internal fields instead of giving nullApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
midspiral/LemmaScript#355 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno