aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/libstdc++-v3/include')
-rw-r--r--gcc-4.8/libstdc++-v3/include/bits/atomic_base.h4
-rw-r--r--gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h6
-rw-r--r--gcc-4.8/libstdc++-v3/include/bits/stl_vector.h3
-rw-r--r--gcc-4.8/libstdc++-v3/include/c_global/cstdio1
-rw-r--r--gcc-4.8/libstdc++-v3/include/debug/functions.h120
-rw-r--r--gcc-4.8/libstdc++-v3/include/debug/macros.h20
-rw-r--r--gcc-4.8/libstdc++-v3/include/debug/safe_unordered_base.h12
-rw-r--r--gcc-4.8/libstdc++-v3/include/std/functional11
-rw-r--r--gcc-4.8/libstdc++-v3/include/std/future19
-rw-r--r--gcc-4.8/libstdc++-v3/include/std/iostream6
-rw-r--r--gcc-4.8/libstdc++-v3/include/std/tuple4
11 files changed, 67 insertions, 139 deletions
diff --git a/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h b/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h
index 609fe8b06..db4d200ae 100644
--- a/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h
+++ b/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h
@@ -764,11 +764,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool
is_lock_free() const noexcept
- { return __atomic_is_lock_free(_M_type_size(1), nullptr); }
+ { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); }
bool
is_lock_free() const volatile noexcept
- { return __atomic_is_lock_free(_M_type_size(1), nullptr); }
+ { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); }
void
store(__pointer_type __p,
diff --git a/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h b/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h
index 5b0be418b..e661b6501 100644
--- a/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_add_ref_lock()
{
// Perform lock-free add-if-not-zero operation.
- _Atomic_word __count = _M_use_count;
+ _Atomic_word __count = _M_get_use_count();
do
{
if (__count == 0)
@@ -391,7 +391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
template<typename... _Args>
_Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
- : _M_impl(__a), _M_storage()
+ : _M_impl(__a)
{
_M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage));
// _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -819,7 +819,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__r.get()), _M_refcount()
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- auto __tmp = std::__addressof(*__r.get());
+ auto __tmp = __r.get();
_M_refcount = __shared_count<_Lp>(std::move(__r));
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
}
diff --git a/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h b/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h
index 69c6e278c..14de46112 100644
--- a/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h
+++ b/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h
@@ -1361,7 +1361,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
void
_M_move_assign(vector&& __x, std::true_type) noexcept
{
- const vector __tmp(std::move(*this));
+ vector __tmp(get_allocator());
+ this->_M_impl._M_swap_data(__tmp._M_impl);
this->_M_impl._M_swap_data(__x._M_impl);
if (_Alloc_traits::_S_propagate_on_move_assign())
std::__alloc_on_move(_M_get_Tp_allocator(),
diff --git a/gcc-4.8/libstdc++-v3/include/c_global/cstdio b/gcc-4.8/libstdc++-v3/include/c_global/cstdio
index fcbec0cf5..e81e4b1d8 100644
--- a/gcc-4.8/libstdc++-v3/include/c_global/cstdio
+++ b/gcc-4.8/libstdc++-v3/include/c_global/cstdio
@@ -69,6 +69,7 @@ extern "C" char* gets (char* __s) __attribute__((deprecated));
#undef ftell
#undef fwrite
#undef getc
+#undef getchar
#undef gets
#undef perror
#undef printf
diff --git a/gcc-4.8/libstdc++-v3/include/debug/functions.h b/gcc-4.8/libstdc++-v3/include/debug/functions.h
index 3f1609818..113c996a6 100644
--- a/gcc-4.8/libstdc++-v3/include/debug/functions.h
+++ b/gcc-4.8/libstdc++-v3/include/debug/functions.h
@@ -345,11 +345,13 @@ namespace __gnu_debug
return __check_sorted_set_aux(__first, __last, __pred, _SameType());
}
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 270. Binary search requirements overly strict
+ // Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp>
inline bool
- __check_partitioned_lower_aux(_ForwardIterator __first,
- _ForwardIterator __last, const _Tp& __value,
- std::forward_iterator_tag)
+ __check_partitioned_lower(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value)
{
while (__first != __last && *__first < __value)
++__first;
@@ -362,38 +364,11 @@ namespace __gnu_debug
return __first == __last;
}
- // For performance reason, as the iterator range has been validated, check on
- // random access safe iterators is done using the base iterator.
- template<typename _Iterator, typename _Sequence, typename _Tp>
- inline bool
- __check_partitioned_lower_aux(
- const _Safe_iterator<_Iterator, _Sequence>& __first,
- const _Safe_iterator<_Iterator, _Sequence>& __last,
- const _Tp& __value,
- std::random_access_iterator_tag __tag)
- {
- return __check_partitioned_lower_aux(__first.base(), __last.base(),
- __value, __tag);
- }
-
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 270. Binary search requirements overly strict
- // Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp>
inline bool
- __check_partitioned_lower(_ForwardIterator __first,
+ __check_partitioned_upper(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value)
{
- return __check_partitioned_lower_aux(__first, __last, __value,
- std::__iterator_category(__first));
- }
-
- template<typename _ForwardIterator, typename _Tp>
- inline bool
- __check_partitioned_upper_aux(_ForwardIterator __first,
- _ForwardIterator __last, const _Tp& __value,
- std::forward_iterator_tag)
- {
while (__first != __last && !(__value < *__first))
++__first;
if (__first != __last)
@@ -405,35 +380,12 @@ namespace __gnu_debug
return __first == __last;
}
- // For performance reason, as the iterator range has been validated, check on
- // random access safe iterators is done using the base iterator.
- template<typename _Iterator, typename _Sequence, typename _Tp>
- inline bool
- __check_partitioned_upper_aux(
- const _Safe_iterator<_Iterator, _Sequence>& __first,
- const _Safe_iterator<_Iterator, _Sequence>& __last,
- const _Tp& __value,
- std::random_access_iterator_tag __tag)
- {
- return __check_partitioned_upper_aux(__first.base(), __last.base(),
- __value, __tag);
- }
-
- template<typename _ForwardIterator, typename _Tp>
- inline bool
- __check_partitioned_upper(_ForwardIterator __first,
- _ForwardIterator __last, const _Tp& __value)
- {
- return __check_partitioned_upper_aux(__first, __last, __value,
- std::__iterator_category(__first));
- }
-
+ // Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
- __check_partitioned_lower_aux(_ForwardIterator __first,
+ __check_partitioned_lower(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value,
- _Pred __pred,
- std::forward_iterator_tag)
+ _Pred __pred)
{
while (__first != __last && bool(__pred(*__first, __value)))
++__first;
@@ -446,39 +398,12 @@ namespace __gnu_debug
return __first == __last;
}
- // For performance reason, as the iterator range has been validated, check on
- // random access safe iterators is done using the base iterator.
- template<typename _Iterator, typename _Sequence,
- typename _Tp, typename _Pred>
- inline bool
- __check_partitioned_lower_aux(
- const _Safe_iterator<_Iterator, _Sequence>& __first,
- const _Safe_iterator<_Iterator, _Sequence>& __last,
- const _Tp& __value, _Pred __pred,
- std::random_access_iterator_tag __tag)
- {
- return __check_partitioned_lower_aux(__first.base(), __last.base(),
- __value, __pred, __tag);
- }
-
- // Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
- __check_partitioned_lower(_ForwardIterator __first,
+ __check_partitioned_upper(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value,
_Pred __pred)
{
- return __check_partitioned_lower_aux(__first, __last, __value, __pred,
- std::__iterator_category(__first));
- }
-
- template<typename _ForwardIterator, typename _Tp, typename _Pred>
- inline bool
- __check_partitioned_upper_aux(_ForwardIterator __first,
- _ForwardIterator __last, const _Tp& __value,
- _Pred __pred,
- std::forward_iterator_tag)
- {
while (__first != __last && !bool(__pred(__value, *__first)))
++__first;
if (__first != __last)
@@ -490,31 +415,6 @@ namespace __gnu_debug
return __first == __last;
}
- // For performance reason, as the iterator range has been validated, check on
- // random access safe iterators is done using the base iterator.
- template<typename _Iterator, typename _Sequence,
- typename _Tp, typename _Pred>
- inline bool
- __check_partitioned_upper_aux(
- const _Safe_iterator<_Iterator, _Sequence>& __first,
- const _Safe_iterator<_Iterator, _Sequence>& __last,
- const _Tp& __value, _Pred __pred,
- std::random_access_iterator_tag __tag)
- {
- return __check_partitioned_upper_aux(__first.base(), __last.base(),
- __value, __pred, __tag);
- }
-
- template<typename _ForwardIterator, typename _Tp, typename _Pred>
- inline bool
- __check_partitioned_upper(_ForwardIterator __first,
- _ForwardIterator __last, const _Tp& __value,
- _Pred __pred)
- {
- return __check_partitioned_upper_aux(__first, __last, __value, __pred,
- std::__iterator_category(__first));
- }
-
// Helper struct to detect random access safe iterators.
template<typename _Iterator>
struct __is_safe_random_iterator
diff --git a/gcc-4.8/libstdc++-v3/include/debug/macros.h b/gcc-4.8/libstdc++-v3/include/debug/macros.h
index 26732c9e3..31bcaf361 100644
--- a/gcc-4.8/libstdc++-v3/include/debug/macros.h
+++ b/gcc-4.8/libstdc++-v3/include/debug/macros.h
@@ -261,8 +261,9 @@ _GLIBCXX_DEBUG_VERIFY( \
w.r.t. the value _Value. */
#define __glibcxx_check_partitioned_lower(_First,_Last,_Value) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
- _Value), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower( \
+ __gnu_debug::__base(_First), \
+ __gnu_debug::__base(_Last), _Value), \
_M_message(__gnu_debug::__msg_unpartitioned) \
._M_iterator(_First, #_First) \
._M_iterator(_Last, #_Last) \
@@ -270,8 +271,9 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
#define __glibcxx_check_partitioned_upper(_First,_Last,_Value) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
- _Value), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper( \
+ __gnu_debug::__base(_First), \
+ __gnu_debug::__base(_Last), _Value), \
_M_message(__gnu_debug::__msg_unpartitioned) \
._M_iterator(_First, #_First) \
._M_iterator(_Last, #_Last) \
@@ -281,8 +283,9 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
w.r.t. the value _Value and predicate _Pred. */
#define __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
- _Value, _Pred), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower( \
+ __gnu_debug::__base(_First), \
+ __gnu_debug::__base(_Last), _Value, _Pred), \
_M_message(__gnu_debug::__msg_unpartitioned_pred) \
._M_iterator(_First, #_First) \
._M_iterator(_Last, #_Last) \
@@ -293,8 +296,9 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
w.r.t. the value _Value and predicate _Pred. */
#define __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
- _Value, _Pred), \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper( \
+ __gnu_debug::__base(_First), \
+ __gnu_debug::__base(_Last), _Value, _Pred), \
_M_message(__gnu_debug::__msg_unpartitioned_pred) \
._M_iterator(_First, #_First) \
._M_iterator(_Last, #_Last) \
diff --git a/gcc-4.8/libstdc++-v3/include/debug/safe_unordered_base.h b/gcc-4.8/libstdc++-v3/include/debug/safe_unordered_base.h
index 23026cb43..35ce08b1f 100644
--- a/gcc-4.8/libstdc++-v3/include/debug/safe_unordered_base.h
+++ b/gcc-4.8/libstdc++-v3/include/debug/safe_unordered_base.h
@@ -133,9 +133,19 @@ namespace __gnu_debug
protected:
// Initialize with a version number of 1 and no iterators
_Safe_unordered_container_base()
- : _M_local_iterators(0), _M_const_local_iterators(0)
+ : _M_local_iterators(nullptr), _M_const_local_iterators(nullptr)
{ }
+ // Initialize with a version number of 1 and no iterators
+ _Safe_unordered_container_base(const _Safe_unordered_container_base&)
+ noexcept
+ : _Safe_unordered_container_base() { }
+
+ _Safe_unordered_container_base(_Safe_unordered_container_base&& __x)
+ noexcept
+ : _Safe_unordered_container_base()
+ { this->_M_swap(__x); }
+
/** Notify all iterators that reference this container that the
container is being destroyed. */
~_Safe_unordered_container_base()
diff --git a/gcc-4.8/libstdc++-v3/include/std/functional b/gcc-4.8/libstdc++-v3/include/std/functional
index 64b6dae04..b31a33b0b 100644
--- a/gcc-4.8/libstdc++-v3/include/std/functional
+++ b/gcc-4.8/libstdc++-v3/include/std/functional
@@ -2181,8 +2181,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;
@@ -2323,7 +2330,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.8/libstdc++-v3/include/std/future b/gcc-4.8/libstdc++-v3/include/std/future
index 30100fe05..3b15fd8bc 100644
--- a/gcc-4.8/libstdc++-v3/include/std/future
+++ b/gcc-4.8/libstdc++-v3/include/std/future
@@ -1261,8 +1261,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final
: __future_base::_Task_state_base<_Res(_Args...)>
{
- _Task_state(_Fn&& __fn, const _Alloc& __a)
- : _Task_state_base<_Res(_Args...)>(__a), _M_impl(std::move(__fn), __a)
+ template<typename _Fn2>
+ _Task_state(_Fn2&& __fn, const _Alloc& __a)
+ : _Task_state_base<_Res(_Args...)>(__a),
+ _M_impl(std::forward<_Fn2>(__fn), __a)
{ }
private:
@@ -1292,8 +1294,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Impl : _Alloc
{
- _Impl(_Fn&& __fn, const _Alloc& __a)
- : _Alloc(__a), _M_fn(std::move(__fn)) { }
+ template<typename _Fn2>
+ _Impl(_Fn2&& __fn, const _Alloc& __a)
+ : _Alloc(__a), _M_fn(std::forward<_Fn2>(__fn)) { }
_Fn _M_fn;
} _M_impl;
};
@@ -1302,8 +1305,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static shared_ptr<__future_base::_Task_state_base<_Signature>>
__create_task_state(_Fn&& __fn, const _Alloc& __a)
{
- typedef __future_base::_Task_state<_Fn, _Alloc, _Signature> _State;
- return std::allocate_shared<_State>(__a, std::move(__fn), __a);
+ typedef typename decay<_Fn>::type _Fn2;
+ typedef __future_base::_Task_state<_Fn2, _Alloc, _Signature> _State;
+ return std::allocate_shared<_State>(__a, std::forward<_Fn>(__fn), __a);
}
template<typename _Fn, typename _Alloc, typename _Res, typename... _Args>
@@ -1344,7 +1348,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__constrain_pkgdtask<packaged_task, _Fn>::__type>
explicit
packaged_task(_Fn&& __fn)
- : packaged_task(allocator_arg, std::allocator<int>(), std::move(__fn))
+ : packaged_task(allocator_arg, std::allocator<int>(),
+ std::forward<_Fn>(__fn))
{ }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
diff --git a/gcc-4.8/libstdc++-v3/include/std/iostream b/gcc-4.8/libstdc++-v3/include/std/iostream
index 7864749a7..0c3019e07 100644
--- a/gcc-4.8/libstdc++-v3/include/std/iostream
+++ b/gcc-4.8/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.8/libstdc++-v3/include/std/tuple b/gcc-4.8/libstdc++-v3/include/std/tuple
index ee2b2e1d4..9ab30e514 100644
--- a/gcc-4.8/libstdc++-v3/include/std/tuple
+++ b/gcc-4.8/libstdc++-v3/include/std/tuple
@@ -755,14 +755,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<