[multiple changes]

2010-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/bitset/invalidation: Move...
	* testsuite/23_containers/bitset/debug/invalidation: ... here.
	* testsuite/23_containers/deque/invalidation: Move...
	* testsuite/23_containers/deque/debug/invalidation: ... here.
	* testsuite/23_containers/list/invalidation: Move...
	* testsuite/23_containers/list/debug/invalidation: ... here.
	* testsuite/23_containers/map/invalidation: Move...
	* testsuite/23_containers/map/debug/invalidation: ... here.
	* testsuite/23_containers/multimap/invalidation: Move...
	* testsuite/23_containers/multimap/debug/invalidation: ... here.
	* testsuite/23_containers/set/invalidation: Move...
	* testsuite/23_containers/set/debug/invalidation: ... here.
	* testsuite/23_containers/multiset/invalidation: Move...
	* testsuite/23_containers/multiset/debug/invalidation: ... here.
	* testsuite/23_containers/vector/invalidation: Move...
	* testsuite/23_containers/vector/debug/invalidation: ... here.

2010-08-29  François Dumont  <francois.cppdevs@free.fr>

        * include/bits/stl_algobase.h (_Iter_base):  Move...
        * include/bits/stl_iterator_base_types.h: ...here.
        * include/debug/functions.h (__check_valid_range, __check_string,
	__check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
	formatter.h and use formatting macros for a consistent debug result.
        * include/debug/formatter.h (__check_singular): Declare; do not
	include debug.h.
        * include/debug/debug.h: Do not include formatter.h.
        * include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
        rename to iterator_type.
	(__gnu_debug::__base): Add.
        * include/debug/set.h: Use everywhere __gnu_debug::__base once
	iterator range valided.
        * include/debug/unordered_map: Likewise.
        * include/debug/multiset.h: Likewise.
        * include/debug/vector: Likewise.
        * include/debug/unordered_set: Likewise.
        * include/debug/deque: Likewise.
        * include/debug/map.h: Likewise.
        * include/debug/string: Likewise.
        * include/debug/list: Likewise.
        * include/debug/multimap.h: Likewise.
        * testsuite/23_containers/util/debug/assign_neg.h: New test cases on
        debug checks performed on container assign operation.
        * testsuite/23_containers/util/debug/construct_neg.h: New test cases
        on debug checks on constructors.
        * testsuite/23_containers/util/debug/insert_neg.h: New test cases on
        debug checks performed on container insert operations.
        * testsuite/23_containers/unordered_map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: New.
        * testsuite/23_containers/multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/vector/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/deque/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	list_construct1.cc: New, validate performance impact of the patch
	on the debug mode.
        * testsuite/performance/23_containers/range_construct/
	list_construct2.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	vector_construct.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
	deque_construct.cc: Likewise.

From-SVN: r163628
This commit is contained in:
Paolo Carlini 2010-08-29 17:39:00 +00:00
parent f08f8b6a53
commit 1f5ca1a15c
167 changed files with 4819 additions and 72 deletions

View File

@ -1,3 +1,109 @@
2010-08-29 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/23_containers/bitset/invalidation: Move...
* testsuite/23_containers/bitset/debug/invalidation: ... here.
* testsuite/23_containers/deque/invalidation: Move...
* testsuite/23_containers/deque/debug/invalidation: ... here.
* testsuite/23_containers/list/invalidation: Move...
* testsuite/23_containers/list/debug/invalidation: ... here.
* testsuite/23_containers/map/invalidation: Move...
* testsuite/23_containers/map/debug/invalidation: ... here.
* testsuite/23_containers/multimap/invalidation: Move...
* testsuite/23_containers/multimap/debug/invalidation: ... here.
* testsuite/23_containers/set/invalidation: Move...
* testsuite/23_containers/set/debug/invalidation: ... here.
* testsuite/23_containers/multiset/invalidation: Move...
* testsuite/23_containers/multiset/debug/invalidation: ... here.
* testsuite/23_containers/vector/invalidation: Move...
* testsuite/23_containers/vector/debug/invalidation: ... here.
2010-08-29 François Dumont <francois.cppdevs@free.fr>
* include/bits/stl_algobase.h (_Iter_base): Move...
* include/bits/stl_iterator_base_types.h: ...here.
* include/debug/functions.h (__check_valid_range, __check_string,
__check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
formatter.h and use formatting macros for a consistent debug result.
* include/debug/formatter.h (__check_singular): Declare; do not
include debug.h.
* include/debug/debug.h: Do not include formatter.h.
* include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
rename to iterator_type.
(__gnu_debug::__base): Add.
* include/debug/set.h: Use everywhere __gnu_debug::__base once
iterator range valided.
* include/debug/unordered_map: Likewise.
* include/debug/multiset.h: Likewise.
* include/debug/vector: Likewise.
* include/debug/unordered_set: Likewise.
* include/debug/deque: Likewise.
* include/debug/map.h: Likewise.
* include/debug/string: Likewise.
* include/debug/list: Likewise.
* include/debug/multimap.h: Likewise.
* testsuite/23_containers/util/debug/assign_neg.h: New test cases on
debug checks performed on container assign operation.
* testsuite/23_containers/util/debug/construct_neg.h: New test cases
on debug checks on constructors.
* testsuite/23_containers/util/debug/insert_neg.h: New test cases on
debug checks performed on container insert operations.
* testsuite/23_containers/unordered_map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New.
* testsuite/23_containers/multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/deque/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
list_construct1.cc: New, validate performance impact of the patch
on the debug mode.
* testsuite/performance/23_containers/range_construct/
list_construct2.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
vector_construct.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
deque_construct.cc: Likewise.
2010-08-26 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_iterator_base_types.h: Fix doxygen warning.

View File

@ -257,27 +257,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __a;
}
// If _Iterator has a base returns it otherwise _Iterator is returned
// untouched
template<typename _Iterator, bool _HasBase>
struct _Iter_base
{
typedef _Iterator iterator_type;
static iterator_type
_S_base(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct _Iter_base<_Iterator, true>
{
typedef typename _Iterator::iterator_type iterator_type;
static iterator_type
_S_base(_Iterator __it)
{ return __it.base(); }
};
// If _Iterator is a __normal_iterator return its base (a plain pointer,
// normally) otherwise return it untouched. See copy, fill, ...
template<typename _Iterator>

View File

@ -175,6 +175,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@}
// If _Iterator has a base returns it otherwise _Iterator is returned
// untouched
template<typename _Iterator, bool _HasBase>
struct _Iter_base
{
typedef _Iterator iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct _Iter_base<_Iterator, true>
{
typedef typename _Iterator::iterator_type iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it.base(); }
};
_GLIBCXX_END_NAMESPACE
#endif /* _STL_ITERATOR_BASE_TYPES_H */

View File

@ -123,7 +123,6 @@ namespace __gnu_debug
# define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N)
# include <debug/functions.h>
# include <debug/formatter.h>
#endif

View File

@ -89,7 +89,9 @@ namespace __debug
template<class _InputIterator>
deque(_InputIterator __first, _InputIterator __last,
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __a)
{ }
deque(const deque& __x)
@ -143,7 +145,8 @@ namespace __debug
assign(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::assign(__first, __last);
_Base::assign(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
}
@ -409,7 +412,8 @@ namespace __debug
_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_insert_range(__position, __first, __last);
_Base::insert(__position.base(), __first, __last);
_Base::insert(__position.base(), __gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
}

View File

@ -32,12 +32,14 @@
#include <bits/c++config.h>
#include <typeinfo>
#include <debug/debug.h>
namespace __gnu_debug
{
using std::type_info;
template<typename _Iterator>
bool __check_singular(_Iterator&);
/** Determine if the two types are the same. */
template<typename _Type1, typename _Type2>
struct __is_same

View File

@ -33,6 +33,7 @@
#include <bits/c++config.h>
#include <bits/stl_iterator_base_types.h> // for iterator_traits, categories
#include <bits/cpp_type_traits.h> // for __is_integer
#include <debug/formatter.h>
namespace __gnu_debug
{
@ -153,7 +154,7 @@ namespace __gnu_debug
const _InputIterator& __last
__attribute__((__unused__)))
{
_GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last));
__glibcxx_check_valid_range(__first, __last);
return __first;
}
@ -164,7 +165,7 @@ namespace __gnu_debug
const _Integer& __n __attribute__((__unused__)))
{
#ifdef _GLIBCXX_DEBUG_PEDANTIC
_GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
__glibcxx_assert(__s != 0 || __n == 0);
#endif
return __s;
}
@ -175,7 +176,7 @@ namespace __gnu_debug
__check_string(const _CharT* __s)
{
#ifdef _GLIBCXX_DEBUG_PEDANTIC
_GLIBCXX_DEBUG_ASSERT(__s != 0);
__glibcxx_assert(__s != 0);
#endif
return __s;
}
@ -242,7 +243,7 @@ namespace __gnu_debug
// Verify that the < operator for elements in the sequence is a
// StrictWeakOrdering by checking that it is irreflexive.
_GLIBCXX_DEBUG_ASSERT(__first == __last || !(*__first < *__first));
__glibcxx_assert(__first == __last || !(*__first < *__first));
return __check_sorted_aux(__first, __last, _Category());
}
@ -257,7 +258,7 @@ namespace __gnu_debug
// Verify that the predicate is StrictWeakOrdering by checking that it
// is irreflexive.
_GLIBCXX_DEBUG_ASSERT(__first == __last || !__pred(*__first, *__first));
__glibcxx_assert(__first == __last || !__pred(*__first, *__first));
return __check_sorted_aux(__first, __last, __pred, _Category());
}

