Helper for remove_duplicates.
More...
#include <CompareAndPrint.h>
Public Member Functions | |
| CompareAndPrint (bool quiet) | |
| Constructor. | |
| template<typename Element > | |
| bool | operator() (Element *f, Element *s) const |
| Compare two pointers. Maybe print a complaint if we find a duplicate. | |
| void | warn (const std::type_info &ti, const void *f) const |
| Duplicate elements were found; print a warning. | |
Helper for remove_duplicates.
Functor to compare two pointers and optionally print a complaint if they're the same.
| DataModel_detail::CompareAndPrint::CompareAndPrint | ( | bool | quiet | ) | [inline] |
Constructor.
| quiet | If false, then print a complaint if duplicate pointers are found. |
| bool DataModel_detail::CompareAndPrint::operator() | ( | Element * | f, | |
| Element * | s | |||
| ) | const [inline] |
Compare two pointers. Maybe print a complaint if we find a duplicate.
| f | First pointer to compare. | |
| s | Second pointer to compare. |
| void DataModel_detail::CompareAndPrint::warn | ( | const std::type_info & | ti, | |
| const void * | f | |||
| ) | const |
Duplicate elements were found; print a warning.
| ti | type_info for the element. | |
| f | The element pointer. |
1.6.1