This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ support


>>>>> "Gerard" == Gerard Jungman <jungman@lanl.gov> writes:

    Gerard> Thomas Walter wrote:
    >> 
    >> Better and common practice is to protect each header which is enough.

    Gerard> I actually don't know what people prefer. I personally prefer
    Gerard> to protect the includes in my client code explicitly, which
    Gerard> makes it clear that C modules are being imported. I don't think
    Gerard> I really care.

I prefer the oppsite.  The header knows if it is for C and it should
protect itself against C++.  Also then you can look into the header
and then you know the language.

    Gerard> By the way, what happens if you end up with nested extern "C" blocks?
    Gerard> Is this officially ok?

Good question.  But I think it does not matter because each header
protects itself against multiple inclusion.  ==>  The compiler sees
nothing if it finds another 'include' of an already known header.

Bye
Thomas

-- 
SUSHI?  Nein, Danke.  Ich esse keine Köder.

----------------------------------------------
Dipl. Phys. Thomas Walter
Inst. f. Physiklische Chemie II
Egerlandstr. 3				Tel.: ++9131-85 27326 / 27330
91058 Erlangen, Germany			email: walter@pctc.chemie.uni-erlangen.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]