aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2008-07-18 20:11:21 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-07-18 20:11:21 +0000
commit77f376d9c73d2be61e6a8bed48d7445db08d6c3f (patch)
tree233c3d1c66e8366676fddcf9353a7b303ec9de65 /libstdc++-v3
parent0d3f1ce4e90900e0aa697975a59a0c68364fef70 (diff)
downloadgcc-77f376d9c73d2be61e6a8bed48d7445db08d6c3f.zip
gcc-77f376d9c73d2be61e6a8bed48d7445db08d6c3f.tar.gz
gcc-77f376d9c73d2be61e6a8bed48d7445db08d6c3f.tar.bz2
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/debug/vector16
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/1.cc2
2 files changed, 12 insertions, 6 deletions
diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector
index 12bd52f..f0c63a6 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 _Up = _Tp>
+ typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
+ void>::__type
+ push_back(_Tp&& __x)
+ { emplace_back(std::move(__x)); }
template<typename... _Args>
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 _Up = _Tp>
+ typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__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 571a293..4032ca8 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<int>(std::log(static_cast<double>(N)) + 0.5);
const int logN = 3;
+#endif
int s1[N];
std::copy(A, A + N, s1);