From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: Authors of DJGPP / GCC - #export needed ! Date: Mon, 22 Jan 2001 14:38:39 GMT Organization: always disorganized Lines: 41 Message-ID: <3a6c45c9.6539574@news.freeserve.net> References: NNTP-Posting-Host: modem-45.emperor-angel.dialup.dialup.pol.co.uk X-Trace: news5.svr.pol.co.uk 980174320 26780 62.137.6.45 (22 Jan 2001 14:38:40 GMT) NNTP-Posting-Date: 22 Jan 2001 14:38:40 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dieter Demerre wrote: > Can anybody direct me to information about this #export directive ? The keyword is just export, not #export. > I consulted the C++-primer and couldn't find anything about it. Perhaps it's not very up-to-date. > Are you (Rafal) sure it's part of any standard ? There's only one standard for C++, and 'export' is defined there in clause 14 (Templates). The idea is that you can declare an exported template in a header file, e.g.: export template bool foo(const T&); And then in some file that includes this header, you define the template, e.g.: template bool foo(const T& t) { return t.bar() || t.baz(); } Now any file that includes the header file can use the template, and the compiler will ensure that the required specialisations are instantiated, even though the template definition may not be visible to any of the code that uses it. The above code is untested, of course, due to the absence of conforming compilers. With DJGPP you will get a warning like this: warning: keyword 'export' not implemented and will be ignored and then a link error.