Files
revng-revng/include/revng/TupleTree/TupleTreeCompatible.h
Ivan Krysak a123ec2c35 Remove clang-format off around concepts
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00

25 lines
690 B
C++

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/ADT/KeyedObjectContainer.h"
#include "revng/TupleTree/TupleLikeTraits.h"
template<typename T>
concept TupleTreeCompatible = (KeyedObjectContainer<T>
or UpcastablePointerLike<T> or TupleLike<T>);
template<typename T>
concept NotTupleTreeCompatible = not TupleTreeCompatible<T>;
template<typename T>
concept Verifiable = requires(const T &TT) {
{ TT.verify() } -> std::same_as<bool>;
};
template<typename T>
concept TupleTreeCompatibleAndVerifiable = (TupleTreeCompatible<T>
and Verifiable<T>);