help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what does `extern "C++" ` mean?


From: Paul Pluzhnikov
Subject: Re: what does `extern "C++" ` mean?
Date: 01 Feb 2005 07:13:38 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

"Andy" <gnu04@yahoo.com> writes:

> So you mean that to preserve name-mangling for C++
> function names,  we must explicit declare 'extern "C++" ' to preserve
> this information.

I think "must" is too strong.

Many headers with C++ prototypes in them do not have explicit
'extern "C++"', and instead expect the user to "do the right thing".

However, explicitly specifying the linkage does prevent accidents,
and if you are writing a header for C++ library that you intend to
distribute, explicit linkage specification would be wise.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]