
On 6/19/06, Eduardo Bezerra
Hi,
In C++ Template Metaprogramming chapter 4, item 4.1.2. Lazy Type Selection typename is_scalar<T>::type and is_scalar<T> can be used interchangeably as in the example below:
[snipped example]
I'm still trying to figure out the reason why.
I understand that to invoke a metafunction you have to reach into its nested ::type member and I also know that integral constant wrappers have a ::value member.
is_scalar<T> inherits from true_type or false_type, which work for both concepts: integral constant (::value) and nullary-metafunction (::type).
Any help would be greatly appreciated
Regards, Eduardo
PS: Are you from brazil? -- Felipe Magno de Almeida Consultor - Expertise Solutions http://www.expertisesolutions.com.br