http://stackoverflow.com/questions/19876746/stdtolower-and-visual-studio-2013

http://forums.codeguru.com/showthread.php?489969-no-matching-function-transform

std::tolower is overloaded in C++, it's declared in <cctype> as

int tolower(int);

and also in <locale> as

template<CharT> CharT tolower(CharT, const locale&);

so when you say "std::tolower" you get an ambiguous(模糊不清的) reference to an overloaded function.

  1. Why ::tolower version is working?

When you include <cctype> the one-argument overload is declared in namespace std and mightalso be declared in the global namespace, depending on the compiler. If you include <ctype.h> then it's guaranteed to be included in the global namespace, and ::tolower will work (although note Dietmar's points about when it's not safe). The two-argument overload from <locale> is never declared in the global namespace, so ::tolower never refers to the two-argument overload.

2. Why std::tolower is not working in std::transform?

See above, it's an overloaded name.

no matching function transform?的更多相关文章

  1. C++异常:no matching function for call to "Matrix(Matrix&)"

    C++异常:no matching function for call to "Matrix(Matrix&)" 我定义了一个类叫Matrix,其中构造函数explicit ...

  2. error: no matching function for call to 'std::exception:exception(const char[16])'

    环境:codeblocks 语言:C++ 在执行:throw new exception("queue is empty.");时 遇到问题:error: no matching ...

  3. 【ERROR】no matching function for call to 'std::basic_ifstream<char>::basic_ifstream

    错误记录:QT中使用 no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(QString ...

  4. g2o相关问题cs.h,以及no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(Block*&)

    1.对于cs.h找不到的情况 1)编译的时候一定要把csparse在EXTERNAL文件中,编译进去. 2)修改CMakeLists.txt文件中的include_directories中的${CPA ...

  5. Error no matching function for call to 'std::exception::exception(const char [15])'

    Error no matching function for call to 'std::exception::exception(const char [15])' Error 'logic_err ...

  6. Qt error ------ no matching function for call to QObject::connect(QSpinBox*&, <unresolved overloaded function type>, QSlider*&, void (QAbstractSlider::*)(int))

    connect(ui->spinBox_luminosity,&QSpinBox::valueChanged, ui->horizontalSlider_luminosity, & ...

  7. no matching function for call to 'make_pair(std::string&, size_t&)'

    rtl->push_back(make_pair<string, int>(str, pos)); 在redhat6上编译无问题,在centos7上编译出现错误: no matchi ...

  8. boost::bind 不能处理函数重载 (error: no matching function for call to 'bind')

    前言 最近任务多.工期紧,没有时间更新博客,就水一期吧.虽然是水,也不能太失水准,刚好最近工作中遇到一个 boost::bind 的问题,花费了半天时间来定位解决,就说说它吧. 问题背景 项目中使用了 ...

  9. no matching function for call to ‘std::basic_string<char>::assign(std::string&, int)

    使用string中的assign赋值函数报错,代码为: text0.assign(line,i+); 其中text0与line都为string类型 最后发现assign函数的原型为 string &a ...

随机推荐

  1. Protostuff序列化和反序列化

    序列化和反序列化是在应对网络编程最常遇到的问题之一. 序列化就是将Java Object转成byte[]:反序列化就是将byte[]转成Java Object. 这里不介绍JDK serializab ...

  2. 如何用 CSS 绘制各种形状

    自适应的椭圆 1.自适应的椭圆 实现方式是通过border-radius这个属性:border-radius它可以单独指定水平和垂直半径.用 / 分隔这两个值.并且该属性的值不仅可以接受长度值,还能接 ...

  3. 学习嵌入式开发板的Android平台体系结构和源码结构

    本文转自迅为论坛资料:http://www.topeetboard.com 推荐学习嵌入式开发板平台:iTOP-4412开发板 下面这张图出自Google官方,展示了Android系统的主要组成部分. ...

  4. laravel学习:模块化caffeinated

    # Modules Extract and modularize your code for maintainability. Essentially creates "mini-larav ...

  5. autorun - 自动装载/卸载CDROMs并在装载后执行/path/to/cdrom/autorun

    总览 autorun [-lmqv?V] [-a EXEC] [-c CDPLAYER] [-e STRING] [-i MILLISEC] [-n STRING] [-t STRING] [--au ...

  6. Mybatis输入输出映射_动态sql_关联关系(一对一、一对多、多对多)

    Mybatis输入输出映射_动态sql_关联关系(一对一.一对多.多对多)输入输出映射parameterType完成输入映射parameterType可以传入的参数有,基本数据类型(根据id查询用户的 ...

  7. Mysql读写分离与主从数据库设置方案

    Mysql读写分离与主从数据库设置方案 亿仁网 18-10-0711:31 Mysql无非四个功能:增,删,改,读.而将增删改和读分离操作.这样有利于提高系统性能.下面是非常直观的操作: 1.配置: ...

  8. vim common usage

    vim normal模式下 1.c+i+分隔符,删除分隔符里面的内容(不删除分隔符,c+a+分隔符则包括分隔符一起删掉) 如将光标位于'%s : %d years old ' 中,此时按c+i+'   ...

  9. ios中摄像头/相册获取图片压缩图片上传服务器方法总结

    本文章介绍了关于ios中摄像头/相册获取图片,压缩图片,上传服务器方法总结,有需要了解的同学可以参考一下下.     这几天在搞iphone上面一个应用的开发,里面有需要摄像头/相册编程和图片上传的问 ...

  10. Maven 的相关配置

    第一步: 官方下载路径: http://maven.apache.org/download.cgi maven官方网站:http://www.mvnrepository.com/ 第二步: 请下载这个 ...