Why do some people prefer “T const&” over “const T&”?

后端 未结 9 1631
醉梦人生
醉梦人生 2020-12-02 12:25

So, I realize that const T& and T const& are identical and both mean a reference to a const T. In both cases, the reference is also constan

9条回答
  •  臣服心动
    2020-12-02 12:49

    Being as code is predominantly English-based, programmers tend to read left to right, so const T& reads naturally to us where the compiler reads it inside out right to left so T const& reads naturally(reference to a const T)

提交回复
热议问题