Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GENERIC(3C++)  —  MISC. REFERENCE MANUAL PAGES

NAME

generic.h − generic macro definitions used mainly for creating generic types

SYNOPSIS

#include <generic.h>

name2(a,b)

name3(a,b,c)

name4(a,b,c,d)

DESCRIPTION

Since the C++ language doesn’t currently support the concept of generic, or parameterized types, two header files are provided to aid the user to achieve much of the capability of parameterized types by extensively using the preprocessor. 

One problem in defining multiple instantiations of a generic type from a single template isin creating a unique name for each instantiated type. The name2 macro from generic.h can beused to fullfil this task. name2 use the concatenation operator to concatenate the two arguments to form a single name. For example,
  #define vector(int) name2(int,vector)
 
the text vector(int) will be converted to intvector.  Macros which concatenate more than two arguments are also provided in generic.h. 
 

Sun Release 4.0  —  Last change: 25 August 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026