Click here to Skip to main content
15,917,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
hawkgao012921-Jul-09 16:30
hawkgao012921-Jul-09 16:30 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
Stuart Dootson21-Jul-09 16:44
professionalStuart Dootson21-Jul-09 16:44 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
hawkgao012921-Jul-09 19:02
hawkgao012921-Jul-09 19:02 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
Stuart Dootson21-Jul-09 19:53
professionalStuart Dootson21-Jul-09 19:53 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
hawkgao012921-Jul-09 21:40
hawkgao012921-Jul-09 21:40 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
Stuart Dootson21-Jul-09 22:27
professionalStuart Dootson21-Jul-09 22:27 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
hawkgao012921-Jul-09 23:01
hawkgao012921-Jul-09 23:01 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
Stuart Dootson21-Jul-09 23:13
professionalStuart Dootson21-Jul-09 23:13 
hawkgao0129 wrote:
ADL finds operator+ in CStringT


No. The CStringT operator+ is not visible (so is not found). ADL doesn't come into play because you've declared TestString within the global namespace.

In addition, (I may have mis-stated this earlier) ADL won't find the operator+ in CStringT even if you did put TestString in the ATL namespace because it's a friend function defined in class scope, so is only visible to parameters of type CStringT.

As I said - C++ name lookup rules are very complex - so I apologise for making some slight mistakes in explanation (but remain unsurprised that I did so Smile | :) ).

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Use template with "Conversion Functions" get problem. [modified] Pin
hawkgao012921-Jul-09 23:25
hawkgao012921-Jul-09 23:25 
GeneralRe: Use template with "Conversion Functions" get problem. Pin
Stuart Dootson22-Jul-09 0:11
professionalStuart Dootson22-Jul-09 0:11 
QuestionPosting too many messages Pin
Russell'21-Jul-09 0:13
Russell'21-Jul-09 0:13 
AnswerRe: Posting too many messages Pin
«_Superman_»21-Jul-09 0:23
professional«_Superman_»21-Jul-09 0:23 
QuestionDiable F12 in word using automation Pin
gadag21-Jul-09 0:12
gadag21-Jul-09 0:12 
QuestionOpp Concept Pin
zakkas248320-Jul-09 23:25
zakkas248320-Jul-09 23:25 
AnswerRe: Opp Concept Pin
_AnsHUMAN_ 20-Jul-09 23:31
_AnsHUMAN_ 20-Jul-09 23:31 
GeneralRe: Opp Concept Pin
zakkas248320-Jul-09 23:33
zakkas248320-Jul-09 23:33 
GeneralRe: Opp Concept Pin
_AnsHUMAN_ 20-Jul-09 23:49
_AnsHUMAN_ 20-Jul-09 23:49 
AnswerRe: Opp Concept Pin
Adam Roderick J20-Jul-09 23:50
Adam Roderick J20-Jul-09 23:50 
AnswerRe: Opp Concept Pin
Stuart Dootson20-Jul-09 23:54
professionalStuart Dootson20-Jul-09 23:54 
Questionrunning exe without having Visual studio installed Pin
MahaKh20-Jul-09 23:22
MahaKh20-Jul-09 23:22 
AnswerRe: running exe without having Visual studio installed Pin
_AnsHUMAN_ 20-Jul-09 23:29
_AnsHUMAN_ 20-Jul-09 23:29 
GeneralRe: running exe without having Visual studio installed Pin
MahaKh20-Jul-09 23:39
MahaKh20-Jul-09 23:39 
GeneralRe: running exe without having Visual studio installed Pin
_AnsHUMAN_ 20-Jul-09 23:44
_AnsHUMAN_ 20-Jul-09 23:44 
GeneralRe: running exe without having Visual studio installed Pin
MahaKh20-Jul-09 23:46
MahaKh20-Jul-09 23:46 
GeneralRe: running exe without having Visual studio installed Pin
Randor 21-Jul-09 1:38
professional Randor 21-Jul-09 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.