Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well no, for

    std::vector<int> t = {0, 1};
t[0] calls operator[], which returns an int&. This is precisely an lvalue reference, which is kind of like a memory address, but int& is a type in its own right. Calling it a "reference object" is not entirely correct, but it's also not entirely incorrect. And let's not get started on vector<bool>...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: