2021-08-29 20:15:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-08 23:56:48 +00:00
|
|
|
#include <hex.hpp>
|
|
|
|
|
2021-08-29 20:15:18 +00:00
|
|
|
#include <type_traits>
|
2022-02-27 22:25:39 +00:00
|
|
|
#include <memory>
|
2021-08-29 20:15:18 +00:00
|
|
|
|
2022-06-25 10:19:59 +00:00
|
|
|
#include <concepts>
|
2021-08-29 20:15:18 +00:00
|
|
|
|
2021-08-30 17:12:19 +00:00
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
template<typename T>
|
2022-01-24 19:53:17 +00:00
|
|
|
struct always_false : std::false_type { };
|
2021-08-30 17:12:19 +00:00
|
|
|
|
|
|
|
template<typename T, size_t Size>
|
|
|
|
concept has_size = sizeof(T) == Size;
|
|
|
|
|
2022-01-31 13:37:12 +00:00
|
|
|
template<typename T>
|
|
|
|
class Cloneable {
|
|
|
|
public:
|
2022-02-27 22:25:39 +00:00
|
|
|
[[nodiscard]] virtual std::unique_ptr<T> clone() const = 0;
|
2022-01-31 13:37:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|