Incomprehensible function signature - Return reference to an array of N objects

前端 未结 2 1930
我在风中等你
我在风中等你 2021-02-05 04:15

I\'ve come across the following signature

double(&rotate_vec(double(&val)[4]))[4];

In the comments it \"claims\" to accept and

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 04:54

    double ( &rotate_vec( double (&val)[4] ) )[4]
    

    A function named rotate_vec

    double ( &rotate_vec( double (&val)[4] ) )[4]
    

    ...that takes as an argument, a reference to an array of four doubles

    double ( &rotate_vec( double (&val)[4] ) )[4]
    

    ...and returns a reference to an array of four doubles.

提交回复
热议问题