View File

@ -89,7 +89,9 @@ namespace __debug
template<class _InputIterator>
list(_InputIterator __first, _InputIterator __last,
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __a)
{ }
@ -151,7 +153,8 @@ namespace __debug
assign(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::assign(__first, __last);
_Base::assign(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
}
@ -411,7 +414,8 @@ namespace __debug
_InputIterator __last)
{
__glibcxx_check_insert_range(__position, __first, __last);
_Base::insert(__position.base(), __first, __last);
_Base::insert(__position.base(), __gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
iterator

View File

@ -81,7 +81,9 @@ namespace __debug
map(_InputIterator __first, _InputIterator __last,
const _Compare& __comp = _Compare(),
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last),
__comp, __a), _Safe_base() { }
map(const map& __x)
@ -226,7 +228,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__

View File

@ -82,7 +82,9 @@ namespace __debug
multimap(_InputIterator __first, _InputIterator __last,
const _Compare& __comp = _Compare(),
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last),
__comp, __a) { }
multimap(const multimap& __x)
@ -213,7 +215,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__

View File

@ -79,7 +79,9 @@ namespace __debug
multiset(_InputIterator __first, _InputIterator __last,
const _Compare& __comp = _Compare(),
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last),
__comp, __a) { }
multiset(const multiset& __x)
@ -200,12 +202,13 @@ namespace __debug
}
template<typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
}
void
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void

