aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/allocator.h18
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h2
-rw-r--r--libstdc++-v3/include/bits/unordered_map.h16
3 files changed, 29 insertions, 7 deletions
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index 0989ad8..5ccb491 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -1,7 +1,6 @@
// Allocators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-// 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2001-2012 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
@@ -46,6 +45,9 @@
// Define the base class to std::allocator.
#include <bits/c++allocator.h>
+#if __cplusplus >= 201103L
+#include <type_traits>
+#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -77,6 +79,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
+
+#if __cplusplus >= 201103L
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2103. std::allocator propagate_on_container_move_assignment
+ typedef true_type propagate_on_container_move_assignment;
+#endif
};
/**
@@ -103,6 +111,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct rebind
{ typedef allocator<_Tp1> other; };
+#if __cplusplus >= 201103L
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2103. std::allocator propagate_on_container_move_assignment
+ typedef true_type propagate_on_container_move_assignment;
+#endif
+
allocator() throw() { }
allocator(const allocator& __a) throw()
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index bd513b3..77c75b4 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -1486,7 +1486,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* range @p [__result,__result+(__last-__first)) such that the
* order of the elements is reversed. For every @c i such that @p
* 0<=i<=(__last-__first), @p reverse_copy() performs the
- * assignment @p *(__result+(__last-__first)-i) = *(__first+i).
+ * assignment @p *(__result+(__last-__first)-1-i) = *(__first+i).
* The ranges @p [__first,__last) and @p
* [__result,__result+(__last-__first)) must not overlap.
*/
diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h
index 973467e..e2b83db 100644
--- a/libstdc++-v3/include/bits/unordered_map.h
+++ b/libstdc++-v3/include/bits/unordered_map.h
@@ -362,7 +362,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const value_type& __x)
{ return _M_h.insert(__x); }
- template<typename _Pair>
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_constructible<value_type,
+ _Pair&&>::value>::type>
std::pair<iterator, bool>
insert(_Pair&& __x)
{ return _M_h.insert(std::move(__x)); }
@@ -394,7 +396,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const_iterator __hint, const value_type& __x)
{ return _M_h.insert(__hint, __x); }
- template<typename _Pair>
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_constructible<value_type,
+ _Pair&&>::value>::type>
iterator
insert(const_iterator __hint, _Pair&& __x)
{ return _M_h.insert(__hint, std::move(__x)); }
@@ -1023,7 +1027,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const value_type& __x)
{ return _M_h.insert(__x); }
- template<typename _Pair>
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_constructible<value_type,
+ _Pair&&>::value>::type>
iterator
insert(_Pair&& __x)
{ return _M_h.insert(std::move(__x)); }
@@ -1053,7 +1059,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const_iterator __hint, const value_type& __x)
{ return _M_h.insert(__hint, __x); }
- template<typename _Pair>
+ template<typename _Pair, typename = typename
+ std::enable_if<std::is_constructible<value_type,
+ _Pair&&>::value>::type>
iterator
insert(const_iterator __hint, _Pair&& __x)
{ return _M_h.insert(__hint, std::move(__x)); }