Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

11.4 Parameter Requirements

In order to use a Tools.h++ template collection class to collect objects of some type T, that type must satisfy certain minimal requirements. Unfortunately, some compilers may require the instantiating type or types to be more powerful than should be necessary.

According to the draft C++ standard, a compiler should only instantiate and compile those template functions that are actually used. Thus, if you avoid calling any member functions, such as sort(), that require valid less-than semantics, you should still be able to create a collection class of some type U for which, given instances u1 and u2, the expression (u1 < u2) is ill-formed. If your compiler does not provide this selective instantiation, you may not be able to collect objects of type U without implementing operator<(const U&, const U&) for that type.


Previous fileTop of documentContentsIndexNext file
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.