deque: Constrain InputIterator parameters.
* include/profile/deque: Constrain InputIterator parameters. * include/profile/forward_list: Likewise. * include/profile/list: Likewise. * include/profile/map.h: Likewise. * include/profile/multimap.h: Likewise. * include/profile/set.h: Likewise. * include/profile/multiset.h: Likewise. * include/profile/vector: Likewise. From-SVN: r193196
This commit is contained in:
parent
9052f54ccb
commit
3c7d8b035a
|
@ -1,3 +1,14 @@
|
||||||
|
2012-11-05 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
|
* include/profile/deque: Constrain InputIterator parameters.
|
||||||
|
* include/profile/forward_list: Likewise.
|
||||||
|
* include/profile/list: Likewise.
|
||||||
|
* include/profile/map.h: Likewise.
|
||||||
|
* include/profile/multimap.h: Likewise.
|
||||||
|
* include/profile/set.h: Likewise.
|
||||||
|
* include/profile/multiset.h: Likewise.
|
||||||
|
* include/profile/vector: Likewise.
|
||||||
|
|
||||||
2012-11-05 Jonathan Wakely <jwakely.gcc@gmail.com>
|
2012-11-05 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
* include/profile/forward_list: Update to meet allocator-aware
|
* include/profile/forward_list: Update to meet allocator-aware
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Profiling deque implementation -*- C++ -*-
|
// Profiling deque implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
// Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -79,7 +79,12 @@ namespace __profile
|
||||||
: _Base(__n, __value, __a) { }
|
: _Base(__n, __value, __a) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
deque(_InputIterator __first, _InputIterator __last,
|
deque(_InputIterator __first, _InputIterator __last,
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__first, __last, __a)
|
: _Base(__first, __last, __a)
|
||||||
|
@ -129,7 +134,12 @@ namespace __profile
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
assign(_InputIterator __first, _InputIterator __last)
|
assign(_InputIterator __first, _InputIterator __last)
|
||||||
{
|
{
|
||||||
|
@ -343,7 +353,12 @@ namespace __profile
|
||||||
_Base::insert(__position, __n, __x);
|
_Base::insert(__position, __n, __x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(iterator __position,
|
insert(iterator __position,
|
||||||
_InputIterator __first, _InputIterator __last)
|
_InputIterator __first, _InputIterator __last)
|
||||||
|
|
|
@ -77,7 +77,8 @@ namespace __profile
|
||||||
: _Base(__n, __value, __al)
|
: _Base(__n, __value, __al)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
forward_list(_InputIterator __first, _InputIterator __last,
|
forward_list(_InputIterator __first, _InputIterator __last,
|
||||||
const _Alloc& __al = _Alloc())
|
const _Alloc& __al = _Alloc())
|
||||||
: _Base(__first, __last, __al)
|
: _Base(__first, __last, __al)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Profiling list implementation -*- C++ -*-
|
// Profiling list implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
// Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -99,7 +99,12 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<class _InputIterator>
|
template<class _InputIterator>
|
||||||
|
#endif
|
||||||
list(_InputIterator __first, _InputIterator __last,
|
list(_InputIterator __first, _InputIterator __last,
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__first, __last, __a)
|
: _Base(__first, __last, __a)
|
||||||
|
@ -171,7 +176,12 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
|
||||||
{ _Base::assign(__l); }
|
{ _Base::assign(__l); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<class _InputIterator>
|
template<class _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
assign(_InputIterator __first, _InputIterator __last)
|
assign(_InputIterator __first, _InputIterator __last)
|
||||||
{ _Base::assign(__first, __last); }
|
{ _Base::assign(__first, __last); }
|
||||||
|
@ -328,7 +338,8 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
|
||||||
emplace(iterator __position, _Args&&... __args)
|
emplace(iterator __position, _Args&&... __args)
|
||||||
{
|
{
|
||||||
return iterator(_Base::emplace(__position.base(),
|
return iterator(_Base::emplace(__position.base(),
|
||||||
std::forward<_Args>(__args)...));
|
std::forward<_Args>(__args)...),
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -363,14 +374,19 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
|
||||||
_Base::insert(__position.base(), __n, __x);
|
_Base::insert(__position.base(), __n, __x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<class _InputIterator>
|
template<class _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(iterator __position, _InputIterator __first,
|
insert(iterator __position, _InputIterator __first,
|
||||||
_InputIterator __last)
|
_InputIterator __last)
|
||||||
{
|
{
|
||||||
_M_profile_insert(this, __position, size());
|
_M_profile_insert(this, __position, size());
|
||||||
_Base::insert(__position.base(), __first, __last);
|
_Base::insert(__position.base(), __first, __last);
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator
|
iterator
|
||||||
erase(iterator __position)
|
erase(iterator __position)
|
||||||
|
|
|
@ -69,7 +69,12 @@ namespace __profile
|
||||||
: _Base(__comp, __a)
|
: _Base(__comp, __a)
|
||||||
{ __profcxx_map_to_unordered_map_construct(this); }
|
{ __profcxx_map_to_unordered_map_construct(this); }
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
map(_InputIterator __first, _InputIterator __last,
|
map(_InputIterator __first, _InputIterator __last,
|
||||||
const _Compare& __comp = _Compare(),
|
const _Compare& __comp = _Compare(),
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
|
@ -252,7 +257,7 @@ namespace __profile
|
||||||
emplace_hint(const_iterator __pos, _Args&&... __args)
|
emplace_hint(const_iterator __pos, _Args&&... __args)
|
||||||
{
|
{
|
||||||
size_type size_before = size();
|
size_type size_before = size();
|
||||||
auto __res = _Base::emplace_hint(__pos.base(),
|
auto __res = _Base::emplace_hint(__pos,
|
||||||
std::forward<_Args>(__args)...);
|
std::forward<_Args>(__args)...);
|
||||||
__profcxx_map_to_unordered_map_insert(this, size_before,
|
__profcxx_map_to_unordered_map_insert(this, size_before,
|
||||||
size() - size_before);
|
size() - size_before);
|
||||||
|
@ -326,7 +331,12 @@ namespace __profile
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(_InputIterator __first, _InputIterator __last)
|
insert(_InputIterator __first, _InputIterator __last)
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,7 +68,12 @@ namespace __profile
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__comp, __a) { }
|
: _Base(__comp, __a) { }
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
multimap(_InputIterator __first, _InputIterator __last,
|
multimap(_InputIterator __first, _InputIterator __last,
|
||||||
const _Compare& __comp = _Compare(),
|
const _Compare& __comp = _Compare(),
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
|
@ -234,7 +239,12 @@ namespace __profile
|
||||||
std::forward<_Pair>(__x))); }
|
std::forward<_Pair>(__x))); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(_InputIterator __first, _InputIterator __last)
|
insert(_InputIterator __first, _InputIterator __last)
|
||||||
{ _Base::insert(__first, __last); }
|
{ _Base::insert(__first, __last); }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Profiling multiset implementation -*- C++ -*-
|
// Profiling multiset implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
// Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -68,7 +68,12 @@ namespace __profile
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__comp, __a) { }
|
: _Base(__comp, __a) { }
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
multiset(_InputIterator __first, _InputIterator __last,
|
multiset(_InputIterator __first, _InputIterator __last,
|
||||||
const _Compare& __comp = _Compare(),
|
const _Compare& __comp = _Compare(),
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
|
@ -215,7 +220,12 @@ namespace __profile
|
||||||
{ return iterator(_Base::insert(__position, std::move(__x))); }
|
{ return iterator(_Base::insert(__position, std::move(__x))); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(_InputIterator __first, _InputIterator __last)
|
insert(_InputIterator __first, _InputIterator __last)
|
||||||
{ _Base::insert(__first, __last); }
|
{ _Base::insert(__first, __last); }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Profiling set implementation -*- C++ -*-
|
// Profiling set implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
// Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -68,7 +68,12 @@ namespace __profile
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__comp, __a) { }
|
: _Base(__comp, __a) { }
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
template<typename _InputIterator>
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
set(_InputIterator __first, _InputIterator __last,
|
set(_InputIterator __first, _InputIterator __last,
|
||||||
const _Compare& __comp = _Compare(),
|
const _Compare& __comp = _Compare(),
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
|
@ -230,7 +235,12 @@ namespace __profile
|
||||||
{ return iterator(_Base::insert(__position, std::move(__x))); }
|
{ return iterator(_Base::insert(__position, std::move(__x))); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(_InputIterator __first, _InputIterator __last)
|
insert(_InputIterator __first, _InputIterator __last)
|
||||||
{ _Base::insert(__first, __last); }
|
{ _Base::insert(__first, __last); }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Profiling vector implementation -*- C++ -*-
|
// Profiling vector implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
// Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -109,7 +109,12 @@ namespace __profile
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
vector(_InputIterator __first, _InputIterator __last,
|
vector(_InputIterator __first, _InputIterator __last,
|
||||||
const _Allocator& __a = _Allocator())
|
const _Allocator& __a = _Allocator())
|
||||||
: _Base(__first, __last, __a)
|
: _Base(__first, __last, __a)
|
||||||
|
@ -401,7 +406,12 @@ namespace __profile
|
||||||
_M_profile_resize(this, __old_size, this->capacity());
|
_M_profile_resize(this, __old_size, this->capacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class _InputIterator>
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
template<typename _InputIterator,
|
||||||
|
typename = std::_RequireInputIter<_InputIterator>>
|
||||||
|
#else
|
||||||
|
template<typename _InputIterator>
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
insert(iterator __position,
|
insert(iterator __position,
|
||||||
_InputIterator __first, _InputIterator __last)
|
_InputIterator __first, _InputIterator __last)
|
||||||
|
|
Loading…
Reference in New Issue