of a functions?
https://isocpp.org/wiki/faq/const-correctness
😂, Too tired to RTFM, any short normal explanation?
https://isocpp.org/wiki/faq/const-correctness#const-ptr-vs-ptr-const
Yup this is what I thought, but in cppcon, there is talk that one can't call vector<int>::begin() on vector<int> const &, So how did T const & make T const? 🧐
std::vector<int> const& and const std::vector<int> & is the same.
No difference in this case, bacause it's a reference.
So in pointers is the only time it applies?
because reference can't change where they "point" to
😂 then what's the fucking point of a T const & ?
"More Readability" for some people.
Someone once decided, let's not decide for people where they want to put const :D
Обсуждают сегодня