aGrUM  0.14.1
list.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
27 #include <agrum/core/list.h>
28 
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 
31 namespace gum {
32 
33 # define GCC_STR(s) # s
34 # define GCC_JOINSTR(x, y) GCC_STR(x##y)
35 
36 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 405
37 # define GCC_DIAG_DO_PRAGMA(x) _Pragma(# x)
38 # define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
39 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
40 # define GCC_DIAG_OFF(x) \
41  GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_JOINSTR(-W, x))
42 # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop)
43 # else
44 # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_JOINSTR(-W, x))
45 # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_JOINSTR(-W, x))
46 # endif
47 # else
48 # define GCC_DIAG_OFF(x)
49 # define GCC_DIAG_ON(x)
50 # endif
51 
52  // Destructor for end/rend
53  template <>
55 
56  // constructor for end/rend
57  template <>
59 
60  // Destructor for end/rend
61  template <>
63 
64  // constructor for end/rend
65  template <>
67 
68  // an iterator that represents both end and rend for all the Lists
69  // (whatever their type). This is mainly what stroustrup suggests
70  // in his C++ programming language, third edition, page 854
71  static const ListConstIteratorSafe< Debug > __static_list_end_safe;
72  static const ListConstIterator< Debug > __static_list_end;
73 
74  static constexpr const void* __get_list_end_safe() {
75  return &__static_list_end_safe;
76  }
77  static constexpr const void* __get_list_end() { return &__static_list_end; }
78 
79  const void* const __list_end_safe = __get_list_end_safe();
80  const void* const __list_end = __get_list_end();
81 
82 } /* namespace gum */
83 
84 
85 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
86 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
87 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
88 template class gum::List< bool >;
89 # endif
90 # endif
91 # endif
92 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
93 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
94 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
95 template class gum::List< int >;
96 # endif
97 # endif
98 # endif
99 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
100 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
101 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
102 template class gum::List< unsigned int >;
103 # endif
104 # endif
105 # endif
106 
107 
108 #endif // DOXYGEN_SHOULD_SKIP_THIS
ListConstIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:489
Generic doubly linked lists.
Definition: list.h:369
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
ListConstIterator() noexcept
Default constructor.
Definition: list_tpl.h:134
Generic class for manipulating lists.
~ListConstIterator() noexcept
Class Desctructor.
Definition: list_tpl.h:197
~ListConstIteratorSafe()
Class Desctructor.
Definition: list_tpl.h:689