C++语法解释
C++ syntax explanation
我有以下内联函数:
inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0)
{
normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels()), maxOutputValue;
};
在这一行出现以下编译器警告:
warning: right-hand operand of comma has no effect
有人能描述这种书面函数应该做什么吗?
逗号运算符在这种情况下是什么意思?
maxOutputValue
在函数参数之外。因此,编译器将其处理为逗号运算符的右操作数,在这种情况下,这是无效的。有关详细信息,请参阅链接的维基百科页面。
您在maxOutputValue
之前关闭了括号,因此编译器将其解释为一个函数,并在其之后解释为"无用"值,这就是错误所说的
相关文章:
- 解释通过 lex/flex 实现 C/C++嵌套的"#include "Header""语法?
- 有人可以解释以下语法及其功能吗?
- 解释通过从函数引用返回数组的语法
- 你能解释一下这个语法吗:ros::rate loop_rate(10);
- 解释奇怪的 c++ 编译和语法
- 有人可以根据此代码解释起床和降低语法
- C++类构造函数语法的解释
- hpp文件中的块,这是c ++语法吗?为什么没有传入参数?有人可以解释一下,请
- 有人能解释一下特殊的std::函数模板参数列表语法(这个奇怪的类型(Types..))吗
- 引用变量何时合适,为什么?你能解释一下实际的语法和位置吗?
- 有人可以解释这种语法吗?T (&arr)[arrsize] vs T& arr[arrsize]
- 你能解释一下这个C++函数定义的语法吗?
- 难道没有人一劳永逸地解释typedef的语法吗?
- Visual Studio 中无法解释的语法错误
- 有人能解释一下这个模板函数声明的语法吗
- Matlab语法[C++解释]
- 有人能解释一下这个语法吗
- C++语法解释
- 任何人都可以解释boost元组库的语法
- 有人能解释一下这个冒号#语法吗