1.1 --- a/epoc32/include/stdapis/stlport/stl/debug/_debug.c Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/stlport/stl/debug/_debug.c Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,496 @@
1.4 -_debug.c
1.5 +/*
1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
1.7 + *
1.8 + * Copyright (c) 1997
1.9 + * Moscow Center for SPARC Technology
1.10 + *
1.11 + * Copyright (c) 1999
1.12 + * Boris Fomitchev
1.13 + *
1.14 + * This material is provided "as is", with absolutely no warranty expressed
1.15 + * or implied. Any use is at your own risk.
1.16 + *
1.17 + * Permission to use or copy this software for any purpose is hereby granted
1.18 + * without fee, provided the above notices are retained on all copies.
1.19 + * Permission to modify the code and to distribute modified code is granted,
1.20 + * provided the above notices are retained, and a notice that the code was
1.21 + * modified is included with the above copyright notice.
1.22 + *
1.23 + */
1.24 +
1.25 +# ifndef _STLP_DEBUG_C
1.26 +# define _STLP_DEBUG_C
1.27 +
1.28 +#if defined ( _STLP_DEBUG )
1.29 +
1.30 +# ifdef _STLP_THREADS
1.31 +# ifndef _STLP_NEED_MUTABLE
1.32 +# define _STLP_ACQUIRE_LOCK(_Lock) _Lock._M_acquire_lock();
1.33 +# define _STLP_RELEASE_LOCK(_Lock) _Lock._M_release_lock();
1.34 +# else
1.35 +# define _STLP_ACQUIRE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_acquire_lock();
1.36 +# define _STLP_RELEASE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_release_lock();
1.37 +# endif /* _STLP_NEED_MUTABLE */
1.38 +# else
1.39 +# define _STLP_ACQUIRE_LOCK(_Lock)
1.40 +# define _STLP_RELEASE_LOCK(_Lock)
1.41 +# endif /* _STLP_THREADS */
1.42 +
1.43 +_STLP_BEGIN_NAMESPACE
1.44 +
1.45 +//==========================================================
1.46 +// global non-inline functions
1.47 +//==========================================================
1.48 +
1.49 +// [ i1, i2)
1.50 +template <class _Iterator>
1.51 +inline bool _STLP_CALL
1.52 +__in_range_aux(const _Iterator& __it, const _Iterator& __first,
1.53 + const _Iterator& __last, const random_access_iterator_tag &) {
1.54 + return ( __it >= __first &&
1.55 + __it < __last);
1.56 +}
1.57 +
1.58 +template <class _Iterator1, class _Iterator>
1.59 +# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1100)
1.60 +inline bool _STLP_CALL __in_range_aux(_Iterator1 __it, const _Iterator& __first,
1.61 +# else
1.62 +inline bool _STLP_CALL __in_range_aux(const _Iterator1& __it, const _Iterator& __first,
1.63 +# endif
1.64 + const _Iterator& __last, const forward_iterator_tag &) {
1.65 + _Iterator1 __i(__first);
1.66 + for (; __i != __last && __i != __it; ++__i);
1.67 + return (__i!=__last);
1.68 +}
1.69 +
1.70 +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
1.71 +template <class _Iterator1, class _Iterator>
1.72 +inline bool _STLP_CALL
1.73 +__in_range_aux(const _Iterator1& __it, const _Iterator& __first,
1.74 + const _Iterator& __last, const bidirectional_iterator_tag &) {
1.75 + _Iterator1 __i(__first);
1.76 + for (; __i != __last && __i != __it; ++__i);
1.77 + return (__i !=__last);
1.78 +}
1.79 +# endif
1.80 +
1.81 +template <class _Iterator>
1.82 +bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last) {
1.83 + _STLP_VERBOSE_RETURN(__valid_range(__first,__last), _StlMsg_INVALID_RANGE )
1.84 + return true;
1.85 +}
1.86 +
1.87 +template <class _Iterator>
1.88 +bool _STLP_CALL __check_range(const _Iterator& __it,
1.89 + const _Iterator& __start, const _Iterator& __finish) {
1.90 + _STLP_VERBOSE_RETURN(__in_range(__it,__start, __finish),
1.91 + _StlMsg_NOT_IN_RANGE_1)
1.92 + return true;
1.93 +}
1.94 +
1.95 +template <class _Iterator>
1.96 +bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last,
1.97 + const _Iterator& __start, const _Iterator& __finish) {
1.98 + _STLP_VERBOSE_RETURN(__in_range(__first, __last, __start, __finish),
1.99 + _StlMsg_NOT_IN_RANGE_2)
1.100 + return true;
1.101 +}
1.102 +
1.103 +//===============================================================
1.104 +
1.105 +template <class _Iterator>
1.106 +void _STLP_CALL __invalidate_range(const __owned_list* __base,
1.107 + const _Iterator& __first,
1.108 + const _Iterator& __last)
1.109 +{
1.110 + typedef _Iterator* _Safe_iterator_ptr;
1.111 + typedef __owned_link _L_type;
1.112 + _STLP_ACQUIRE_LOCK(__base->_M_lock)
1.113 + _L_type* __pos;
1.114 + _L_type* __prev;
1.115 +
1.116 + for (__prev = (_L_type*)&__base->_M_node, __pos= (_L_type*)__prev->_M_next;
1.117 + __pos!=0;) {
1.118 + if ((!(&__first == (_Iterator*)__pos || &__last == (_Iterator*)__pos))
1.119 + && __in_range_aux(
1.120 + ((_Iterator*)__pos)->_M_iterator,
1.121 + __first._M_iterator,
1.122 + __last._M_iterator,
1.123 + _STLP_ITERATOR_CATEGORY(__first, _Iterator))) {
1.124 + __pos->_M_owner = 0;
1.125 + __pos = (_L_type*) (__prev->_M_next = __pos->_M_next);
1.126 + }
1.127 + else {
1.128 + __prev = __pos;
1.129 + __pos=(_L_type*)__pos->_M_next;
1.130 + }
1.131 + }
1.132 + _STLP_RELEASE_LOCK(__base->_M_lock)
1.133 +}
1.134 +
1.135 +template <class _Iterator>
1.136 +void _STLP_CALL __invalidate_iterator(const __owned_list* __base,
1.137 + const _Iterator& __it)
1.138 +{
1.139 + typedef __owned_link _L_type;
1.140 + _L_type* __position, *__prev;
1.141 + _STLP_ACQUIRE_LOCK(__base->_M_lock)
1.142 + for (__prev = (_L_type*)&__base->_M_node, __position = (_L_type*)__prev->_M_next;
1.143 + __position!= 0;) {
1.144 + // this requires safe iterators to be derived from __owned_link
1.145 + if ((__position != (_L_type*)&__it) && ((_Iterator*)__position)->_M_iterator ==__it._M_iterator) {
1.146 + __position->_M_owner = 0;
1.147 + __position = (_L_type*) (__prev->_M_next = __position->_M_next);
1.148 + }
1.149 + else {
1.150 + __prev = __position;
1.151 + __position=(_L_type*)__position->_M_next;
1.152 + }
1.153 + }
1.154 + _STLP_RELEASE_LOCK(__base->_M_lock)
1.155 +}
1.156 +
1.157 +_STLP_END_NAMESPACE
1.158 +
1.159 +# endif /* _STLP_DEBUG */
1.160 +
1.161 +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
1.162 +
1.163 +// dwa 12/26/99 -- for abort
1.164 +# if defined (_STLP_USE_NEW_C_HEADERS)
1.165 +# include <cstdlib>
1.166 +# else
1.167 +# include <stdlib.h>
1.168 +# endif
1.169 +
1.170 +# if defined (_STLP_WIN32)
1.171 +# include <stl/_threads.h>
1.172 +# endif
1.173 +
1.174 +//==========================================================
1.175 +// .c section
1.176 +// owned_list non-inline methods and global functions
1.177 +//==========================================================
1.178 +
1.179 +#if defined ( _STLP_ASSERTIONS )
1.180 +
1.181 +_STLP_BEGIN_NAMESPACE
1.182 +
1.183 +# ifndef _STLP_STRING_LITERAL
1.184 +# define _STLP_STRING_LITERAL(__x) __x
1.185 +# endif
1.186 +
1.187 +# ifdef _STLP_WINCE
1.188 +# define _STLP_PERCENT_S "%hs"
1.189 +# else
1.190 +# define _STLP_PERCENT_S "%s"
1.191 +# endif
1.192 +
1.193 +# define _STLP_MESSAGE_TABLE_BODY = { \
1.194 +_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error: %s\n"), \
1.195 +_STLP_STRING_LITERAL(_STLP_PERCENT_S "(%d): STL assertion failure : " _STLP_PERCENT_S "\n" _STLP_ASSERT_MSG_TRAILER), \
1.196 +_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error : " _STLP_PERCENT_S "\n" _STLP_PERCENT_S "(%d): STL assertion failure: " _STLP_PERCENT_S " \n" _STLP_ASSERT_MSG_TRAILER), \
1.197 +_STLP_STRING_LITERAL("Invalid argument to operation (see operation documentation)"), \
1.198 +_STLP_STRING_LITERAL("Taking an iterator out of destroyed (or otherwise corrupted) container"), \
1.199 +_STLP_STRING_LITERAL("Trying to extract an object out from empty container"),\
1.200 +_STLP_STRING_LITERAL("Past-the-end iterator could not be erased"), \
1.201 +_STLP_STRING_LITERAL("Index out of bounds"), \
1.202 +_STLP_STRING_LITERAL("Container doesn't own the iterator"), \
1.203 +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) iterator used"), \
1.204 +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) lefthand iterator in expression"), \
1.205 +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) righthand iterator in expression"), \
1.206 +_STLP_STRING_LITERAL("Iterators used in expression are from different owners"), \
1.207 +_STLP_STRING_LITERAL("Iterator could not be dereferenced (past-the-end ?)"), \
1.208 +_STLP_STRING_LITERAL("Range [first,last) is invalid"), \
1.209 +_STLP_STRING_LITERAL("Iterator is not in range [first,last)"), \
1.210 +_STLP_STRING_LITERAL("Range [first,last) is not in range [start,finish)"), \
1.211 +_STLP_STRING_LITERAL("The advance would produce invalid iterator"), \
1.212 +_STLP_STRING_LITERAL("Iterator is singular (advanced beyond the bounds ?)"), \
1.213 +_STLP_STRING_LITERAL("Memory block deallocated twice"), \
1.214 +_STLP_STRING_LITERAL("Deallocating a block that was never allocated"), \
1.215 +_STLP_STRING_LITERAL("Deallocating a memory block allocated for another type"), \
1.216 +_STLP_STRING_LITERAL("Size of block passed to deallocate() doesn't match block size"), \
1.217 +_STLP_STRING_LITERAL("Pointer underrun - safety margin at front of memory block overwritten"), \
1.218 +_STLP_STRING_LITERAL("Pointer overrrun - safety margin at back of memory block overwritten"), \
1.219 +_STLP_STRING_LITERAL("Attempt to dereference null pointer returned by auto_ptr::get()"), \
1.220 +_STLP_STRING_LITERAL("Unknown problem") \
1.221 + }
1.222 +
1.223 +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
1.224 +#ifdef __SYMBIAN32__
1.225 +template <class _Dummy>
1.226 +const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX];// _STLP_MESSAGE_TABLE_BODY;
1.227 +#else
1.228 +template <class _Dummy>
1.229 +const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX] _STLP_MESSAGE_TABLE_BODY;
1.230 +#endif
1.231 +
1.232 +# else
1.233 +__DECLARE_INSTANCE(const char*, __stl_debug_engine<bool>::_Message_table[_StlMsg_MAX],
1.234 + _STLP_MESSAGE_TABLE_BODY);
1.235 +
1.236 +# endif
1.237 +
1.238 +# undef _STLP_STRING_LITERAL
1.239 +# undef _STLP_PERCENT_S
1.240 +_STLP_END_NAMESPACE
1.241 +
1.242 +// abort()
1.243 +# include <cstdlib>
1.244 +
1.245 +# if !defined( _STLP_DEBUG_MESSAGE )
1.246 +
1.247 +# include <cstdarg>
1.248 +# include <cstdio>
1.249 +
1.250 +_STLP_BEGIN_NAMESPACE
1.251 +
1.252 +template <class _Dummy>
1.253 +void _STLP_CALL
1.254 +__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...)
1.255 +{
1.256 + STLPORT_CSTD::va_list __args;
1.257 + va_start( __args, __format_str );
1.258 +
1.259 +# if defined (_STLP_WINCE)
1.260 + TCHAR __buffer[512];
1.261 + int _convert = strlen(__format_str) + 1;
1.262 + LPWSTR _lpw = (LPWSTR)alloca(_convert*sizeof(wchar_t));
1.263 + _lpw[0] = '\0';
1.264 + MultiByteToWideChar(GetACP(), 0, __format_str, -1, _lpw, _convert);
1.265 + wvsprintf(__buffer, _lpw, __args);
1.266 + // wvsprintf(__buffer, __format_str, __args);
1.267 + _STLP_WINCE_TRACE(__buffer);
1.268 +# elif defined (_STLP_WIN32) && ( defined(_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)) && ! defined (__WINS__)
1.269 + char __buffer [4096];
1.270 + _vsnprintf(__buffer, sizeof(__buffer) / sizeof(char),
1.271 + __format_str, __args);
1.272 + OutputDebugStringA(__buffer);
1.273 +# elif defined (__amigaos__)
1.274 + STLPORT_CSTD::vfprintf(stderr, __format_str, (char *)__args);
1.275 +# else
1.276 + STLPORT_CSTD::vfprintf(stderr, __format_str, __args);
1.277 +# endif /* WINCE */
1.278 +
1.279 +# ifdef _STLP_DEBUG_MESSAGE_POST
1.280 + _STLP_DEBUG_MESSAGE_POST
1.281 +# endif
1.282 +
1.283 + va_end(__args);
1.284 +
1.285 +}
1.286 +
1.287 +_STLP_END_NAMESPACE
1.288 +
1.289 +# endif /* _STLP_DEBUG_MESSAGE */
1.290 +
1.291 +
1.292 +_STLP_BEGIN_NAMESPACE
1.293 +
1.294 +
1.295 +template <class _Dummy>
1.296 +void _STLP_CALL
1.297 +__stl_debug_engine<_Dummy>::_IndexedError(int __error_ind, const char* __f, int __l)
1.298 +{
1.299 + __stl_debug_message(_Message_table[_StlFormat_ERROR_RETURN],
1.300 + __f, __l, _Message_table[__error_ind]);
1.301 +}
1.302 +
1.303 +template <class _Dummy>
1.304 +void _STLP_CALL
1.305 +__stl_debug_engine<_Dummy>::_VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l)
1.306 +{
1.307 + __stl_debug_message(_Message_table[_StlFormat_VERBOSE_ASSERTION_FAILURE],
1.308 + __f, __l, _Message_table[__error_ind], __f, __l, __expr);
1.309 + __stl_debug_terminate();
1.310 +}
1.311 +
1.312 +template <class _Dummy>
1.313 +void _STLP_CALL
1.314 +__stl_debug_engine<_Dummy>::_Assert(const char* __expr, const char* __f, int __l)
1.315 +{
1.316 + __stl_debug_message(_Message_table[_StlFormat_ASSERTION_FAILURE],__f, __l, __expr);
1.317 + __stl_debug_terminate();
1.318 +}
1.319 +
1.320 +// if exceptions are present, sends unique exception
1.321 +// if not, calls abort() to terminate
1.322 +template <class _Dummy>
1.323 +void _STLP_CALL
1.324 +__stl_debug_engine<_Dummy>::_Terminate()
1.325 +{
1.326 +# ifdef _STLP_USE_NAMESPACES
1.327 + using namespace _STLP_STD;
1.328 +# endif
1.329 +# if defined (_STLP_USE_EXCEPTIONS) && ! defined (_STLP_NO_DEBUG_EXCEPTIONS)
1.330 + throw __stl_debug_exception();
1.331 +# else
1.332 + _STLP_ABORT();
1.333 +# endif
1.334 +}
1.335 +
1.336 +_STLP_END_NAMESPACE
1.337 +
1.338 +# endif /* _STLP_ASSERTIONS */
1.339 +
1.340 +#ifdef _STLP_DEBUG
1.341 +
1.342 +_STLP_BEGIN_NAMESPACE
1.343 +
1.344 +//==========================================================
1.345 +// owned_list non-inline methods
1.346 +//==========================================================
1.347 +
1.348 +template <class _Dummy>
1.349 +void _STLP_CALL
1.350 +__stl_debug_engine<_Dummy>::_Invalidate_all(__owned_list* __l) {
1.351 + _STLP_ACQUIRE_LOCK(__l->_M_lock);
1.352 + _Stamp_all(__l, 0);
1.353 + __l->_M_node._M_next =0;
1.354 + _STLP_RELEASE_LOCK(__l->_M_lock);
1.355 +}
1.356 +
1.357 +// boris : this is unasafe routine; should be used from within critical section only !
1.358 +template <class _Dummy>
1.359 +void _STLP_CALL
1.360 +__stl_debug_engine<_Dummy>::_Stamp_all(__owned_list* __l, __owned_list* __o) {
1.361 + // crucial
1.362 + if (__l->_M_node._M_owner) {
1.363 + for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next;
1.364 + __position != 0; __position= (__owned_link*)__position->_M_next) {
1.365 + _STLP_ASSERT(__position->_Owner()== __l)
1.366 + __position->_M_owner=__o;
1.367 + }
1.368 + }
1.369 +}
1.370 +
1.371 +template <class _Dummy>
1.372 +void _STLP_CALL
1.373 +__stl_debug_engine<_Dummy>::_Verify(const __owned_list* __l) {
1.374 + _STLP_ACQUIRE_LOCK(__l->_M_lock);
1.375 + if (__l) {
1.376 + _STLP_ASSERT(__l->_M_node._Owner() != 0)
1.377 + for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next;
1.378 + __position != 0; __position= (__owned_link*)__position->_M_next) {
1.379 + _STLP_ASSERT(__position->_Owner()== __l)
1.380 + }
1.381 + }
1.382 + _STLP_RELEASE_LOCK(__l->_M_lock);
1.383 +}
1.384 +
1.385 +template <class _Dummy>
1.386 +void _STLP_CALL
1.387 +__stl_debug_engine<_Dummy>::_Swap_owners(__owned_list& __x, __owned_list& __y) {
1.388 +
1.389 + // according to the standard : --no swap() function invalidates any references,
1.390 + // pointers, or iterators referring to the elements of the containers being swapped.
1.391 +
1.392 + __owned_link* __tmp;
1.393 +
1.394 + // boris : there is a deadlock potential situation here if we lock two containers sequentially.
1.395 + // As user is supposed to provide its own synchronization around swap() ( it is unsafe to do any container/iterator access
1.396 + // in parallel with swap()), we just do not use any locking at all -- that behaviour is closer to non-debug version
1.397 +
1.398 + __tmp = __x._M_node._M_next;
1.399 +
1.400 + _Stamp_all(&__x, &__y);
1.401 + _Stamp_all(&__y, &__x);
1.402 +
1.403 + __x._M_node._M_next = __y._M_node._M_next;
1.404 + __y._M_node._M_next = __tmp;
1.405 +
1.406 +}
1.407 +
1.408 +template <class _Dummy>
1.409 +void _STLP_CALL
1.410 +__stl_debug_engine<_Dummy>::_M_detach(__owned_list* __l, __owned_link* __c_node) {
1.411 + if (__l != 0) {
1.412 +
1.413 + _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
1.414 +
1.415 + _STLP_ACQUIRE_LOCK(__l->_M_lock)
1.416 + // boris : re-test the condition in case someone else already deleted us
1.417 + if(__c_node->_M_owner != 0) {
1.418 + __owned_link* __prev, *__next;
1.419 +
1.420 + for (__prev = &__l->_M_node; (__next = __prev->_M_next) != __c_node;
1.421 + __prev = __next) {
1.422 + _STLP_ASSERT(__next && __next->_Owner() == __l)
1.423 + }
1.424 +
1.425 + __prev->_M_next = __c_node->_M_next;
1.426 + __c_node->_M_owner=0;
1.427 + }
1.428 + _STLP_RELEASE_LOCK(__l->_M_lock)
1.429 + }
1.430 +}
1.431 +
1.432 +template <class _Dummy>
1.433 +void _STLP_CALL
1.434 +__stl_debug_engine<_Dummy>::_M_attach(__owned_list* __l, __owned_link* __c_node) {
1.435 + if (__l ==0) {
1.436 + (__c_node)->_M_owner = 0;
1.437 + } else {
1.438 + _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
1.439 + _STLP_ACQUIRE_LOCK(__l->_M_lock)
1.440 + __c_node->_M_owner = __l;
1.441 + __c_node->_M_next = __l->_M_node._M_next;
1.442 + __l->_M_node._M_next = __c_node;
1.443 + _STLP_RELEASE_LOCK(__l->_M_lock)
1.444 + }
1.445 +}
1.446 +
1.447 +
1.448 +template <class _Dummy>
1.449 +void* _STLP_CALL
1.450 +__stl_debug_engine<_Dummy>::_Get_container_ptr(const __owned_link* __l) {
1.451 + const __owned_list* __owner = __l->_Owner();
1.452 + _STLP_VERBOSE_RETURN_0(__owner != 0, _StlMsg_INVALID_ITERATOR)
1.453 + void* __ret = __CONST_CAST(void*,__owner->_Owner());
1.454 + _STLP_VERBOSE_RETURN_0(__ret !=0, _StlMsg_INVALID_CONTAINER)
1.455 + return __ret;
1.456 +}
1.457 +
1.458 +template <class _Dummy>
1.459 +bool _STLP_CALL
1.460 +__stl_debug_engine<_Dummy>::_Check_same_owner( const __owned_link& __i1,
1.461 + const __owned_link& __i2)
1.462 +{
1.463 + _STLP_VERBOSE_RETURN(__i1._Valid(), _StlMsg_INVALID_LEFTHAND_ITERATOR)
1.464 + _STLP_VERBOSE_RETURN(__i2._Valid(), _StlMsg_INVALID_RIGHTHAND_ITERATOR)
1.465 + _STLP_VERBOSE_RETURN((__i1._Owner()==__i2._Owner()), _StlMsg_DIFFERENT_OWNERS)
1.466 + return true;
1.467 +}
1.468 +
1.469 +template <class _Dummy>
1.470 +bool _STLP_CALL
1.471 +__stl_debug_engine<_Dummy>::_Check_same_owner_or_null( const __owned_link& __i1,
1.472 + const __owned_link& __i2)
1.473 +{
1.474 + _STLP_VERBOSE_RETURN(__i1._Owner()==__i2._Owner(), _StlMsg_DIFFERENT_OWNERS)
1.475 + return true;
1.476 +}
1.477 +
1.478 +template <class _Dummy>
1.479 +bool _STLP_CALL
1.480 +__stl_debug_engine<_Dummy>::_Check_if_owner( const __owned_list * __l, const __owned_link& __it)
1.481 +{
1.482 + const __owned_list* __owner_ptr = __it._Owner();
1.483 + _STLP_VERBOSE_RETURN(__owner_ptr!=0, _StlMsg_INVALID_ITERATOR)
1.484 + _STLP_VERBOSE_RETURN(__l==__owner_ptr, _StlMsg_NOT_OWNER)
1.485 + return true;
1.486 +}
1.487 +
1.488 +
1.489 +_STLP_END_NAMESPACE
1.490 +
1.491 +#endif /* _STLP_DEBUG */
1.492 +
1.493 +#endif /* if defined (EXPOSE_GLOBALS_IMPLEMENTATION) */
1.494 +
1.495 +#endif /* header guard */
1.496 +
1.497 +// Local Variables:
1.498 +// mode:C++
1.499 +// End:
1.500 +