OpenCV または OpenCascade からいくつかのコードを読み取ると、C++ でこの種の宣言と実装がよく見られます。
TEST(Shape_SCD, regression)
{
const int NSN_val=5;//10;//20; //number of shapes per class
const int NP_val=120; //number of points simplifying the contour
const float CURRENT_MAX_ACCUR_val=95; //99% and 100% reached in several tests, 95 is fixed as minimum boundary
ShapeBaseTest<float, computeShapeDistance_Chi> test(NSN_val, NP_val, CURRENT_MAX_ACCUR_val);
test.safe_run();
}
これはばかげた質問になる可能性がありますね。これがどのタイプの宣言であるかがわからないためです。関数のように見えますが、戻り値の型はありません。コンストラクターの場合、引数リストに変数の型がないのはなぜですか?
ありがとう