#pragma once // // This file is distributed under the MIT License. See LICENSE.md for details. // #include "revng/ADT/KeyTraits.h" #include "revng/ADT/STLExtras.h" template struct KeyedObjectTraits { // static * key(const T &); // static T fromKey(* Key); }; /// Inherit if T is the key of itself template struct IdentityKeyedObjectTraits { static T key(const T &Obj) { return Obj; } static T fromKey(T Obj) { return Obj; } }; /// Trivial specialization for integral types template struct KeyedObjectTraits> : public IdentityKeyedObjectTraits {};