How dare they say ++it is faster than it++

This is NOT true for the iterators of 100% of the STL containers - including the commonly used ones - std::vector, std::unordered_map, std::array, std::list, std::unordered_set, std::map, std::set, std::queue and ALL others.

Read More

Dangerous Usage of GTest's EXPECT Macro

GTest is a unit testing library by Google. It provides easy to use macros for enforcing expectation in unit tests. Commonly used macros are of kind EXPECT_* and ASSERT_*, example: ASSERT_TRUE(c), EXPECT_TRUE(c), EXPECT_EQ(a, b), ASSERT_EQ(a, b).

Read More

Undefined Behaviour in C++

The introduction of C++ starts with the most important thing about C++, the Undefined Behaviour (UB). UB exists only in C/C++, or their sibling languages (eg: Rust, Circle etc.), having similar performance goals. UB doesn’t exists in most of the programming languages like Java, Python, Perl, Groovy, JavaScript, TypeScript, Bash, Go.

Read More