Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
shallow vs. deep copy and physical vs logical constWarning(s): Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 shallow --------- init: toy_string (shallow) const_aaa @ 000000A10D0EFB90 pstr: 000000A10D2519C0 => "abcd" copy construct: toy_string (shallow) mutable_b @ 000000A10D0EFB88 pstr: 000000A10D2519C0 => "abcd" const_aaa == mutable_b ? true after change mutable_b: toy_string (shallow) mutable_b @ 000000A10D0EFB88 pstr: 000000A10D2519C0 => "**" after change mutable_b: toy_string (shallow) const_aaa @ 000000A10D0EFB90 pstr: 000000A10D2519C0 => "**" const_aaa == mutable_b ? true init: toy_string (shallow) const_ccc @ 000000A10D0EFB98 pstr: 000000A10D251AB0 => "abcd" after assignment: toy_string (shallow) mutable_b @ 000000A10D0EFB88 pstr: 000000A10D251AB0 => "abcd" const_ccc == mutable_b ? true after change mutable_b: toy_string (shallow) mutable_b @ 000000A10D0EFB88 pstr: 000000A10D251AB0 => "!!!" after change mutable_b: toy_string (shallow) const_ccc @ 000000A10D0EFB98 pstr: 000000A10D251AB0 => "!!!" const_ccc == mutable_b ? true deep --------- init: toy_string (deep) const_aaa @ 000000A10D0EFB78 pstr: 000000A10D251970 => "abcd" copy construct: toy_string (deep) mutable_b @ 000000A10D0EFB68 pstr: 000000A10D251AD0 => "abcd" const_aaa == mutable_b ? true after change mutable_b: toy_string (deep) mutable_b @ 000000A10D0EFB68 pstr: 000000A10D251AD0 => "**" after change mutable_b: toy_string (deep) const_aaa @ 000000A10D0EFB78 pstr: 000000A10D251970 => "abcd" const_aaa == mutable_b ? false init: toy_string (deep) const_ccc @ 000000A10D0EFB70 pstr: 000000A10D251A00 => "abcd" after assignment: toy_string (deep) mutable_b @ 000000A10D0EFB68 pstr: 000000A10D251A80 => "abcd" const_ccc == mutable_b ? true after change mutable_b: toy_string (deep) mutable_b @ 000000A10D0EFB68 pstr: 000000A10D251A80 => "!!!" after change mutable_b: toy_string (deep) const_ccc @ 000000A10D0EFB70 pstr: 000000A10D251A00 => "abcd" const_ccc == mutable_b ? false |
λ
.NET NoSQL database for rapid development
|