[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

2794.0. "Cast to reference type doesn't invoke conversion function" by AUSSIE::DAYAN (Dany Dayan, CSS Eng. Sydney, DTN 730 6419, SNA-2) Wed Oct 18 1995 05:10

T.RTitleUserPersonal
Name
DateLines
2794.1typo, "maybe" should be "may be"CSC32::D_DERAMODan D'Eramo, Customer Support CenterWed Oct 18 1995 15:1414
2794.2Cfront lossageDECCXX::AMARTINAlan H. MartinWed Oct 18 1995 15:2512
2794.3So when would operator T& () get used?AUSSIE::DAYANDany Dayan, CSS Eng. Sydney, DTN 730 6419, SNA-2Thu Oct 19 1995 05:5357
2794.4Bjarne's explanationDECCXX::AMARTINAlan H. MartinThu Oct 19 1995 11:52120
2794.5Sounds like we should be calling the conversion-to-reference operatorWIBBIN::NOYCEEV5 issues 4 instructions per meterThu Oct 19 1995 13:424
2794.6The compiler behaves as documentedDECCXX::AMARTINAlan H. MartinThu Oct 19 1995 14:1412
2794.7some thoughts ...AUSSIE::DAYANDany Dayan, CSS Eng. Sydney, DTN 730 6419, SNA-2Fri Oct 20 1995 07:52115
2794.8@DECCXX::AMARTINAlan H. MartinFri Oct 20 1995 19:445
2794.12V6.0 prototype does what you want:WIDTH::MDAVISMark Davis - compiler maniacThu Feb 06 1997 13:008
tagged 32% a.out
main:: anOuter=0x11fffe558 val="test"
        *** DBG: got to & cast
inner1=0x11fffe55c
        *** DBG: got to & cast
inner2=0x11fffe55c
        *** DBG: got to & cast
func: arg=0x11fffe55c val="test"
2794.13FNDECCXX::AMARTINAlan H. MartinThu Feb 06 1997 21:4722
Re .9:

This problem is fixed in DEC C++ V5.6 - just keep compiling with -ms and the
user-defined reference conversion operators will get called by casts.


Re .10:

Thanks, I wouldn't have remembered the number.


Re .11:

I'll let you know offline how to get a fixed copy now.


Re .12:

>V6.0 prototype does what you want:

Digital Has It Now.
				/AHM