boostorg / boostorg/python

map_indexing_suite doesn't work with std::unordered_map<std::string, std::vector<double>> for MSVC 14.2

Đang mở
#289 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
537
Fork
223
Merge trung bình
11 giờ 22 phút
Pull request đã merge (30 ngày)
2

Mô tả

This works on MSVC 14.1 (Visual Studio 17):

#define BOOST_PYTHON_STATIC_LIB

#include
#include
#include
#include
#include
#include

BOOST_PYTHON_MODULE(HelloBoostPython)
{
using namespace boost::python;

class_>("DoubleVector")
.def(vector_indexing_suite>())
;

class_>("StringVecMap")
.def(map_indexing_suite>>())
;
}

But fails when building against the v142 (VS 19) Platform Toolset:

Severity Code Description Project File Line Suppression State
Error C2039 'key_comp': is not a member of 'std::unordered_map>,std::hash,std::equal_to,std::allocator>>>>' HelloBoostPython C:\Misc\boost_1_71_0\boost\python\suite\indexing\map_indexing_suite.hpp 155

Change `std::unordered_map` to `std::map` and it works.

Change `std::unordered_map>` to `std::unordered_map>` and it works.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.