#pragma once // // This file is distributed under the MIT License. See LICENSE.md for details. // #include #include "revng/ADT/Concepts.h" #include "revng/Model/Identifier.h" namespace model { template concept EntityWithMetadata = requires(Type &&Value) { { Value.CustomName() } -> convertible_to; { Value.OriginalName() } -> convertible_to; }; template LHS ©Metadata(LHS &To, const RHS &From) { To.CustomName() = From.CustomName(); To.OriginalName() = From.OriginalName(); return To; } template LHS &moveMetadata(LHS &To, RHS &&From) { To.CustomName() = std::move(From.CustomName()); To.OriginalName() = std::move(From.OriginalName()); return To; } } // namespace model