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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -