C++ Exception Handling Best Practices: 7 Things To Know

Exception handling in C++ is a well-unschooled topic if you observe initial stages of the learning curve. There are numerous tutorials available online on exception handling in C++. But few explains what you should not do & intricacies around it. So here I am to bridge the gap & show you some intricacies, from where & why you should not throw an exception and C++ exception handling best practices. Along with some newer features introduced for exception handling in Modern C++ with example....

November 3, 2019 · 14 min · 2938 words · Vishal Chovatiya

Understanding unique_ptr with Example in C++11

The smart pointers are a really good mechanism to manage dynamically allocated resources. In this article, we will see unique_ptr with example in C++11. But we don’t discuss standard smart pointers from a library. Rather, we implement our own smart pointer equivalent to it. This will give us an idea of inside working of smart pointers. Brief Prior to C++11, the standard provided std::auto_ptr. Which had some limitations. But from C++11, standard provided many smart pointers classes....

September 15, 2019 · 8 min · 1571 words · Vishal Chovatiya