Hi to everyone,
In a VC6.0 project we have a class C which is exported in a dll.
We added a template member function, say C::f<T>(T x)
///// C.h
class IMPORT_EXPORT_DIRECTIVE C
{
// ...
template <typename T>
void f<T>(T x)
{
// body
}
};
since we only call f on a particular iterator, we added the following
line(s)
///// C.CPP
typedef std::multimap<double, long>::iterator mmiter_t;
template void C::f< mmiter_t >( mmiter_t );
VC6.0 gives up (internal compiler error) on the forced instantiation line.
We didn't try VC7.1 yet.
It it the correct solution?
--
Every idea yields an answer
-- Abercrombie Smith