aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
list.cpp
Go to the documentation of this file.
1
/**
2
*
3
* Copyright (c) 2005-2021 by Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4
* info_at_agrum_dot_org
5
*
6
* This library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
22
/**
23
* @file
24
* @brief outlined implementations for the chained lists
25
*
26
* @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27
*/
28
29
#
include
<
agrum
/
tools
/
core
/
list
.
h
>
30
31
#
ifndef
DOXYGEN_SHOULD_SKIP_THIS
32
33
namespace
gum
{
34
35
#
define
GCC_STR
(
s
)
#
s
36
#
define
GCC_JOINSTR
(
x
,
y
)
GCC_STR
(
x
##
y
)
37
38
#
if
(
(
__GNUC__
*
100
)
+
__GNUC_MINOR__
)
>=
405
39
#
define
GCC_DIAG_DO_PRAGMA
(
x
)
Pragma_
(
#
x
)
40
#
define
GCC_DIAG_PRAGMA
(
x
)
GCC_DIAG_DO_PRAGMA
(
GCC
diagnostic
x
)
41
#
if
(
(
__GNUC__
*
100
)
+
__GNUC_MINOR__
)
>=
406
42
#
define
GCC_DIAG_OFF
(
x
)
GCC_DIAG_PRAGMA
(
push
)
GCC_DIAG_PRAGMA
(
ignored
GCC_JOINSTR
(
-
W
,
x
)
)
43
#
define
GCC_DIAG_ON
(
x
)
GCC_DIAG_PRAGMA
(
pop
)
44
#
else
45
#
define
GCC_DIAG_OFF
(
x
)
GCC_DIAG_PRAGMA
(
ignored
GCC_JOINSTR
(
-
W
,
x
)
)
46
#
define
GCC_DIAG_ON
(
x
)
GCC_DIAG_PRAGMA
(
warning
GCC_JOINSTR
(
-
W
,
x
)
)
47
#
endif
48
#
else
49
#
define
GCC_DIAG_OFF
(
x
)
50
#
define
GCC_DIAG_ON
(
x
)
51
#
endif
52
53
// Destructor for end/rend
54
template
<>
55
ListConstIteratorSafe
<
Debug
>::~
ListConstIteratorSafe
() {}
56
57
// constructor for end/rend
58
template
<>
59
ListConstIteratorSafe
<
Debug
>::
ListConstIteratorSafe
()
noexcept
{}
60
61
// Destructor for end/rend
62
template
<>
63
ListConstIterator
<
Debug
>::~
ListConstIterator
()
noexcept
{}
64
65
// constructor for end/rend
66
template
<>
67
ListConstIterator
<
Debug
>::
ListConstIterator
()
noexcept
{}
68
69
// an iterator that represents both end and rend for all the Lists
70
// (whatever their type). This is mainly what stroustrup suggests
71
// in his C++ programming language, third edition, page 854
72
static
const
ListConstIteratorSafe
<
Debug
>
_static_list_end_safe_
;
73
static
const
ListConstIterator< Debug > _static_list_end_;
74
75
static
constexpr
const
void
* _get_list_end_safe_() {
return
&_static_list_end_safe_; }
76
static
constexpr
const
void
* _get_list_end_() {
return
&_static_list_end_; }
77
78
const
void
*
const
_list_end_safe_ =
_get_list_end_safe_
();
79
const
void
*
const
_list_end_ =
_get_list_end_
();
80
81
}
/* namespace gum */
82
83
84
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
85
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
86
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
87
template
class
gum::List<
bool
>;
88
#
endif
89
#
endif
90
#
endif
91
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
92
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
93
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
94
template
class
gum::List<
int
>;
95
#
endif
96
#
endif
97
#
endif
98
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
99
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
100
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
101
template
class
gum::List<
unsigned
int
>;
102
#
endif
103
#
endif
104
#
endif
105
106
107
#
endif
// DOXYGEN_SHOULD_SKIP_THIS
gum::Set::emplace
INLINE void emplace(Args &&... args)
Definition:
set_tpl.h:643