For an Essential Tools Module 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.
©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.