David Megginson wrote:
>
> I have a question for the C++ heads. Let's assume that I have
> something like this:
>
> template <class C, class T>
> T
> Binding<C,T>::get_value () const
> {
> return (_obj.*_getter)();
> }
>
> assuming
>
> C &_obj;
> T (C::*_getter)() const;
>
> This always gets instantiated correctly when I included it inline in
> the header file, but not when I move the definition out to the cxx
> file. Is that an inherent limitation of templates? I cannot
> pre-instantiate all the templates I might need in the cxx file,
> because I don't know what classes people will use this with.
>
> I'll appreciate any help.
>
I believe this is a limitation with templates. Until all compilers
support the 'export' keyword, template function definitions must be
defined in a header file.
Cheers,
Bernie
Obligatory reference: Perhaps Boost.Function from www.boost.org is
worth looking at?
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel