boost::融合访问联合视图的键类型作为地图
boost::fusion accessing key type of joint view as map
我正在尝试将 ash 框架转换为 c++ 以合并到我的项目中,我的开发环境是 Vista 32 和 Visual C++ 2008 Express,我正在使用boost_1_37_0库,我不打算升级环境,直到我达到一些结果......
鉴于:
typedef Component Pcomponent;
typedef WaitForstart2 Pcomponent2;
typedef boost::fusion::pair<ComponentWONTEXISTS,Pcomponent> component_pair1;
typedef boost::fusion::pair<WaitForstart2,Pcomponent2> component_pair2;
typedef boost::fusion::map<component_pair1> componentDictType1;
typedef boost::fusion::map<component_pair2> componentDictType2;
typedef boost::fusion::joint_view<componentDictType1, componentDictType2>joincomponentDictType;
我无法使用at_key解决如何访问这些类型
boost::fusion::at_key<ComponentWONTEXISTS, dictionaryjoint>(boost::fusion::as_map(dictionaryjoint));
谢谢
PS:我很着急,但我会尝试重新格式化问题一段时间
问候
这很有趣,但我想我设法找到了解决方案:
typedef boost::fusion::result_of::as_map<boost::fusion::joint_view<componentDictType1, componentDictType2> >::type MAPTYPE;
MAPTYPE aDict;
Pcomponent ptempj3 = boost::fusion::at_key<ComponentWONTEXISTS,MAPTYPE>(aDict);
相关文章:
- CGAL:在浏览平面地图时使用类型"标记"
- C++以迭代方式搜索混合类型地图
- 为什么重建的地图类型与原始地图类型不同?
- 为什么我必须将地图值的类型从 & 更改为 (int*)&
- C++ 在地图中存储变体类型
- 如何高效/正确地存储等距游戏的不同类(单个超类的所有子类型)的地图?
- MPL地图实例化类型
- 具有可比的密钥类型的地图
- GCC shared_ptr和地图上make_shared分离的变量类型错误
- STLS STD :: MAP和STD :: vector;在地图中检查对象类型
- 来自存储在带有基类类型的地图中的派生类的调用函数
- 如何创建结构类型数组的地图对象
- 将自定义类型作为地图的可能键的可能方法有哪些
- 根据按键类型选择地图或unordered_map
- 推论具有不同值类型的地图的返回类型
- 如何以不同的数据类型作为值实现地图
- 如何从地图中的所有值类型中找到最大值
- 指针的地图指向不同返回类型和签名的功能
- 如何在地图中添加值,并将向量作为值类型
- 如何指定与模板一起使用的地图类型