g++で以下の警告のようなメッセージ(`note')が出るのですが
これは何を意味しているのでしょうか?
コンパイラはaarch64-linux-gnu-g++-10で
オプション-std=c++14に変えるとメッセージは出ません
またx86_64-linux-gnu-g++-10でコンパイルすると
-std=c++17でも-std=c++14でもメッセージは出ません
恐らくC++の規格の問題だと思いますのでこちらに書かせて頂きます
$ cat test.cpp
#include <cmath>
#include <utility>
using namespace std;
pair <double, double>
hoge (double p_x, double p_y)
{
return make_pair (p_x, p_y);
}
int main () {return 0;}
$ g++ -std=c++17 test.cpp
test.cpp: In function ‘std::pair<double, double> hoge(double, double)’:
test.cpp:6:29: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
6 | hoge (double p_x, double p_y)
| ^