This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/22107] Type checking seems to break with string operator=


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-17 20:17 -------
Invalid, and here is why:
  std::string s = 1234;

trys to call a constructor and not operator=.

s = 1234; calls operator= where the type is char so 1234 is converted to char and then calls the 
operator=.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22107


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]