JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: C++ User's Guide     Oracle Solaris Studio 12.3 Information Library
search filter icon
search icon

Document Information

Preface

Part I C++ Compiler

1.  The C++ Compiler

2.  Using the C++ Compiler

3.  Using the C++ Compiler Options

Part II Writing C++ Programs

4.  Language Extensions

5.  Program Organization

6.  Creating and Using Templates

7.  Compiling Templates

7.1 Verbose Compilation

7.2 Repository Administration

7.2.1 Generated Instances

7.2.2 Whole-Class Instantiation

7.2.3 Compile-Time Instantiation

7.2.4 Template Instance Placement and Linkage

7.3 External Instances

7.3.1 Possible Cache Conflicts

7.3.2 Static Instances

7.3.3 Global Instances

7.3.4 Explicit Instances

7.3.5 Semi-Explicit Instances

7.4 Template Repository

7.4.1 Repository Structure

7.4.2 Writing to the Template Repository

7.4.3 Reading From Multiple Template Repositories

7.4.4 Sharing Template Repositories

7.4.5 Template Instance Automatic Consistency With -instances=extern

7.5 Template Definition Searching

7.5.1 Source File Location Conventions

7.5.2 Definitions Search Path

7.5.3 Troubleshooting a Problematic Search

8.  Exception Handling

9.  Improving Program Performance

10.  Building Multithreaded Programs

Part III Libraries

11.  Using Libraries

12.  Using the C++ Standard Library

13.  Using the Classic iostream Library

14.  Building Libraries

Part IV Appendixes

A.  C++ Compiler Options

B.  Pragmas

Glossary

Index

Chapter 7

Compiling Templates

Template compilation requires the C++ compiler to do more than traditional UNIX compilers have done. The C++ compiler must generate object code for template instances on an as-needed basis. It might share template instances among separate compilations using a template repository. It might accept some template compilation options. It must locate template definitions in separate source files and maintain consistency between template instances and mainline code.