diff options
| author | Mistivia <i@mistivia.com> | 2025-06-08 21:11:11 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-08 21:11:11 +0800 |
| commit | 9b98985d16e92e728d28d6c8ce4294f8a7230d9d (patch) | |
| tree | a706b6812711ba432e97ad326a8aa535dc9ee4c2 /src/basic_traits.h | |
| parent | 445fe6e07e3b8f5343f4a728d7ad96fbbfd0345e (diff) | |
generic pq
Diffstat (limited to 'src/basic_traits.h')
| -rw-r--r-- | src/basic_traits.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/basic_traits.h b/src/basic_traits.h new file mode 100644 index 0000000..2bc4d8c --- /dev/null +++ b/src/basic_traits.h @@ -0,0 +1,23 @@ +#ifndef ALGDS_BAISC_TRAITS_H_ +#define ALGDS_BAISC_TRAITS_H_ + +#include "type_alias.h" + +// basic traits +#define BASIC_TRAITS_DEF(T) \ + Bool T##_eq(T* lhs, T* rhs); \ + Int T##_cmp(T* lhs, T* rhs); \ + ULong T##_hash(T* x); + +BASIC_TRAITS_DEF(Int); +BASIC_TRAITS_DEF(Bool); +BASIC_TRAITS_DEF(Long); +BASIC_TRAITS_DEF(Char); +BASIC_TRAITS_DEF(UInt); +BASIC_TRAITS_DEF(ULong); +BASIC_TRAITS_DEF(Double); +BASIC_TRAITS_DEF(Float); +BASIC_TRAITS_DEF(String); + + +#endif |
