Boost多索引复杂结构
在boost多索引示例复杂结构中,它在car\u表的car\u manufacturer结构中使用一个键。 如果车辆制造商已修改为具有2个IDBoost多索引复杂结构,boost,Boost,在boost多索引示例复杂结构中,它在car\u表的car\u manufacturer结构中使用一个键。 如果车辆制造商已修改为具有2个ID struct car_manufacturer { std::string name; int cm_code; car_manufacturer(const std::string& name_, const int& cm_code_):name(name_), cm_code(cm_code_){} }; 密钥结构
struct car_manufacturer {
std::string name;
int cm_code;
car_manufacturer(const std::string& name_, const int& cm_code_):name(name_), cm_code(cm_code_){}
};
密钥结构中的密钥看起来是什么样的?已尝试添加另一个KeyExtractor,或从\u key在key\u内使用复合索引,但仍然无法编译
请帮忙。谢谢。经过一番尝试,我的编译错误实际上是由于在没有boost::make_tuple的情况下使用find()造成的 可以从密钥结构中使用相同的密钥。Key1Extrator将是名称和cm_代码的复合键