|
Skip to content | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#content |
| https://belaycpp.com/ |
| Belay the C++ | https://belaycpp.com/ |
| Home | https://belaycpp.com/ |
| Articles | https://belaycpp.com/blog/ |
| All articles | https://belaycpp.com/blog/ |
| History of C++ | https://belaycpp.com/blog/history-of-c-miniseries/ |
| Team | https://belaycpp.com/team/ |
| Contact | https://belaycpp.com/contact/ |
| About | https://belaycpp.com/about/ |
| 🇫🇷 Français | https://fr.belaycpp.com/ |
| a = b = c, a strange consequence of operator associativity | https://belaycpp.com/2022/04/28/a-b-c-a-strange-consequence-of-operator-associativity/ |
| How to quantify technical debt inflation | https://belaycpp.com/2022/04/06/how-to-quantify-technical-debt-inflation/ |
| Who owns the memory? | https://belaycpp.com/2022/03/17/who-owns-the-memory/ |
| 3 interesting behaviors of C++ casts | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/ |
| Constant references are not always your friends | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/ |
| Bad practice | https://belaycpp.com/category/bad-practice/ |
| Code | https://belaycpp.com/category/code/ |
| Dilemma | https://belaycpp.com/category/dilemma/ |
| Good practice | https://belaycpp.com/category/good-practice/ |
| History of C++ | https://belaycpp.com/category/history-of-c/ |
| Meta | https://belaycpp.com/category/meta/ |
| UFO | https://belaycpp.com/category/ufo/ |
| 1 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#notes |
| Compiler Explorer (godbolt.org) | https://godbolt.org/z/8c1jY84bo |
| 2 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#notes |
| Compiler Explorer (godbolt.org) | https://godbolt.org/z/jabjWfx4s |
| 3 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#notes |
| A list of bad practices commonly seen in industrial projects | https://belaycpp.com/2021/06/01/a-list-of-bad-practices-commonly-seen-in-industrial-projects/ |
| GDB online Debugger | Code, Compile, Run, Debug online C, C++ (onlinegdb.com) | https://www.onlinegdb.com/1yy8DJZCk |
| 4 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#notes |
| GDB online Debugger | Code, Compile, Run, Debug online C, C++ (onlinegdb.com) | https://www.onlinegdb.com/cIpVuNN0O |
| GDB online Debugger | Code, Compile, Run, Debug online C, C++ (onlinegdb.com) | https://www.onlinegdb.com/xACawgDWj |
| 5 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#notes |
| static_cast | https://en.cppreference.com/w/cpp/language/static_cast |
| dynamic_cast | https://en.cppreference.com/w/cpp/language/dynamic_cast |
| const_cast | https://en.cppreference.com/w/cpp/language/const_cast |
| reinterpret_cast | https://en.cppreference.com/w/cpp/language/reinterpret_cast |
| *_pointer_cast | https://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast |
| Explicit type conversion – cppreference.com | https://en.cppreference.com/w/cpp/language/explicit_cast |
| Coding Standards, C++ FAQ (isocpp.org) | https://isocpp.org/wiki/faq/coding-standards#pointer-casts |
| Assembly shows copy constructor is called (godbolt.org) | https://godbolt.org/z/8c1jY84bo |
| Assembly shows that 3 conversion constructors are called (godbolt.org) | https://godbolt.org/z/jabjWfx4s |
| Trying to cast a struct into another in C (onlinegdb.com) | https://www.onlinegdb.com/1yy8DJZCk |
| Pointer casting in C (onlinegdb.com) | https://www.onlinegdb.com/cIpVuNN0O |
| Const cast in C (onlinegdb.com) | https://www.onlinegdb.com/xACawgDWj |
| March 2, 2022 | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/ |
| SenuaChloe | https://belaycpp.com/author/senuachloe/ |
| UFO | https://belaycpp.com/category/ufo/ |
| Chloé Lourseyre (Author) | https://belaycpp.com/tag/chloe-lourseyre-author/ |
| Peter Fordham (Editor) | https://belaycpp.com/tag/peter-fordham-editor/ |
| 3 comportements intéressants à propos des conversions en C++ | Assurer le C++ | https://fr.belaycpp.com/2022/03/02/3-comportements-interessants-a-propos-des-conversions-en-c/ |
| March 3, 2022 at 10:24 am | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#comment-126 |
| Log in to Reply | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F03%2F02%2F3-interesting-behaviors-of-c-casts%2F |
| Cancel reply | https://belaycpp.com/2022/03/02/3-interesting-behaviors-of-c-casts/#respond |
| logged in | https://belaycpp.com/wp-login.php?redirect_to=https%3A%2F%2Fbelaycpp.com%2F2022%2F03%2F02%2F3-interesting-behaviors-of-c-casts%2F |
| Previous Previous post: Constant references are not always your friends | https://belaycpp.com/2022/02/15/constant-references-are-not-always-your-friends/ |
| Next Next post: Who owns the memory? | https://belaycpp.com/2022/03/17/who-owns-the-memory/ |
|
Proudly powered by WordPress | https://wordpress.org/ |