`export'ing a template definition

B. James Phillippe bryan@terran.org
Mon Apr 27 22:28:00 GMT 1998


Hello,

	I tried using the export keyword to make the following type of C++
code compile (and work) as intended:

specialization.hh:

	template< class A > class Specialized {

	public:
		A foo();
	};

specialization.cc:

	#include "specialization.hh"

	export template< class A > A Specialized< A >::foo() {
		// Does something and returns object of type A
	}

uses-specialization.cc:

	#include "specialization.hh"

	...

	Specialized<something> s;
	something x = s.foo();

	...

The problem is that the export keyword is not recognized.  I am 90% certain
that it's simply WIP, and in that case I'll go and be quietly patient. :)
But I though I'd ask in case I might be making a mistake of my own.  BTW
I'm using egcs-19980418 and am building 0425 right now.

thanks,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan




More information about the Gcc mailing list