C++学习(四八三)无法从“std::pair<const _Kty,_Ty>”转换为“_Objty”

2023-10-30

使用vs2017编译osgEarth2.9的FeatureSourceIndexNode.cpp遇到的

使用VS2017编译osgEarth2.7过程中遇到问题总结_justslowdown_going的博客-CSDN博客>> xmemory0(881): error C2440: “初始化”: 无法从“std::pair<const _Kty,_Ty>”转换为 to _Objty位置:FeatureSourceIndexNode.cpp解决方法:使用osgEarth3.0版本下的“struct KeyIter : public std::iterator<std::input_iterator_tag, typename T::value_type>”替换掉2.6版本下的“struhttps://blog.csdn.net/siwen0/article/details/112137409VS2017 15.8: build issue / FeatureSourceIndexNode.cpp · Issue #1187 · gwaldron/osgearth · GitHubicon-default.png?t=M276https://github.com/gwaldron/osgearth/issues/1187解决办法:

1、修改源代码

2、使用vs2010编译

FeatureSourceIndexNode.cpp
1>e:\projects\qt5.12\osg_earth_src\osgearth\osgearth2.9\src\osgearth\virtualprogram : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0(881): error C2440: “初始化”: 无法从“std::pair<const _Kty,_Ty>”转换为“_Objty”
1>        with
1>        [
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Ty=osg::ref_ptr<osgEarth::Features::RefIDPair>
1>        ]
1>        and
1>        [
1>            _Objty=unsigned long
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0(881): note: 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(984): note: 参见对正在编译的函数 模板 实例化“void std::_Default_allocator_traits<_Alloc>::construct<_Ty,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(_Alloc &,_Objty *const ,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Alloc=std::allocator<std::_Tree_node<unsigned long,std::_Default_allocator_traits<std::allocator<osgEarth::Features::FeatureID>>::void_pointer>>,
1>            _Ty=unsigned long,
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Objty=unsigned long
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(983): note: 参见对正在编译的函数 模板 实例化“void std::_Default_allocator_traits<_Alloc>::construct<_Ty,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(_Alloc &,_Objty *const ,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Alloc=std::allocator<std::_Tree_node<unsigned long,std::_Default_allocator_traits<std::allocator<osgEarth::Features::FeatureID>>::void_pointer>>,
1>            _Ty=unsigned long,
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Objty=unsigned long
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(1162): note: 参见对正在编译的函数 模板 实例化“std::_Tree_node<_Ty,std::_Default_allocator_traits<_Alloc>::void_pointer> *std::_Tree_comp_alloc<_Traits>::_Buynode<std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Ty=unsigned long,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>,
1>            _Traits=std::_Tset_traits<osgEarth::Features::FeatureID,std::less<osgEarth::Features::FeatureID>,std::allocator<osgEarth::Features::FeatureID>,false>,
1>            _Kty=osgEarth::Features::FeatureID
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(1162): note: 参见对正在编译的函数 模板 实例化“std::_Tree_node<_Ty,std::_Default_allocator_traits<_Alloc>::void_pointer> *std::_Tree_comp_alloc<_Traits>::_Buynode<std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Ty=unsigned long,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>,
1>            _Traits=std::_Tset_traits<osgEarth::Features::FeatureID,std::less<osgEarth::Features::FeatureID>,std::allocator<osgEarth::Features::FeatureID>,false>,
1>            _Kty=osgEarth::Features::FeatureID
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(1345): note: 参见对正在编译的函数 模板 实例化“std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<_Ty>>> std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::emplace_hint<std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<_Ty>>>,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Ty=unsigned long,
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Pr=std::less<osgEarth::Features::FeatureID>,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>
1>        ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree(1345): note: 参见对正在编译的函数 模板 实例化“std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<_Ty>>> std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::emplace_hint<std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>>&>(std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<_Ty>>>,std::pair<const _Kty,osg::ref_ptr<osgEarth::Features::RefIDPair>> &)”的引用
1>        with
1>        [
1>            _Ty=unsigned long,
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Pr=std::less<osgEarth::Features::FeatureID>,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>
1>        ]
1>e:\projects\qt5.12\osg_earth_src\osgearth\osgearth2.9\src\osgearthfeatures\featuresourceindexnode.cpp(102): note: 参见对正在编译的函数 模板 实例化“void std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::insert<`anonymous-namespace'::KeyIter<osgEarth::Features::FeatureSourceIndexNode::FIDMap>>(_Iter,_Iter)”的引用
1>        with
1>        [
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Pr=std::less<osgEarth::Features::FeatureID>,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>,
1>            _Iter=`anonymous-namespace'::KeyIter<osgEarth::Features::FeatureSourceIndexNode::FIDMap>
1>        ]
1>e:\projects\qt5.12\osg_earth_src\osgearth\osgearth2.9\src\osgearthfeatures\featuresourceindexnode.cpp(102): note: 参见对正在编译的函数 模板 实例化“void std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::insert<`anonymous-namespace'::KeyIter<osgEarth::Features::FeatureSourceIndexNode::FIDMap>>(_Iter,_Iter)”的引用
1>        with
1>        [
1>            _Kty=osgEarth::Features::FeatureID,
1>            _Pr=std::less<osgEarth::Features::FeatureID>,
1>            _Alloc=std::allocator<osgEarth::Features::FeatureID>,
1>            _Iter=`anonymous-namespace'::KeyIter<osgEarth::Features::FeatureSourceIndexNode::FIDMap>
1>        ]
1>已完成生成项目“osgEarthFeatures.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

C++学习(四八三)无法从“std::pair<const _Kty,_Ty>”转换为“_Objty” 的相关文章

随机推荐

  • Nacos搭建集群

    复制三份Nacos服务端文件 配置相同的数据库 参考前面nacos上线文档 修改每一个的application properties文件内的 server port 然后在每个conf文件夹内新增 cluster conf文件 文件内容为
  • python写ecxel。多个条件对Excel中的数据进行筛选并处理

    在第很多行中 D列不空 C列不空 那么A列B列E列F列不空 D列空 C列不空 那么A列B列E列F列空 import pandas as pd def process data filename 读取Excel文件 df pd read ex
  • Android 反编译三种方式

    首先反编译别人的APK 主要是学习别人的实现逻辑 给自己一个思路 比较商业的APK也不会给你留下这个漏洞 一些核心的业务处理会在后台进行操作 本地的 APK 也会进行混淆加密等 好了废话不多说 步入正题 方法一 在线反编译 很简单方便的一个
  • 思科路由器配置

    1 路由表 show IP route 用户模式 特权模式 enable 全局配置模式 configure terminal config 配置主机名称 enable configure terminal config hostname t
  • RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR

    torch backends cudnn benchmark True 加在开头
  • MySQL基础学习(四)——SQL语句之DML语句

    前言 上一篇博客介绍了一下SQL语句中的DDL和DCL语句 主要涉及通过SQL赋予或者撤回相关的用户权限 创建数据表 创建索引等内容 这一篇博客开始总结DML语句 就是我们开发中常用的一些select insert update delet
  • C#常见编程

    1 编写一段程序 运行时向用户提问 你考了多少分 0 100 接受输入后判断其等级并显示出来 判断依据如下 等级 优 90 100分 良 80 89分 中 60 69分 差 0 59分 static void Main string arg
  • 合并两个有序链表(easy)

    将两个升序链表合并为一个新的 升序 链表并返回 新链表是通过拼接给定的两个链表的所有节点组成的 示例 1 输入 l1 1 2 4 l2 1 3 4 输出 1 1 2 3 4 4 示例 2 输入 l1 l2 输出 示例 3 输入 l1 l2
  • 【Golang源码学习】chromedp篇

    GitHub https github com chromedp chromedp chromedp go RunResponse 官方注释 func RunResponse ctx context Context actions Acti
  • WKWebView之离线加载以及遇到的问题

    目录 前言 一 离线包是什么 二 方案调研 NSURLProtocol WKURLSchemeHandler 三 具体实施 1 离线包的分发 2 服务器对请求接口处理 3 客户端下载离线包 4 webview设置拦截 5 WKURLSche
  • Typcho反序列化漏洞分析

    Typcho反序列化漏洞分析 文章首发 https xz aliyun com t 9428 影响范围 2017年10月24日之前的所有版本 环境搭建 下载地址 http typecho org 这里主要是说下 在intall之前 需要我们
  • Linux Ubuntu搭建Git服务器

    之前介绍过如何在Windows上搭建Git仓库服务器 不过服务器用的比较多的还是Linux 因为便宜 同一个VPS商一般来说Linux比Windows便宜 没有图形界面 低配置VPS的也可以跑动Linux 开源免费 我感觉比较灵活 下载源也
  • 创建对象的五种方式

    1 使用new关键字 gt 调用构造函数 2 使用Class的newInstance方法 gt 调用构造函数 3 使用Constructor的newInstance方法 gt 调用构造函数 4 使用clone方法 gt 没有调用构造函数 5
  • Oracle中的触发器(trigger)

    1 触发器的定义 数据库触发器是一个与表相关联 存储PL SQL语句的 东西 每当一个特定的数据操作语句 insert update delete 在指定的表上发出时 Oracle自动执行触发器中定义的语句序列 例如 当员工信息插入后 自动
  • java基于winbox 工具下使用 api获取映射表api数据

    Winbox 是基于 windows下远程管理 ROS的软件 提供直观方便的图形界面 用它能登陆路由器 这个路由器是软路由ROUTEOS制作的 用Winbox登陆后 就可以配置路由器了 用这个软件便于配置路由器 Winbox控制台使用TCP
  • 如何利用今日头条极速版挣点小钱

    红包 1元现金速撸 红包 下载 今日头条极速版 进入 任务 填邀请码 1386552161 即可立即提现1元到支付宝 每天阅读 睡觉 签到 走路都有钱领
  • C++类和对象——(对象的赋值拷贝构造函数)

    目录 对象的赋值 目录 对象的赋值 1 提出问题 2 解决办法 拷贝构造函数 1 拷贝构造函数的原型 2 调用机制 3 使用例程代码 总代码工程 对象的赋值 1 提出问题 能否使用一个已经构造好的对象去初始化另一个对象 C 编译器又是如何处
  • 明日方舟服务器不稳定,《明日方舟》服务器恢复正常 补偿玩家400玉+40理智

    原标题 明日方舟 服务器恢复正常 补偿玩家400玉 40理智 此前我们曾报道 明日方舟 进不去 登微博热搜 官方表示正在紧急修复 现在 明日方舟 官方表示之前出现的问题已于18 00完成相关修复并已逐步恢复正常 将为受波及的玩家发放400合
  • Java 创建文件,文件夹不存在时,如何创建

    创建文件 String url C Users yz Desktop test new File String format s s s url test txt createNewFile 如果文件夹路径不存在则会报如下错误 正确代码 S
  • C++学习(四八三)无法从“std::pair<const _Kty,_Ty>”转换为“_Objty”

    使用vs2017编译osgEarth2 9的FeatureSourceIndexNode cpp遇到的 使用VS2017编译osgEarth2 7过程中遇到问题总结 justslowdown going的博客 CSDN博客 gt gt xm