Why Can’t I store references in a `std::map` in C++?

They way I understand it, references are implemented as pointers under the hood. The reason why you can’t store them in a map is purely semantic; you have to initialize a reference when it’s created and you can’t change it afterward anymore. This doesn’t mesh with the way a map works.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)