[QUESTION] MSVC: INTERNAL COMPILER ERROR in combiation with boost::container and boost::movelib::unique_ptr
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Xem xét các tệp SkinTimer.cpp và SkinTimerManager.cpp được đính kèm, tập trung vào CSkinTimerManager::TimerIsRunning và khai báo boost::container::map. Tái hiện lỗi MSVC C1001 với thiết lập Boost 1.57.0 đã được báo cáo, so sánh trường hợp boost::unordered_map và xác định liệu việc sử dụng nó có phù hợp hay cần hướng dẫn tương thích nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 :)
- Ngôn ngữ chính
- HTML
- Star
- 8.6k
- Fork
- 2k
- Merge trung bình
- 9 giờ 35 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của boostorg/boost
-
Add More GHA Runners to CIĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
Boost 1.92.0 build errorĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Tất cả issue của boostorg/boost
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sagemathinc/sagebrush#1683 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
baseballyama/rsvelte#5235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lang-core: member access on a component instance reads its internal fields instead of giving nullĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midspiral/LemmaScript#355 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày