MPL newbie : what is the difference between mpl::true_ and true_type

I'm a newbie for both boost and MPL. My question is regarding about the differences between mpl::true_ and true_type. While from my point of view they are both structure of constant boolean. Even in the implementation true_type is derived from mpl:true_. So why we need both data structure instead of only single one. When we should use mpl::true_ instead and true_type and vice versa Thanks

Linh Ha
I'm a newbie for both boost and MPL. My question is regarding about the differences between mpl::true_ and true_type. While from my point of view they are both structure of constant boolean. Even in the implementation true_type is derived from mpl:true_. So why we need both data structure instead of only single one. When we should use mpl::true_ instead and true_type and vice versa
They are identical and compatible but belong to different libraries. The benefit is, that MPL can interoperate with TypeTraits. I try to use whichever is most appropriate. If I write something that resembles a type trait, I'll use integral_constant from type traits and vice versa. -- Philipp Moeller
participants (3)
-
Linh Ha
-
Mathias Gaunard
-
Philipp Moeller