24 Jul
2008
24 Jul
'08
7:04 p.m.
david.weber@l-3com.com schrieb:
The best way I've seen, is to make a testing class a friend of class to be tested. My class to be tested is in a namespace, that the test cases are not members of. I'm running into all sorts of compiler errors.
Does anyone have sample code about making this work.
Well, if you just want to add a friend which isn't in your namespace, why dont do this: namespace foo { class A { friend ::other_namespace::the_friend; }; } ? Using :: in front of a type gets out of the current namespace. I hope I could help, Max