View File

@ -1,6 +1,6 @@
// Safe iterator implementation -*- C++ -*-
// Copyright (C) 2003, 2004, 2005, 2006, 2009
// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -33,9 +33,9 @@
#include <debug/debug.h>
#include <debug/macros.h>
#include <debug/functions.h>
#include <debug/formatter.h>
#include <debug/safe_base.h>
#include <bits/stl_pair.h>
#include <bits/stl_iterator_base_types.h> // for _Iter_base
#include <ext/type_traits.h>
namespace __gnu_debug
@ -88,7 +88,7 @@ namespace __gnu_debug
typedef std::iterator_traits<_Iterator> _Traits;
public:
typedef _Iterator _Base_iterator;
typedef _Iterator iterator_type;
typedef typename _Traits::iterator_category iterator_category;
typedef typename _Traits::value_type value_type;
typedef typename _Traits::difference_type difference_type;
@ -136,7 +136,7 @@ namespace __gnu_debug
_Safe_iterator(
const _Safe_iterator<_MutableIterator,
typename __gnu_cxx::__enable_if<(std::__are_same<_MutableIterator,
typename _Sequence::iterator::_Base_iterator>::__value),
typename _Sequence::iterator::iterator_type>::__value),
_Sequence>::__type>& __x)
: _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
{
@ -638,6 +638,37 @@ namespace __gnu_debug
operator+(typename _Safe_iterator<_Iterator,_Sequence>::difference_type __n,
const _Safe_iterator<_Iterator, _Sequence>& __i)
{ return __i + __n; }
// Helper struct to detect random access safe iterators.
template<typename _Iterator>
struct __is_safe_random_iterator
{
enum { __value = 0 };
typedef std::__false_type __type;
};
template<typename _Iterator, typename _Sequence>
struct __is_safe_random_iterator<_Safe_iterator<_Iterator, _Sequence> >
: std::__are_same<std::random_access_iterator_tag,
typename std::iterator_traits<_Iterator>::
iterator_category>
{ };
template<typename _Iterator>
struct _Siter_base
: std::_Iter_base<_Iterator, __is_safe_random_iterator<_Iterator>::__value>
{ };
/** Helper function to extract base iterator of random access safe iterator
in order to reduce performance impact of debug mode. Limited to random
access iterator because it is the only category for which it is possible
to check for correct iterators order in the __valid_range function
thanks to the < operator.
*/
template<typename _Iterator>
inline typename _Siter_base<_Iterator>::iterator_type
__base(_Iterator __it)
{ return _Siter_base<_Iterator>::_S_base(__it); }
} // namespace __gnu_debug
#ifndef _GLIBCXX_EXPORT_TEMPLATE

View File

@ -79,7 +79,9 @@ namespace __debug
set(_InputIterator __first, _InputIterator __last,
const _Compare& __comp = _Compare(),
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last),
__comp, __a) { }
set(const set& __x)
@ -209,7 +211,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__

View File

