diff --git a/fi/include/frequent_items_sketch.hpp b/fi/include/frequent_items_sketch.hpp index 2dd337e5..fe5feefe 100644 --- a/fi/include/frequent_items_sketch.hpp +++ b/fi/include/frequent_items_sketch.hpp @@ -49,6 +49,11 @@ enum frequent_items_error_type { * For sketches containing strings, cross-language portability depends on * using compatible string encodings. This class does not by itself enforce * UTF-8 validity for all string inputs. + * + * The map copies or moves items when an item is added, when it grows, and when it purges. + * So the move constructor of T must not throw, and neither must the copy constructor, + * which takes the move's place if T has no move constructor. + * If one throws, do not use the sketch, and destroying it may be undefined behavior. */ template< typename T,