3 * Copyright (c) 1996,1997
4 * Silicon Graphics Computer Systems, Inc.
7 * Moscow Center for SPARC Technology
12 * This material is provided "as is", with absolutely no warranty expressed
13 * or implied. Any use is at your own risk.
15 * Permission to use or copy this software for any purpose is hereby granted
16 * without fee, provided the above notices are retained on all copies.
17 * Permission to modify the code and to distribute modified code is granted,
18 * provided the above notices are retained, and a notice that the code was
19 * modified is included with the above copyright notice.
23 /* NOTE: This is an internal header file, included by other STL headers.
24 * You should not attempt to use it directly.
27 #ifndef _STLP_INTERNAL_SLIST_BASE_H
28 #define _STLP_INTERNAL_SLIST_BASE_H
30 #ifndef _STLP_INTERNAL_CSTDDEF
31 # include <stl/_cstddef.h>
36 _STLP_MOVE_TO_PRIV_NAMESPACE
38 struct _Slist_node_base
{
39 _Slist_node_base
* _M_next
;
42 inline _Slist_node_base
*
43 __slist_make_link(_Slist_node_base
* __prev_node
,
44 _Slist_node_base
* __new_node
) {
45 __new_node
->_M_next
= __prev_node
->_M_next
;
46 __prev_node
->_M_next
= __new_node
;
51 template <class _Dummy
>
54 // those used to be global functions
55 // moved here to reduce code bloat without templatizing _Slist_iterator_base
56 static size_t _STLP_CALL
size(_Slist_node_base
* __node
);
57 static _Slist_node_base
* _STLP_CALL
__reverse(_Slist_node_base
* __node
);
58 static void _STLP_CALL
__splice_after(_Slist_node_base
* __pos
,
59 _Slist_node_base
* __before_first
,
60 _Slist_node_base
* __before_last
);
62 static void _STLP_CALL
__splice_after(_Slist_node_base
* __pos
, _Slist_node_base
* __head
);
64 static _Slist_node_base
* _STLP_CALL
__previous(_Slist_node_base
* __head
,
65 const _Slist_node_base
* __node
);
66 static const _Slist_node_base
* _STLP_CALL
__previous(const _Slist_node_base
* __head
,
67 const _Slist_node_base
* __node
) {
68 return _Sl_global
<_Dummy
>::__previous(__CONST_CAST(_Slist_node_base
*, __head
), __node
);
72 #if defined (_STLP_USE_TEMPLATE_EXPORT)
73 _STLP_EXPORT_TEMPLATE_CLASS _Sl_global
<bool>;
76 typedef _Sl_global
<bool> _Sl_global_inst
;
78 _STLP_MOVE_TO_STD_NAMESPACE
82 #if !defined (_STLP_LINK_TIME_INSTANTIATION) && defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
83 # include <stl/_slist_base.c>
86 #endif /* _STLP_INTERNAL_SLIST_BASE_H */