c++ - Copying an object for temporary use from the target of a constant-pointer parameter -
i'm looking copy object pointed pointer-to-const (as argument) within function temporary, stack-allocated copy, can manipulate , various checks on. how go doing this, without cheating way of const_cast?
bool f(const foo* foo) { (create temporary copy of foo) (manipulate temporary copy of foo test validity) (output bool) }
if function does, why not pass value?
Comments
Post a Comment