Archive for May, 2020

The type trait is_convertible<From, To> checks if an object of type From can be “implicitly” converted to an object of type To. The expression is_convertible<From, To>::value returns true if implicit conversion is possible, else it returns false. For more details, please check out the reference. Let us look at three primary cases. Case-1: Pre-defined Types […]

In the last article, we looked at the std:is_base_of<T1, T2> type trait. One question that a reader asked since that article appeared is “How does is_base_of<> differ from the dynamic_cast<> operator?” Good question! In today’s post let me try to address the key differences between the two. I am not going to cover the dynamic_cast<> […]
Recent Comments