C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
C2549
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2549
 
     user-defined conversion cannot specify return type
 
     A user-defined conversion cannot specify a return type.
 
     The following is an example of this error:
 
          class X
          {
          public:
             int operator int() { return value; }   // error
             operator int() { return value; }       // OK
          private:
             int value;
          };
                                    -♦-