Ternary operator - warnings about unsued values
Warning(s): source_file.cpp: In function ‘int main()’:
source_file.cpp:7:38: warning: left operand of comma operator has no effect [-Wunused-value]
std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl;
^
source_file.cpp:7:40: warning: right operand of comma operator has no effect [-Wunused-value]
std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl;
^
source_file.cpp:7:42: warning: right operand of comma operator has no effect [-Wunused-value]
std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl;
^
source_file.cpp:7:44: warning: right operand of comma operator has no effect [-Wunused-value]
std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl;
^
6
|
|