std C/C++ patch #6

Eddie Kohler kohler at icir.org
Fri Apr 26 11:07:07 EDT 2002


Hey Scott,

> Inline functions have internal linkage, hence the inline methods of
> hashmap.cc, such as bucket(), as instantiated in tools/lib/hashmapi.cc
> have internal linkage and are not available to other library users at
> link time.  Until the standard's export template instantiation model
> is implemented, exported inlines need to stay in header files.

What about declaring the resize() and bucket() functions as inline in the
template class declaration? (Change "int bucket(const K &) const;" to
"inline int bucket(const K &) const;".) This has worked for me in the past
with conventional classes. What does your compiler say?

Eddie



More information about the click mailing list