[Debtags-devel] new libtagcoll - compilation problems

Benjamin Mesing bensmail@gmx.net
Wed, 04 Aug 2004 13:53:50 +0200


Hello


> It's a template not being instantiated.  It took me three years to
> understand how to distribute templates sanely: it's actually quite easy,
> but just not that clearly documented.  If you need help about
> distributing templates, ask me :)
That was allways something I was asking me about. A good way to
distribute templates in a library.

> The thing is, the OpSet<..> template is indeed in the library, but the
> instantiation for the <int> datatype wasn't.  Both libraries distribute
> in the include directory the .cc files containing template definitions,
> which you can include to instantiate the templates you need that are not
> already provided by the library.
Ah.. I see - I did not occur to me that you might have included the .cc
file in the library. This of course solves the issue.

> As for what I instantiate in the library, I try to be conservative and
> not bloat the libraries with instantiations that people don't use.  With
> this mindset I took away most instantiations of classes using an int
> item, as I didn't know they could be still used after libdebtags
> introduced the Package class.
That's OK for me. I can instantiate the class on my own.

> I now readded some <int> template instantiations to libtagcoll trunk:
> please tell me what templates you need to instantiate and if the use you
> make of them is not very specific to your package, I can add them to
> libtagcoll as well.
I needed the PpSet<int> templates because I use int's as handles for the
packages together with the handlemaker. This is also because I offer
other types of search not possible with the Debtags::Package class. The
OpSet<int> is used to connect the results. Besides I do not want to
throw away all my code using the apt library and recode it. I guess you
understand this kind of nostalgy :-)

Greetings Ben