mirror of git://gcc.gnu.org/git/gcc.git
vector (insert(iterator, _Tp&&), [...]): Enable only when _Tp != bool.
2008-07-16 Paolo Carlini <paolo.carlini@oracle.com> * include/debug/vector (insert(iterator, _Tp&&), push_back(_Tp&&)): Enable only when _Tp != bool. * testsuite/25_algorithms/heap/1.cc: Avoid unused variable warnings. From-SVN: r137962
This commit is contained in:
parent
0d3f1ce4e9
commit
77f376d9c7
|
@ -300,9 +300,11 @@ namespace __debug
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
void
|
template<typename _Up = _Tp>
|
||||||
push_back(_Tp&& __x)
|
typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
|
||||||
{ emplace_back(std::move(__x)); }
|
void>::__type
|
||||||
|
push_back(_Tp&& __x)
|
||||||
|
{ emplace_back(std::move(__x)); }
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
|
@ -360,9 +362,11 @@ namespace __debug
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
iterator
|
template<typename _Up = _Tp>
|
||||||
insert(iterator __position, _Tp&& __x)
|
typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
|
||||||
{ return emplace(__position, std::move(__x)); }
|
iterator>::__type
|
||||||
|
insert(iterator __position, _Tp&& __x)
|
||||||
|
{ return emplace(__position, std::move(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -89,8 +89,10 @@ test02()
|
||||||
|
|
||||||
Gt gt;
|
Gt gt;
|
||||||
|
|
||||||
|
#ifndef _GLIBCXX_DEBUG
|
||||||
//const int logN = static_cast<int>(std::log(static_cast<double>(N)) + 0.5);
|
//const int logN = static_cast<int>(std::log(static_cast<double>(N)) + 0.5);
|
||||||
const int logN = 3;
|
const int logN = 3;
|
||||||
|
#endif
|
||||||
|
|
||||||
int s1[N];
|
int s1[N];
|
||||||
std::copy(A, A + N, s1);
|
std::copy(A, A + N, s1);
|
||||||
|
|
Loading…
Reference in New Issue