C PLUS PLUS Programming Notes - luludoos/SaveTheCode GitHub Wiki

  1. "If we use a reference simply to avoid copying, we use a const reference. Consequently, when we see a non-const-reference argument, we assume that the function changes the value of its argument; that is, when we see a pass-by-non-const-reference we assume that not only can that function modify the argument passed, but that it will, so that we have to lood extra carefully at the call to make sure that it does what we expect it to." -- Bjarne Stroustrup Programming Principles and Practice Using C++