コンパイラをVisualStudioからg++に変更していますが、関数の引数での参照渡しに問題があります。
Visual Studioでは、機能は次のとおりです。
void Foo(int&a, int&b)
この関数でa、bが変更されるようにします。したがって、g++では使用できません
void Foo(const int&a, const int &b)
また、右辺値の参照は私のg++では許可されていません。
void Foo( int&& a, int&& b)
それで、ポインタを使用することがコードを変換する唯一の方法ですか?
void Foo( int* a, int* b)
P / S:これはg++でコンパイルするときのエラーです:
error: no matching function for call to ‘Steerable::buildSCFpyrLevs(Tensor<double, 2ul>, std::vector<Tensor<double, 2ul> >&, int&, int&, int&, bool&)’
Steerable.cpp:63:100: note: candidate is:
Steerable.h:93:7: note: void Steerable::buildSCFpyrLevs(Steerable::data_ref, std::vector<Tensor<double, 2ul> >&, int, int, int, bool)
Steerable.h:93:7: note: no known conversion for argument 1 from ‘Tensor<double, 2ul>’ to ‘Steerable::data_ref {aka Tensor<double, 2ul>&}’
そして、関数宣言は次のとおりです。
typedef Tensor<value_type,2> data_type;
typedef data_type& data_ref;
vector<Steerable::data_type>& Steerable::buildSCFpyr(Steerable::c_data_ref im, int nLevel, int nDir, int twidth, bool subsample)
エラーのある行:
buildSCFpyrLevs(imdft.FreqComplexFilter(toComplex(lo0mask)),pyr_freq,nLevel,nDir,twidth, subsample);