Boost logo

Boost Users :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-06-19 14:18:50


On 6/19/06, Eduardo Bezerra <edubez_at_[hidden]> wrote:
> 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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net