#pragma implementation (C++ only)

Category

Template control

Purpose

For use with the -qtempinc compiler option, supplies the name of the file containing the template definitions corresponding to the template declarations contained in a header file.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-#--pragma--implementation--(--"--file_name--"--)------------><

Parameters

file_name
The name of the file containing the definitions for members of template classes declared in the header file.

Usage

This pragma is not normally required if your template implementation file has the same name as the header file containing the template declarations, and a .c extension. You only need to use the pragma if the template implementation file does not conform to this file-naming convention. For more information about using template implementation files, see Using C++ templates

#pragma implementation is only effective if the -qtempinc option is in effect. Otherwise, the pragma has no meaning and is ignored.

The pragma can appear in the header file containing the template declarations, or in a source file that includes the header file. It can appear anywhere that a declaration is allowed.

Related information