|
Skip to content | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#content |
| https://belaycpp.com/ |
| Belay the C++ | https://belaycpp.com/ |
| Home | https://belaycpp.com/ |
| Articles | https://belaycpp.com/blog/ |
| All articles | https://belaycpp.com/blog/ |
| History of C++ | https://belaycpp.com/blog/history-of-c-miniseries/ |
| Team | https://belaycpp.com/team/ |
| Contact | https://belaycpp.com/contact/ |
| About | https://belaycpp.com/about/ |
| 🇫🇷 Français | https://fr.belaycpp.com/ |
| a = b = c, a strange consequence of operator associativity | https://belaycpp.com/2022/04/28/a-b-c-a-strange-consequence-of-operator-associativity/ |
| How to quantify technical debt inflation | https://belaycpp.com/2022/04/06/how-to-quantify-technical-debt-inflation/ |
| Who owns the memory? | https://belaycpp.com/2022/03/17/who-owns-the-memory/ |
| 3 interesting behaviors of C++ casts | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/ |
| Constant references are not always your friends | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/ |
| Bad practice | https://belaycpp.com/category/bad-practice/ |
| Code | https://belaycpp.com/category/code/ |
| Dilemma | https://belaycpp.com/category/dilemma/ |
| Good practice | https://belaycpp.com/category/good-practice/ |
| History of C++ | https://belaycpp.com/category/history-of-c/ |
| Meta | https://belaycpp.com/category/meta/ |
| UFO | https://belaycpp.com/category/ufo/ |
| 1 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#notes |
| 3 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#notes |
| 4 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#notes |
| References, C++ FAQ (isocpp.org) | https://isocpp.org/wiki/faq/references#reseating-refs |
| Three reasons to pass `std::string_view` by value – Arthur O’Dwyer – Stuff mostly about C++ (quuxplusone.github.io) | https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/ |
| 5 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#notes |
| Compiler Explorer (godbolt.org) | https://godbolt.org/z/W364GK56h |
| Compiler Explorer (godbolt.org) | https://godbolt.org/z/4MTsjanfo |
| Compiler Explorer (godbolt.org) | https://godbolt.org/z/GqrW9WKMz |
| 2 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#notes |
| February 15, 2022 | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/ |
| SenuaChloe | https://belaycpp.com/author/senuachloe/ |
| Bad practice | https://belaycpp.com/category/bad-practice/ |
| Chloé Lourseyre (Author) | https://belaycpp.com/tag/chloe-lourseyre-author/ |
| Peter Fordham (Editor) | https://belaycpp.com/tag/peter-fordham-editor/ |
| kobica | http://kobica.wordpress.com |
| February 15, 2022 at 4:32 pm | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-115 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Neel Roy | http://responsesofmine.wordpress.com |
| February 16, 2022 at 5:44 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-119 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Chloé `Senua` Lourseyre | http://lacouleurdesroses.wordpress.com |
| February 16, 2022 at 7:48 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-120 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| kobica | http://kobica.wordpress.com |
| February 16, 2022 at 4:42 pm | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-123 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Neel Roy | http://responsesofmine.wordpress.com |
| February 16, 2022 at 5:19 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-116 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Chloé `Senua` Lourseyre | http://lacouleurdesroses.wordpress.com |
| February 16, 2022 at 7:52 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-121 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Neel Roy | http://responsesofmine.wordpress.com |
| February 17, 2022 at 12:31 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-124 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Comments On: C++: Constant references are not always your friends – Responses Of Mine | https://responsesofmine.wordpress.com/2022/02/16/comments-on-c-constant-references-are-not-always-your-friends/ |
| Neel Roy | http://responsesofmine.wordpress.com |
| February 16, 2022 at 5:43 am | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#comment-118 |
| https://responsesofmine.wordpress.com/2022/02/16/comments-on-c-constant-references-are-not-always-your-friends/ | https://responsesofmine.wordpress.com/2022/02/16/comments-on-c-constant-references-are-not-always-your-friends/ |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Les références constantes ne sont pas toujours vos amies | Assurer le C++ | https://fr.belaycpp.com/2022/02/16/les-references-constantes-ne-sont-pas-toujours-vos-amies/ |
| Cancel reply | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/#respond |
| logged in | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F02%2F15%2Fconstant-references-are-not-always-your-friends%2F |
| Previous Previous post: I don’t know which container to use (and at this point I’m too afraid to ask) | https://belaycpp.com/2022/02/02/i-dont-know-which-container-to-use-and-at-this-point-im-too-afraid-to-ask/ |
| Next Next post: 3 interesting behaviors of C++ casts | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/ |
|
Proudly powered by WordPress | https://wordpress.org/ |