Re: Meaning of iniline in declspec(dllexport)
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Sun, 01 Apr 2007 13:04:24 -0500
On Sat, 31 Mar 2007 23:59:02 GMT, "David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
Well, no where is it written in stone that for inlining to work, the
function needs to be defined in the header. It's only due to compiler
limits that it (sometimes) is that way.
Actually, the standard says in 7.1.2/4:
<q>
An inline function shall be defined in every translation unit in which it
is used and shall have exactly the same definition in every case.
</q>
Declaring a function inline in a header file and not defining it therein is
a very limiting thing to do; I can't recall every encountering such a
thing, because it unnecessarily exposes something publicly that can only be
used privately. Note also that VC's link-time inlining is completely
outside the scope of the standard.
--
Doug Harrison
Visual C++ MVP
.
Relevant Pages
- Re: Automatically generate variables
... Must be C by your definition since crapit might possibly be a header that makes it C. ... I knew it was *the* windows windows.h header because the ... Given certain assumptions the C code was valid C code, however from what I remember it certainly was not a C program solving the problem since it not only relied on non-C APIs but also relied on external programs that in general are *not* installed on machine. ... You, on the other hand, just said that it might be C even if it goes beyond what the standard defined and gave no outer limit on what could be considered C. ... (comp.lang.c) - Re: Automatically generate variables
... Must be C by your definition since crapit might possibly be a header that makes it C. ... I knew it was *the* windows windows.h header because the ... if the question was "how much of the program is standard C?" ... that it's just as non-standard as my version. ... (comp.lang.c) - Re: Non-English Validation Expression for email address?
... The Internet Engineering Task Force has published three crucial documents for the standardisation of email address headers that include symbols outside the ASCII character set. ... This means that soon you'll be able to use Chinese characters, French accents, and German umlauts in email addresses as well as just in the body of the message. ... They say there would need to be an "upgrade mania" if the Unicode standard UTF-8 is to replace the American Standard Code for Information Interchange currently used as the general email language. ... A new header field will be added as a sort of "emergency parachute" to ensure that UTF-8 emails have a soft landing if they are thrown out before reaching the recipient by systems that have not been upgraded. ... (microsoft.public.dotnet.framework.aspnet) - Re: Debugging memory leaks
... implementing this that the C standard does not address. ... I made one header file that, when included, replaces ... allocated memory in a list. ... frees, allocations of zero size, or missing calls to free. ... (comp.lang.c) - Re: Exporting CString from a DLL
... I've never changed a standard ... header file to fix a problem and I don't want to start now. ... I went with the solution of deriving a new class from CString because ... I think I can live with the solution of modifying atlstr.h for now until ... (microsoft.public.vc.language) |
|