1
0
mirror of synced 2024-11-15 11:33:23 +01:00
ImHex/lib/libimhex/include/hex/helpers/concepts.hpp
2023-11-10 20:47:08 +01:00

23 lines
426 B
C++

#pragma once
#include <type_traits>
#include <memory>
#include <concepts>
namespace hex {
template<typename T>
struct always_false : std::false_type { };
template<typename T, size_t Size>
concept has_size = sizeof(T) == Size;
template<typename T>
class ICloneable {
public:
virtual ~ICloneable() = default;
[[nodiscard]] virtual std::unique_ptr<T> clone() const = 0;
};
}