aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libstdc++-v3/include')
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/shared_ptr_base.h2
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/stl_iterator.h15
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/stl_tree.h1
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/stl_vector.h14
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/vector.tcc9
-rw-r--r--gcc-4.9/libstdc++-v3/include/debug/vector2
-rw-r--r--gcc-4.9/libstdc++-v3/include/experimental/optional4
-rw-r--r--gcc-4.9/libstdc++-v3/include/std/functional11
-rw-r--r--gcc-4.9/libstdc++-v3/include/std/iostream6
-rw-r--r--gcc-4.9/libstdc++-v3/include/std/tuple15
10 files changed, 43 insertions, 36 deletions
diff --git a/gcc-4.9/libstdc++-v3/include/bits/shared_ptr_base.h b/gcc-4.9/libstdc++-v3/include/bits/shared_ptr_base.h
index 536df017d..026c5979f 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/gcc-4.9/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -871,7 +871,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__p), _M_refcount(__p)
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- static_assert( !is_void<_Tp>::value, "incomplete type" );
+ static_assert( !is_void<_Tp1>::value, "incomplete type" );
static_assert( sizeof(_Tp1) > 0, "incomplete type" );
__enable_shared_from_this_helper(_M_refcount, __p, __p);
}
diff --git a/gcc-4.9/libstdc++-v3/include/bits/stl_iterator.h b/gcc-4.9/libstdc++-v3/include/bits/stl_iterator.h
index 1d2a52419..aa3581e33 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/stl_iterator.h
+++ b/gcc-4.9/libstdc++-v3/include/bits/stl_iterator.h
@@ -736,21 +736,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Container>::__type>& __i) _GLIBCXX_NOEXCEPT
: _M_current(__i.base()) { }
-#if __cplusplus >= 201103L
- __normal_iterator<typename _Container::pointer, _Container>
- _M_const_cast() const noexcept
- {
- using _PTraits = std::pointer_traits<typename _Container::pointer>;
- return __normal_iterator<typename _Container::pointer, _Container>
- (_PTraits::pointer_to(const_cast<typename _PTraits::element_type&>
- (*_M_current)));
- }
-#else
- __normal_iterator
- _M_const_cast() const
- { return *this; }
-#endif
-
// Forward iterator requirements
reference
operator*() const _GLIBCXX_NOEXCEPT
diff --git a/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h b/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
index 4bc3c602c..cac917ea3 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
+++ b/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
@@ -1073,6 +1073,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
_M_move_assign(_Rb_tree& __x)
{
+ _M_impl._M_key_compare = __x._M_impl._M_key_compare;
if (_Alloc_traits::_S_propagate_on_move_assign()
|| _Alloc_traits::_S_always_equal()
|| _M_get_Node_allocator() == __x._M_get_Node_allocator())
diff --git a/gcc-4.9/libstdc++-v3/include/bits/stl_vector.h b/gcc-4.9/libstdc++-v3/include/bits/stl_vector.h
index 7e52fde55..c33e2c6ae 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/stl_vector.h
+++ b/gcc-4.9/libstdc++-v3/include/bits/stl_vector.h
@@ -1051,7 +1051,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const_iterator __position, size_type __n, const value_type& __x)
{
difference_type __offset = __position - cbegin();
- _M_fill_insert(__position._M_const_cast(), __n, __x);
+ _M_fill_insert(begin() + __offset, __n, __x);
return begin() + __offset;
}
#else
@@ -1096,7 +1096,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_InputIterator __last)
{
difference_type __offset = __position - cbegin();
- _M_insert_dispatch(__position._M_const_cast(),
+ _M_insert_dispatch(begin() + __offset,
__first, __last, __false_type());
return begin() + __offset;
}
@@ -1144,10 +1144,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
iterator
#if __cplusplus >= 201103L
erase(const_iterator __position)
+ { return _M_erase(begin() + (__position - cbegin())); }
#else
erase(iterator __position)
+ { return _M_erase(__position); }
#endif
- { return _M_erase(__position._M_const_cast()); }
/**
* @brief Remove a range of elements.
@@ -1170,10 +1171,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
iterator
#if __cplusplus >= 201103L
erase(const_iterator __first, const_iterator __last)
+ {
+ const auto __beg = begin();
+ const auto __cbeg = cbegin();
+ return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
+ }
#else
erase(iterator __first, iterator __last)
+ { return _M_erase(__first, __last); }
#endif
- { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); }
/**
* @brief Swaps data with another %vector.
diff --git a/gcc-4.9/libstdc++-v3/include/bits/vector.tcc b/gcc-4.9/libstdc++-v3/include/bits/vector.tcc
index 1eff51447..c937b3887 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/vector.tcc
+++ b/gcc-4.9/libstdc++-v3/include/bits/vector.tcc
@@ -121,14 +121,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
else
{
#if __cplusplus >= 201103L
+ const auto __pos = begin() + (__position - cbegin());
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
_Tp __x_copy = __x;
- _M_insert_aux(__position._M_const_cast(), std::move(__x_copy));
+ _M_insert_aux(__pos, std::move(__x_copy));
}
else
+ _M_insert_aux(__pos, __x);
+#else
+ _M_insert_aux(__position, __x);
#endif
- _M_insert_aux(__position._M_const_cast(), __x);
}
return iterator(this->_M_impl._M_start + __n);
}
@@ -307,7 +310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
++this->_M_impl._M_finish;
}
else
- _M_insert_aux(__position._M_const_cast(),
+ _M_insert_aux(begin() + (__position - cbegin()),
std::forward<_Args>(__args)...);
return iterator(this->_M_impl._M_start + __n);
}
diff --git a/gcc-4.9/libstdc++-v3/include/debug/vector b/gcc-4.9/libstdc++-v3/include/debug/vector
index 2e9cd656b..f7f54eeda 100644
--- a/gcc-4.9/libstdc++-v3/include/debug/vector
+++ b/gcc-4.9/libstdc++-v3/include/debug/vector
@@ -602,7 +602,7 @@ namespace __debug
}
else
#if __cplusplus >= 201103L
- return iterator(__first.base()._M_const_cast(), this);
+ return begin() + (__first.base() - cbegin().base());
#else
return __first;
#endif
diff --git a/gcc-4.9/libstdc++-v3/include/experimental/optional b/gcc-4.9/libstdc++-v3/include/experimental/optional
index 5f2d93fb7..2a3f29dcd 100644
--- a/gcc-4.9/libstdc++-v3/include/experimental/optional
+++ b/gcc-4.9/libstdc++-v3/include/experimental/optional
@@ -736,12 +736,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
constexpr bool
operator!=(const optional<_Tp>& __lhs, _Tp const& __rhs)
- { return !__lhs || *__lhs != __rhs; }
+ { return !__lhs || !(*__lhs == __rhs); }
template<typename _Tp>
constexpr bool
operator!=(const _Tp& __lhs, const optional<_Tp>& __rhs)
- { return !__rhs || __lhs != *__rhs; }
+ { return !__rhs || !(__lhs == *__rhs); }
template<typename _Tp>
constexpr bool
diff --git a/gcc-4.9/libstdc++-v3/include/std/functional b/gcc-4.9/libstdc++-v3/include/std/functional
index 5a987d914..0e80fa37c 100644
--- a/gcc-4.9/libstdc++-v3/include/std/functional
+++ b/gcc-4.9/libstdc++-v3/include/std/functional
@@ -2149,8 +2149,15 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
(std::declval<_ArgTypes>()...) );
+ // Used so the return type convertibility checks aren't done when
+ // performing overload resolution for copy construction/assignment.
+ template<typename _Tp>
+ using _NotSelf = __not_<is_same<_Tp, function>>;
+
template<typename _Functor>
- using _Callable = __check_func_return_type<_Invoke<_Functor>, _Res>;
+ using _Callable
+ = __and_<_NotSelf<_Functor>,
+ __check_func_return_type<_Invoke<_Functor>, _Res>>;
template<typename _Cond, typename _Tp>
using _Requires = typename enable_if<_Cond::value, _Tp>::type;
@@ -2291,7 +2298,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
* reference_wrapper<F>, this function will not throw.
*/
template<typename _Functor>
- _Requires<_Callable<_Functor>, function&>
+ _Requires<_Callable<typename decay<_Functor>::type>, function&>
operator=(_Functor&& __f)
{
function(std::forward<_Functor>(__f)).swap(*this);
diff --git a/gcc-4.9/libstdc++-v3/include/std/iostream b/gcc-4.9/libstdc++-v3/include/std/iostream
index 85d2b959f..5c1086909 100644
--- a/gcc-4.9/libstdc++-v3/include/std/iostream
+++ b/gcc-4.9/libstdc++-v3/include/std/iostream
@@ -48,13 +48,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*
* The &lt;iostream&gt; header declares the eight <em>standard stream
* objects</em>. For other declarations, see
- * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html
* and the @link iosfwd I/O forward declarations @endlink
*
* They are required by default to cooperate with the global C
* library's @c FILE streams, and to be available during program
- * startup and termination. For more information, see the HOWTO
- * linked to above.
+ * startup and termination. For more information, see the section of the
+ * manual linked to above.
*/
//@{
extern istream cin; /// Linked to standard input
diff --git a/gcc-4.9/libstdc++-v3/include/std/tuple b/gcc-4.9/libstdc++-v3/include/std/tuple
index 92ecdb9bc..03d87d77a 100644
--- a/gcc-4.9/libstdc++-v3/include/std/tuple
+++ b/gcc-4.9/libstdc++-v3/include/std/tuple
@@ -710,6 +710,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
add_cv<typename tuple_element<__i, _Tp>::type>::type type;
};
+#if __cplusplus > 201103L
+ template<std::size_t __i, typename _Tp>
+ using tuple_element_t = typename tuple_element<__i, _Tp>::type;
+#endif
+
/// Finds the size of a given tuple type.
template<typename _Tp>
struct tuple_size;
@@ -755,14 +760,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typename tuple_element<__i, tuple<_Elements...>>::type
>::type
get(tuple<_Elements...>& __t) noexcept
- { return __get_helper<__i>(__t); }
+ { return std::__get_helper<__i>(__t); }
template<std::size_t __i, typename... _Elements>
constexpr typename __add_c_ref<
typename tuple_element<__i, tuple<_Elements...>>::type
>::type
get(const tuple<_Elements...>& __t) noexcept
- { return __get_helper<__i>(__t); }
+ { return std::__get_helper<__i>(__t); }
template<std::size_t __i, typename... _Elements>
constexpr typename __add_r_ref<
@@ -786,17 +791,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename _Tp, typename... _Types>
constexpr _Tp&
get(tuple<_Types...>& __t) noexcept
- { return __get_helper2<_Tp>(__t); }
+ { return std::__get_helper2<_Tp>(__t); }
template <typename _Tp, typename... _Types>
constexpr _Tp&&
get(tuple<_Types...>&& __t) noexcept
- { return std::move(__get_helper2<_Tp>(__t)); }
+ { return std::move(std::__get_helper2<_Tp>(__t)); }
template <typename _Tp, typename... _Types>
constexpr const _Tp&
get(const tuple<_Types...>& __t) noexcept
- { return __get_helper2<_Tp>(__t); }
+ { return std::__get_helper2<_Tp>(__t); }
#endif
// This class helps construct the various comparison operations on tuples