Is 'auto const' and 'const auto' the same?

前端 未结 2 1499
北荒
北荒 2020-12-25 09:27

Is there a semantic difference between auto const and const auto, or do they mean the same thing?

2条回答
  •  盖世英雄少女心
    2020-12-25 10:03

    The const qualifier applies to the type to the immediate left unless there is nothing to the left then it applies to the type to the immediate right. So yup it's the same.

提交回复
热议问题