You get compiler messages when processing templates indicating that an element type or one of its required element functions is not declared.
The element type or element function is defined locally to the source file that contains the template instantiation with the element type as its argument. The prelink or prebind phase is executed only by using the header files. Therefore, your declaration local to a source file is not recognized and causes these compilation errors.
Move the corresponding declarations to a separate header file and include the header file from the source file.
Introduction
to the Collection Classes
Overall
Implementation Structure
Element
Functions and Key-Type Functions
Implementing
Element- and Key-Type Functionality
Defining
Member Functions of the Element Object Type
Defining
Separate Global Functions
Using or
Defining an Element Operation Class
Memory Management
with Element Operation Classes
Possible
Implementation Paths
Choosing One of the
Provided Implementation Variants
Instantiating the
Collection Classes