part 1

  编译器 vs2015 VC++。

  完整的错误信息粘贴如下:

d:\program files (x86)\microsoft visual studio 14.0\vc\include\utility(361): error C2338: tuple_element index out of bounds

  在百度上找了一下,没有中文版解释。我觉得今后把C++编译时遇到的错误及解决方法记录下来会很有裨益。

part 2 正文

  错误的代码:

auto it1 = find_if(numbers.cbegin(), numbers.cend(), bind(check_size, "feng", placeholders::_2));

  错误原因

auto newCallable = bind(check_size, "feng", placeholders::_2);

  错误的使用了 placeholdesr::_2 ,其含义是 newCallable 的第二个参数,是暴露给算法的第二个参数。要知道,newCallable 只有一个参数是暴漏的算法的,还没有第一个呢,直接就有了第二个,编译时错误妥妥的!

  如何改正

auto it1 = find_if(numbers.cbegin(), numbers.cend(), bind(check_size, "feng", placeholders::_1));

  把 placeholdesr::_2 改成 placeholdesr::_1。

(全文完)

转载于:https://www.cnblogs.com/fengyubo/p/4866623.html

编译时错误之 error C2338: tuple_element index out of bounds相关推荐

  1. \src\core\plainobjectbase.h(311): error C2338: YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX

    \src\core\plainobjectbase.h(311): error C2338: YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX 其实就是正常的 ...

  2. mysql错误码1709_MySQL5.6出现ERROR 1709 (HY000): Index column size too large问题的解决方法...

    一.问题 mysql 5.6 出现如下问题: [ERROR 1709 (HY000): Index column size too large. The maximum column size is ...

  3. 【Kafka】Error when freeing index buffer (kafka.log.OffsetIndex) NullPointException

    1.美图 2.背景 今天windows启动kafka的时候,突然报错 2015-07-14 17:00:45,197] WARN Error when freeing index buffer (ka ...

  4. error: C2338: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt

    Qt系列文章目录 文章目录 Qt系列文章目录 前言 一.Q_DECLARE_METATYPE是什么? 示例代码 二.编译错误 三.问题解决 四.源码下载 五.运行效果 前言 一.Q_DECLARE_M ...

  5. error C2338: /RTCc rejects conformant code错误解决

    在编译一个项目时,发现在调试版本时提示这个出错: 1>------ 已启动生成: 项目: simulation2, 配置: Debug Win32 ------ 1>precompiled ...

  6. SpringBoot:Error resolving template [index], template might not exist or might not be acce...解决方法

    SpringBoot异常:Error resolving template [index], template might not exist or might not be accessible b ...

  7. Golang#sql: Scan error on column index 5, name “created_at“: unsupported Scan

    问题 golang中time.Time类型直接存储到mysql报错,如下: sql: Scan error on column index 5, name "created_at" ...

  8. Springboot 报错 Error resolving template [index]

    控制台报错: Error resolving template [index], template might not exist or might not be accessible by any ...

  9. Assertion `index >= -sizes[i] index < sizes[i] “index out of bounds“` failed

    CUDA error: device-side assert triggered,Assertion `index >= -sizes[i] && index < size ...

最新文章

  1. vue css 应用变量_如何使用CSS Grid和CSS变量快速为应用创建原型
  2. Py之pyecharts:基于大数据对人工智能进行各种可视化图表分析
  3. 特别完善的面试知识总结
  4. 离散哈特莱变换(DHT)及快速哈特莱变换(FHT)学习
  5. 三种地理参考信息模型:WMS,WFS,WCS(转)
  6. CTF-汇编语言归纳
  7. 如何查看本地的崩溃log_过年回家,还怕抢不到票?程序员教你如何抢票
  8. java 与 .net socket_java.net.ServerSocket和java.net.Socket
  9. eclips git中的add to Index无效解决
  10. flex读取bolg的代码
  11. ARCore快速入门-02导入ARCore For Unity
  12. 均线颜色怎么区分_六种颜色的均线包括哪六种颜色,其代表的含义分别是什么?...
  13. 在CSDN年收入竟达五位数?----大学生技术自媒体成长之路
  14. java soaoffice_SOAOFFICE是什么?
  15. vscode的常用插件
  16. python创建窗体_python生成窗口
  17. 【大学生软件测试基础】三角形类型 - 白盒测试 - 语句覆盖 -02
  18. web-sso 系统集成 单点登录
  19. 【分析师】股票模型构建
  20. 如何安装git及远程提交文件

热门文章

  1. Flutter Mac下环境配置
  2. 关于流控器件和压控器件
  3. SecureCRT配置proxy连接云主机
  4. sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0
  5. subprocess中执行git命令报告no such file or directory一例
  6. DataFrame纵向合并
  7. Adaboost 算法的原理与推导(转载)
  8. 关于PrintQueueCollection()类,跨线程调用错误“线程无法访问此对象,因为另一个线程拥有该对象”
  9. python输入一个人的名字_怎样用c语言做到输入一个人的名字才会输出一个心?
  10. 浅谈StringBuilder