What is the purpose of "=" in Containers.Hashed_Sets?
8 December 2022 at 21:57
Containers.Hashed_Sets
is a generic package that reclaims Element_Type
, Hash function
, Equivalent_Elements
function and "="
function.
Why there is two functions to specify equivalence/equality?
generic
type Element_Type is private;
with function Hash (Element : Element_Type) return Hash_Type;
with function Equivalent_Elements (Left, Right : Element_Type)
return Boolean;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Hashed_Sets is
https://docs.adacore.com/live/wave/arm12/html/arm12/arm12-A-18-8.html
8 posts - 3 participants