Ahmad

Ahmad

#094 – Introduction to value categories

An expression is a sequence of literals, variables, operators, and function calls that can be evaluated to produce a result. Expressions may represent values, objects, or functions. Expressions are not statements An expression is a block of code that can be evaluated.…

#093 – Using non-type template parameters

Most template examples use types as template arguments: Here, T is a placeholder for a type such as int, double, or std::string. However, when we create a std::bitset, we specify the number of bits in <> as a literal, not a type. This is the…

#089 – Stop bad function calls with = delete

Due to implicit conversions, C++ allows us to call functions with arguments that don’t make sense. For example, the program below will successfully compile even though it makes no sense. The compiler doesn’t even throw an error or warning. Even…