Comparison and key/data accessors for elements of immutable containers.

Synopsis

Declared in <llvm/ADT/ImmutableSet.h>

template<typename T>
struct ImutContainerInfo
    : ImutProfileInfo<T>

Description

Defaults to using std::equal_to<> and std::less<> to compare elements.

Base Classes

Name

Description

ImutProfileInfo<T>

Profile traits that hash values into a FoldingSetNodeID.

Type Aliases

Name

Description

data_type

The associated data type (unused for sets; always bool).

data_type_ref

A reference to associated data (unused for sets).

key_type

The key type (identical to the element for sets).

key_type_ref

A reference to an element's key (identical to the element for sets).

value_type

The stored element type.

value_type_ref

A reference to a stored element.

Static Member Functions

Name

Description

DataOfValue

Returns the associated data for a set element (always true).

KeyOfValue

Returns the lookup key for stored value D.

Profile

Adds profile data for X to ID using T's FoldingSetTrait.

isDataEqual

Returns true if associated data values compare equal (always true for sets).

isEqual

Returns true if keys LHS and RHS compare equal.

isLess

Returns true if LHS is ordered before RHS in the tree.

Specializations

Name

Description

ImutContainerInfo<T*>

Specialization for pointer values to treat pointers as references to unique objects. Pointers are thus compared by their addresses.

Created with MrDocs