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. 镜像中的 Everything, GnomeLive ,KdeLive ,livecd ,NetInstall的区别?

    everything: 对完整版安装盘的软件进行补充,集成所有软件 GnomeLive , GNOME桌面版 KdeLive , KDE桌面版 livecd 光盘上运行的系统 ,NetInstall ...

  2. MySQL——sql注入

    https://blog.csdn.net/lin_tuer/article/details/54809330 https://github.com/mysqljs/mysql#escaping-qu ...

  3. MATLAB 中的randn函数

    matlab函数 randn:产生正态分布的随机数或矩阵的函数 randn:产生均值为0,方差σ^2 = 1,标准差σ = 1的正态分布的随机数或矩阵的函数. 用法: Y = randn(n):返回一 ...

  4. github修改仓库项目的语言类型

    github是 采用Linguist来自动识别你的代码应该归为哪一类. 解决方法: 我们可以在仓库的根目录下添加.gitattributes文件: ## 使用 `.gitattributes` 配置文 ...

  5. idea文件全部变红, 文件全部红色

    idea如果当前project用了版本控制器,其下面新建的所有的项目默认都是加入到版本控制里面,所以项目名称和文件都是红色的,如图: 看起来非常不爽, 那么如何解决呢? File–>Settin ...

  6. 09C++指针

    指针 6.1 指针的概念 请务必弄清楚一个内存单元的地址与内存单元的内容这两个概念的区别.在程序中一般是通过变量名来对内存单元进行存取操作的.其实程序经过编译以后已经将变量名转换为变量的地址,对变量值 ...

  7. JS日期,金钱处理

    一丶获取两个时间的天数 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> ...

  8. django显示图片

    dirctory vickey_django vickey(projectname) vickey __init__.py __pycache__ settings.py urls.py wsgi.p ...

  9. iOS中声音采集与播放的实现(使用AudioQueue)

    都说iOS最恶心的部分是流媒体,其中恶心的恶心之处更在即时语音. 所以我们先不谈即时语音,研究一下,iOS中声音采集与播放的实现. 要在iOS设备上实现录音和播放功能,苹果提供了简单的做法,那就是利用 ...

  10. 邮箱地址自动提示jQuery插件

    // mailAutoComplete.js v1.0 邮箱输入自动提示// 2010-06-18 v2.0 使用CSS class类代替CSS对象,同时增强代码可读性// 2010-06-18 v2 ...