SUNphi
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Position.hpp
Go to the documentation of this file.
1
#
ifndef
_POSITION_HPP
2
#
define
_POSITION_HPP
3
4
/// \file Position.hpp
5
///
6
/// \brief Defines a few constant useful to deal with positions
7
8
namespace
SUNphi
9
{
10
/// Lament the absence of an element
11
[[ maybe_unused ]]
12
static
constexpr
bool
13
ASSERT_IF_NOT_PRESENT=
14
true
;
15
16
/// Do not lament the absence of an element
17
[[ maybe_unused ]]
18
static
constexpr
bool
19
DO_NOT_ASSERT_IF_NOT_PRESENT=
20
false
;
21
22
/// Mark the absence of an element
23
[[ maybe_unused ]]
24
static
constexpr
int
25
NOT_PRESENT=
26
-1;
27
28
/// Filterer which check presence of its parameter
29
template
<
auto
I>
30
struct
IsPresent
31
{
32
/// Result of the check
33
static
constexpr
bool
res
=
34
(
I
!=
NOT_PRESENT
);
35
};
36
37
/// Enumerate first and last
38
enum
FIRST_OR_LAST
{FIRST,LAST};
39
40
/// Enumerate the possibity to loop backward or forward
41
enum
BACK_FORW
{BACK,FORW};
42
}
43
44
#
endif
SUNphi::IsPresent::res
static constexpr bool res
Result of the check.
Definition:
Position.hpp:33
SUNphi::BACK_FORW
BACK_FORW
Enumerate the possibity to loop backward or forward.
Definition:
Position.hpp:41
SUNphi::FIRST_OR_LAST
FIRST_OR_LAST
Enumerate first and last.
Definition:
Position.hpp:38
include
utility
Position.hpp
Generated by
1.8.11