aGrUM  0.16.0
list.cpp
Go to the documentation of this file.
1 
30 #include <agrum/core/list.h>
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 
34 namespace gum {
35 
36 # define GCC_STR(s) # s
37 # define GCC_JOINSTR(x, y) GCC_STR(x##y)
38 
39 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 405
40 # define GCC_DIAG_DO_PRAGMA(x) _Pragma(# x)
41 # define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
42 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
43 # define GCC_DIAG_OFF(x) \
44  GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_JOINSTR(-W, x))
45 # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop)
46 # else
47 # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_JOINSTR(-W, x))
48 # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_JOINSTR(-W, x))
49 # endif
50 # else
51 # define GCC_DIAG_OFF(x)
52 # define GCC_DIAG_ON(x)
53 # endif
54 
55  // Destructor for end/rend
56  template <>
58 
59  // constructor for end/rend
60  template <>
62 
63  // Destructor for end/rend
64  template <>
66 
67  // constructor for end/rend
68  template <>
70 
71  // an iterator that represents both end and rend for all the Lists
72  // (whatever their type). This is mainly what stroustrup suggests
73  // in his C++ programming language, third edition, page 854
74  static const ListConstIteratorSafe< Debug > __static_list_end_safe;
75  static const ListConstIterator< Debug > __static_list_end;
76 
77  static constexpr const void* __get_list_end_safe() {
78  return &__static_list_end_safe;
79  }
80  static constexpr const void* __get_list_end() { return &__static_list_end; }
81 
82  const void* const __list_end_safe = __get_list_end_safe();
83  const void* const __list_end = __get_list_end();
84 
85 } /* namespace gum */
86 
87 
88 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
89 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
90 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
91 template class gum::List< bool >;
92 # endif
93 # endif
94 # endif
95 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
96 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
97 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
98 template class gum::List< int >;
99 # endif
100 # endif
101 # endif
102 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
103 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
104 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
105 template class gum::List< unsigned int >;
106 # endif
107 # endif
108 # endif
109 
110 
111 #endif // DOXYGEN_SHOULD_SKIP_THIS
ListConstIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:492
Generic doubly linked lists.
Definition: list.h:372
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
ListConstIterator() noexcept
Default constructor.
Definition: list_tpl.h:137
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
~ListConstIterator() noexcept
Class Desctructor.
Definition: list_tpl.h:200
~ListConstIteratorSafe()
Class Desctructor.
Definition: list_tpl.h:692