Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Boost多索引复杂结构_Boost - Fatal编程技术网

Boost多索引复杂结构

Boost多索引复杂结构,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_){} }; 密钥结构

在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_){}
};
密钥结构中的密钥看起来是什么样的?已尝试添加另一个KeyExtractor,或从\u key在key\u内使用复合索引,但仍然无法编译


请帮忙。谢谢。

经过一番尝试,我的编译错误实际上是由于在没有boost::make_tuple的情况下使用find()造成的

可以从密钥结构中使用相同的密钥。Key1Extrator将是名称和cm_代码的复合键