summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Vet.h
blob: d4c1060fa7d0443d49dd4928d8df032f40ece166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

/* ========================================

  Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.

======================================== */

#pragma once

#include <CompilerKit/CompilerKit.h>
#include <NeKit/Config.h>

#define NE_VETTABLE : public IVet

namespace Kernel {
struct IVet {
  IVet()          = default;
  virtual ~IVet() = default;

  NE_COPY_DEFAULT(IVet)

  operator bool() = delete;
};

template <typename T>
struct Vettable final {
  static constexpr bool kValue = false;
};

template <>
struct Vettable<IVet> final {
  static constexpr bool kValue = true;
};
}  // namespace Kernel