Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - bug?: Error: reference must refer to same type or be const
inline ss_sint8_t &transfer_resource(ss_sint8_t &r, ss_sint8_t v) { return (r = v); } inline ss_uint8_t &transfer_resource(ss_uint8_t &r, ss_uint8_t v) { return (r = v); } inline ss_sint16_t &transfer_resource(ss_sint16_t &r, ss_sint16_t v) { return (r = v); } inline ss_uint16_t &transfer_resource(ss_uint16_t &r, ss_uint16_t v) { return (r = v); } inline ss_sint32_t &transfer_resource(ss_sint32_t &r, ss_sint32_t v) { return (r = v); } Changing it to { return ((r = v), r); } fixes it, but it still seems like a bug to me. Other compilers don't have a problem with the original form Feb 22 2005
Any movement on this? "Matthew" <admin.hat stlsoft.dot.org> wrote in message news:cvfag8$2vl2$1 digitaldaemon.com...inline ss_sint8_t &transfer_resource(ss_sint8_t &r, ss_sint8_t v) Sep 11 2005
|