acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
binary.h
1
#pragma once
2
3
4
namespace
comparison
5
{
6
7
8
template
<
typename
TYPE,
typename
ARG_TYPE = const TYPE & >
9
class
binary
10
{
11
public
:
12
13
14
::i32 operator ()(ARG_TYPE a, ARG_TYPE b)
15
{
16
if
(a < b)
17
return
-1;
18
else
if
(b < a)
19
return
1;
20
else
21
return
0;
22
}
23
24
25
};
26
27
template
< >
28
class
CLASS_DECL_ACME
binary
< ::i32 >
29
{
30
public
:
31
32
33
inline
static
iptr CompareElements(const ::i32 * pElement1, const ::i32 * pElement2)
34
{
35
return
*pElement1 - *pElement2;
36
}
37
38
39
};
40
41
42
43
}
// namespace comparison
44
45
comparison::binary
Definition
binary.h:10
prototype
comparison
binary.h
Generated by
1.17.0