@ -107,8 +107,10 @@ namespace __gnu_debug
template<typename _InputIterator>
basic_string(_InputIterator __begin, _InputIterator __end,
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__begin, __end), __end, __a)
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__begin,
__end)),
__gnu_debug::__base(__end), __a)
{ }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@ -350,7 +352,8 @@ namespace __gnu_debug
append(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::append(__first, __last);
_Base::append(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
return *this;
}
@ -421,7 +424,8 @@ namespace __gnu_debug
assign(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::assign(__first, __last);
_Base::assign(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
return *this;
}
@ -501,7 +505,8 @@ namespace __gnu_debug
insert(iterator __p, _InputIterator __first, _InputIterator __last)
{
__glibcxx_check_insert_range(__p, __first, __last);
_Base::insert(__p.base(), __first, __last);
_Base::insert(__p.base(), __gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
}

View File

@ -78,12 +78,14 @@ namespace __debug
: _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l,
unordered_map(_InputIterator __first, _InputIterator __last,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __n,
__hf, __eql, __a), _Safe_base() { }
unordered_map(const unordered_map& __x)
@ -197,7 +199,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
iterator
@ -337,12 +340,14 @@ namespace __debug
: _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l,
unordered_multimap(_InputIterator __first, _InputIterator __last,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __n,
__hf, __eql, __a), _Safe_base() { }
unordered_multimap(const unordered_multimap& __x)
@ -448,7 +453,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
iterator

View File

@ -78,12 +78,14 @@ namespace __debug
: _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l,
unordered_set(_InputIterator __first, _InputIterator __last,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __n,
__hf, __eql, __a), _Safe_base() { }
unordered_set(const unordered_set& __x)
@ -197,7 +199,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
iterator
@ -333,12 +336,14 @@ namespace __debug
: _Base(__n, __hf, __eql, __a) { }
template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l,
unordered_multiset(_InputIterator __first, _InputIterator __last,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __n,
__hf, __eql, __a), _Safe_base() { }
unordered_multiset(const unordered_multiset& __x)
@ -444,7 +449,8 @@ namespace __debug
insert(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::insert(__first, __last);
_Base::insert(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
}
iterator

View File

@ -94,8 +94,9 @@ namespace __debug
template<class _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last),
__last, __a),
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
__last)),
__gnu_debug::__base(__last), __a),
_M_guaranteed_capacity(0)
{ _M_update_guaranteed_capacity(); }
@ -158,7 +159,8 @@ namespace __debug
assign(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::assign(__first, __last);
_Base::assign(__gnu_debug::__base(__first),
__gnu_debug::__base(__last));
this->_M_invalidate_all();
_M_update_guaranteed_capacity();
}
@ -463,7 +465,8 @@ namespace __debug
punt here by checking if it did occur. */
typename _Base::iterator __old_begin = _M_base().begin();
difference_type __offset = __position - begin();
_Base::insert(__position.base(), __first, __last);
_Base::insert(__position.base(), __gnu_debug::__base(__first),
__gnu_debug::__base(__last));
if (_M_base().begin() != __old_begin)
this->_M_invalidate_all();

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <deque>
template<typename Type>
struct cont_traits
{
typedef std::deque<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(cont.begin(), first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/deque>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::deque<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(cont.begin(), first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/assign_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <list>
template<typename Type>
struct cont_traits
{
typedef std::list<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(cont.begin(), first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/list>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::list<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(cont.begin(), first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <map>
template<typename Type>
struct cont_traits
{
typedef std::map<Type, Type> cont_type;
typedef std::pair<Type, Type> val_type;
static val_type
make_val(Type val)
{ return val_type(val, val); }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/map>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::map<Type, Type> cont_type;
typedef std::pair<Type, Type> val_type;
static val_type
make_val(Type val)
{ return val_type(val, val); }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <map>
template<typename Type>
struct cont_traits
{
typedef std::multimap<Type, Type> cont_type;
typedef std::pair<Type, Type> val_type;
static val_type
make_val(Type val)
{ return val_type(val, val); }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/map>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::multimap<Type, Type> cont_type;
typedef std::pair<Type, Type> val_type;
static val_type
make_val(Type val)
{ return val_type(val, val); }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <set>
template<typename Type>
struct cont_traits
{
typedef std::multiset<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/set>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::multiset<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/construct_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <set>
template<typename Type>
struct cont_traits
{
typedef std::set<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,35 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
#include <debug/set>
template<typename Type>
struct cont_traits
{
typedef __gnu_debug::set<Type> cont_type;
typedef Type val_type;
static val_type
make_val(Type val)
{ return val; }
template<typename Iter>
static void
insert(cont_type& cont, Iter first, Iter last)
{ cont.insert(first, last); }
};

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check2<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "cont_traits.h"
void test01()
{
check3<cont_traits>();
}
int main()
{
test01();
return 0;
}

View File

@ -0,0 +1,32 @@
// Copyright (C) 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
//
// { dg-do run { xfail *-*-* } }
#include <debug/insert_neg.h>
#include "debug_cont_traits.h"
void test01()
{
debug_check1<cont_traits>();
}
int main()
{
test01();
return 0;
}

Some files were not shown because too many files have changed in this diff Show More