1
0
mirror of synced 2024-12-15 01:01:15 +01:00
ImHex/lib/libimhex/include/hex/helpers/concepts.hpp

24 lines
404 B
C++
Raw Normal View History

2021-08-29 22:15:18 +02:00
#pragma once
#include <hex.hpp>
2021-08-29 22:15:18 +02:00
#include <type_traits>
#include <memory>
2021-08-29 22:15:18 +02:00
#include <concepts>
2021-08-29 22:15:18 +02:00
2021-08-30 19:12:19 +02:00
namespace hex {
template<typename T>
struct always_false : std::false_type { };
2021-08-30 19:12:19 +02:00
template<typename T, size_t Size>
concept has_size = sizeof(T) == Size;
template<typename T>
class Cloneable {
public:
[[nodiscard]] virtual std::unique_ptr<T> clone() const = 0;
};
}