This article discusses why const or reference member variables can be problematic and the workarounds.
The implication of const or reference member variables in C++
by Lesley Lai
From the article:
I decide to write this post because the same problem raises several time by different people on Twitter and the #include <C++> discord server. There are solid reasons on why you should avoid const or reference member variables in C++...
Add a Comment