LLVM: llvm::FoldingSetTrait< T, Enable > Struct Template Reference (original) (raw)

[FoldingSetTrait](structllvm%5F1%5F1FoldingSetTrait.html "FoldingSetTrait - This trait class is used to define behavior of how to "profile" (in the FoldingSet ...") - This trait class is used to define behavior of how to "profile" (in the FoldingSet parlance) an object of a given type. More...

template<typename T, typename Enable = void>
struct llvm::FoldingSetTrait< T, Enable >

[FoldingSetTrait](structllvm%5F1%5F1FoldingSetTrait.html "FoldingSetTrait - This trait class is used to define behavior of how to "profile" (in the FoldingSet ...") - This trait class is used to define behavior of how to "profile" (in the FoldingSet parlance) an object of a given type.

The default behavior is to invoke a 'Profile' method on an object, but through template specialization the behavior can be tailored for specific types. Combined with the [FoldingSetNodeWrapper](classllvm%5F1%5F1FoldingSetNodeWrapper.html "FoldingSetNodeWrapper - This template class is used to "wrap" arbitrary types in an enclosing object ...") class, one can add objects to FoldingSets that were not originally designed to have that behavior.

Definition at line 266 of file FoldingSet.h.