Kyle,

On 03/29/2012 05:14 PM, Kyle Cronan wrote:
> So my question is, why isn't taking the address of some instance of a
> templatized function and passing it to def() enough to require the
> function definition to exist?

It certainly is enough to require, but isn't enough to magically make a
definition to appear. Either you provide the definition in the header,
and let the compiler do that magic of instantiating the template
on-demand, or you defer to a separate compilation unit, but then can't
rely on such magic and need to explicitly instantiate.

>   Should this be considered a usability
> bug in the library, a problem with my compiler, or maybe neither?

I haven't seen your specific code, but your description sounds like all
is working as expected.

    Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to