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

24 lines
405 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>
2023-04-18 10:06:47 +02:00
class ICloneable {
public:
[[nodiscard]] virtual std::unique_ptr<T> clone() const = 0;
};
}