From: Paolo Carlini Date: Fri, 18 Jul 2008 20:11:21 +0000 (+0000) Subject: vector (insert(iterator, _Tp&&), [...]): Enable only when _Tp != bool. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77f376d9c73d2be61e6a8bed48d7445db08d6c3f;p=gcc.git vector (insert(iterator, _Tp&&), [...]): Enable only when _Tp != bool. 2008-07-16 Paolo Carlini * 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 --- diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index 12bd52f0b2b..f0c63a6ad76 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -300,9 +300,11 @@ namespace __debug } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - void - push_back(_Tp&& __x) - { emplace_back(std::move(__x)); } + template + typename __gnu_cxx::__enable_if::__value, + void>::__type + push_back(_Tp&& __x) + { emplace_back(std::move(__x)); } template void @@ -360,9 +362,11 @@ namespace __debug } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - iterator - insert(iterator __position, _Tp&& __x) - { return emplace(__position, std::move(__x)); } + template + typename __gnu_cxx::__enable_if::__value, + iterator>::__type + insert(iterator __position, _Tp&& __x) + { return emplace(__position, std::move(__x)); } #endif void diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/1.cc b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc index 571a2936ed2..4032ca82e32 100644 --- a/libstdc++-v3/testsuite/25_algorithms/heap/1.cc +++ b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc @@ -89,8 +89,10 @@ test02() Gt gt; +#ifndef _GLIBCXX_DEBUG //const int logN = static_cast(std::log(static_cast(N)) + 0.5); const int logN = 3; +#endif int s1[N]; std::copy(A, A + N, s1);