2021-08-29 22:15:18 +02:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-09 01:56:48 +02:00
|
|
|
#include <hex.hpp>
|
|
|
|
|
2021-08-29 22:15:18 +02:00
|
|
|
#include <type_traits>
|
2022-02-27 23:25:39 +01:00
|
|
|
#include <memory>
|
2021-08-29 22:15:18 +02:00
|
|
|
|
2022-06-25 12:19:59 +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>
|
2022-01-24 20:53:17 +01:00
|
|
|
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;
|
|
|
|
|
2022-01-31 14:37:12 +01:00
|
|
|
template<typename T>
|
2023-04-18 10:06:47 +02:00
|
|
|
class ICloneable {
|
2022-01-31 14:37:12 +01:00
|
|
|
public:
|
2022-02-27 23:25:39 +01:00
|
|
|
[[nodiscard]] virtual std::unique_ptr<T> clone() const = 0;
|
2022-01-31 14:37:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|