Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!pt!dld From: dld@F.GP.CS.CMU.EDU (David Detlefs) Newsgroups: comp.lang.c++ Subject: extern "C" friends Message-ID: Date: 27 Oct 89 21:14:06 GMT Organization: CMU CS Department Lines: 28 Should the following work? ---------------------------------------------------------------------- extern "C" { int foo(int); } struct bar { // ... friend int foo(int); } ---------------------------------------------------------------------- I had a need for such a function recently, and tried to compile the eqivalent of the above using g++. It told me that foo had been "implicitly overloaded" by its friend declaration in struct bar. Is this a language problem, or just a g++ bug? I couldn't figure it out from reading Lippmann (though I must admit I didn't try very hard -- I know the C++ experts in this group enjoy displaying their knowledge). Does 2.0 compile this? Thanks! -- Dave Detlefs Any correlation between my employer's opinion Carnegie-Mellon CS and my own is statistical rather than causal, dld@cs.cmu.edu except in those cases where I have helped to form my employer's opinion. (Null disclaimer.)