[boost] Re: Re: is_convertible love

2003-03-06 Thread Rani Sharoni
Shame on me! I did saw 13.3.3.1/6 before posting my answer: [...] When the parameter has a class type and the argument expression has the same type, the implicit conversion sequence is an identity conversion. [...] It seems that overloading takes place before initialization. Initialization

[boost] Re: is_convertible love

2003-02-21 Thread Rani Sharoni
David Abrahams wrote: David Abrahams [EMAIL PROTECTED] writes: I'm in love with the new is_convertible; I can now detect move-copy types like auto_ptr! Could the old is_convertible do this? The new is_convertible can't help you: struct A { A(); A(A); }; void f(A); const A a f(a); // viable

[boost] Re: is_convertible love

2003-02-21 Thread Rani Sharoni
Rani Sharoni wrote: David Abrahams wrote: David Abrahams [EMAIL PROTECTED] writes: I'm in love with the new is_convertible; I can now detect move-copy types like auto_ptr! Could the old is_convertible do this? The new is_convertible can't help you: struct A { A(); A(A); }; void f

[boost] Re: Re: is_class

2003-02-18 Thread Rani Sharoni
Peter Dimov wrote: Rani Sharoni wrote: You can probably use a similar approach to implement yet another is_class (not void, reference and doesn't have an implicit standard conversion to bool). I wonder whether int () const has an implicit standard conversion to bool. ;-) Good catch

[boost] Re: Re: is_class

2003-02-18 Thread Rani Sharoni
Rani Sharoni wrote: Peter Dimov wrote: Rani Sharoni wrote: You can probably use a similar approach to implement yet another is_class (not void, reference and doesn't have an implicit standard conversion to bool). I wonder whether int () const has an implicit standard conversion to bool

[boost] Re: is_base_and_derived explanation?

2003-02-01 Thread Rani Sharoni
John Maddock [EMAIL PROTECTED] wrote in message 012801c2c9eb$d07c4da0$b2e5193e@1016031671">news:012801c2c9eb$d07c4da0$b2e5193e@1016031671... OK the new version of is_base_and_derived is checked in, along with stricter test cases, can someone who understands the implementation (I'm absolutely

[boost] Re: is_base_and_derived question

2003-01-30 Thread Rani Sharoni
Daniel Frey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Compiler: GNU C++ version 3.2 20020927 (prerelease) I also tried the GCC 3.2.1, but without success. It compiles, but it gives the wrong results. Any ideas, or results from other compilers?

[boost] Re: is_base_and_derived question

2003-01-30 Thread Rani Sharoni
Gennaro Prota [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 30 Jan 2003 12:38:36 -, John Maddock [EMAIL PROTECTED] wrote: Except it *doesn't work* ! John, unfortunately I have to turn off my computer now. I had just hacked up a version that

[boost] Re: is_base_and_derived question

2003-01-30 Thread Rani Sharoni
Rani Sharoni [EMAIL PROTECTED] wrote in message b1bd2p$i97$[EMAIL PROTECTED]">news:b1bd2p$i97$[EMAIL PROTECTED]... Gennaro Prota [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 30 Jan 2003 12:38:36 -, John Maddock [EMAIL

[boost] Re: is_base_and_derived question

2003-01-29 Thread Rani Sharoni
John Maddock [EMAIL PROTECTED] wrote in message 014601c2c79c$f53f7f00$8e3687d9@1016031671">news:014601c2c79c$f53f7f00$8e3687d9@1016031671... Before changing the documentation please consider the following improved implemetation that overcomes ambiguity and access control issues of the

[boost] Re: Re: is_base_and_derived question

2003-01-28 Thread Rani Sharoni
David Abrahams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... John Maddock [EMAIL PROTECTED] writes: Yes, a class is it's own superclass/subclass, but IMO not it's own base: so it is a bug in the implementation. I'd like to suggest changing the

[boost] Re: Function Type Typedefs in Classes, Etc.

2003-01-13 Thread Rani Sharoni
Paul Mensonides [EMAIL PROTECTED] wrote in message 000701c2b9fd$f56ef7f0$9d00a8c0@c161550b">news:000701c2b9fd$f56ef7f0$9d00a8c0@c161550b... Is this well-formed: struct X { typedef void func_t(int); func_t member; }; void X::member(int) { return; } What about: struct X {

[boost] Re: type_traits / is_compound

2002-12-17 Thread Rani Sharoni
John Maddock [EMAIL PROTECTED] wrote in message 010201c2a5c9$c1feb560$43e7193e@1016031671">news:010201c2a5c9$c1feb560$43e7193e@1016031671... given the Standard's wording in 3.9/1: ... There are two kinds of types: fundamental types and compound types. ... isn't the current implementation of

[boost] Re: Re: type_traits / is_compound

2002-12-17 Thread Rani Sharoni
Daniel Frey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rani Sharoni wrote: In the same fashion - I think that if type is not cv void, not reference and not convertible to bool (via standard conversion) then it's class type. Hm, could