Type Comparisons and Modifications
Sometimes we need to manipulate or compare different types. We can use the type traits library for that!
We'll cover the following...
We'll cover the following...
Type Comparisons
The library supports three kinds of type comparisons:
| Function | Description | 
|---|---|
| template <class Base, class Derived> | Checks if Derivedis derived fromBase. | 
| struct is_base_of | |
| template <class From, class To> | Checks if Fromcan be converted toTo. | 
| struct is_convertible | |
| template <class T, class U> | Checks if the types TandUare the same. | 
| struct |