Program :main.cpp
struct X {
int x;
};
export template <class T> T const& min(T const&, T const&);
int main()
{
return min(2, 3);
}
x.cpp
struct X {
int x;
};
export template <class T> T const& min(T const &a, T const &b) {
return a<b ? a : b;
}
error:Compiling with gcc
export.cpp:23: warning: keyword ‘export’ not implemented, and will be ignored
export.cpp: In function ‘int main()’:
export.cpp:27: error: call of overloaded ‘min(int, int)’ is ambiguous
swap.cpp:16: warning: keyword ‘export’ not implemented, and will be ignored
error: Compiling with EDG compiler
export.cpp", line 27: error: more than one instance of overloaded function
export.cpp", line 23: error: support for exported templates is disabled
swap.cpp", line 16: error: support for exported templates is disabled
Can anyone solve this problem?
Any one explain the usage of export keyword?