RE: [Dev-C++] Export keyword problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-06-15 16:34:52
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of h.r...@gm...
> Sent: Saturday, June 15, 2002 2:09 PM
> To: Dev...@li...
> Subject: Re: [Dev-C++] Export keyword problem
>
>
> Hi,
>
> here a codesnip from "The C++ Programming Language", B. Stroustrup, 3.
> German Edition ,
> p. 374:
>
> //out.h
> template<class T> void out(const T& t);
>
> //out.c
> #include <iostream>
> #include "out.h"
>
> export template<class T> void out(const T& t) {std::cerr << t; }
>
> Because the missing (until now) of the export keyword in
> mingw you have to
> write the template definition in the header. Perhaps it will
> be better in
> mingw based on gcc 3.1.
GCC 3.1:
temp.cpp:2: warning: keyword `export' not implemented, and will be
ignored
Since it recognises it and warns too, things are enough good in terms
of ANSI C++ compliance.
Keep in mind that "export" templates are a tough thing to be
implemented, that's why the usage of the keyword export for template
classes and functions, it is something that indicates special condition
in terms of compilation process. I guess things will get better in some
future release.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|