Boost logo

Boost Users :

From: Raul Huertas Diaz (rhuertas_at_[hidden])
Date: 2002-05-08 06:02:31


El Tue, 7 May 2002 09:19:31 -0700 (PDT)
Noel Yap <yap_noel_at_[hidden]> escribió:

> It looks like it's working find with gcc-2.95.3-5.
> One thing, though, it gave me a compiler error when I
> didn't #include <typeinfo>. Since you didn't list
> which header files you're including, I'm not sure if
> you're including <typeinfo> or not and what the
> Borland's behaviour would be if you didn't.
>

I tried a different version in gcc 3.0.3 and I think it works find.

The modified code is:

________________________________________
int main(int argc, char* argv[])
{
    std::cout
    << typeid(trait<int>::t1).name()
    << std::endl
    << typeid(trait1<int,1>).name()
    << std::endl
    << typeid(trait1<int,0>).name()
    << std::endl
    << trait<int>::value
    << std::endl
    ;
    return 0;
}
________________________________________

and the output is:
________________________________________
6trait1IiLi1EE
6trait1IiLi1EE
6trait1IiLi0EE
1
________________________________________

-- 
Raúl Huertas Díaz
Redes y Comunicaciones
Ingeniero de Sistemas
TCP Sistemas e Ingenieria
Fernández Caro, 7, 3ª planta
Tel.: +34 91 367 32 79 (Ext. 535)
Fax:  +34 91 407 71 39
rhuertas_at_[hidden]
http://www.tcpsi.es

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