哪一个更正确,使用更广泛?实际问题是最后一个问题,我认为行为发生了变化。
int *test; //for this, it is probably both?
int* test;
int& test;
int &test;
实际问题:
const int test;
int const test;
const int* test;
int* const test; //<-- I guess this also have a different meaning if I consider the last one?
const int& test;
int const& test; //also, considering last one, any difference?
const int*& test;
int* const& test; //<-- this is the correct one for stating "I won't modify the passed object, but I may modify the one pointed"? I have had problems with the other one sometimes, does the other one has some other meaning?
const int* const& test; //<-- another meaning?
如果您能指出您是否知道该主题中的任何视觉“歧义” ,我也会很高兴。