c++ - [Bug report] Illegal cast
- Daniel James (25/25) Aug 12 2004 A change from the preprocessor bugs.
- Walter (1/1) Aug 12 2004 Thanks for all the reports. I've added them to the bug list. -Walter
A change from the preprocessor bugs.
I think the following is valid:
     struct base
     {
     };
     struct derived : base
     {
     };
     struct convertible
     {
         operator derived() { return derived(); }
     };
     void test(base x)
     {
     }
     int main()
     {
         convertible x;
         test(x);
     }
But dmc gives the error message:
     slice.cpp(21) : Error: illegal cast
     from: derived
     to  : base
Daniel
 Aug 12 2004
Thanks for all the reports. I've added them to the bug list. -Walter
 Aug 12 2004








 
  
  
  "Walter" <newshound digitalmars.com>
 "Walter" <newshound digitalmars.com>