Commit 33ac58d5 by Jonathan Wakely Committed by Jonathan Wakely

Remove trailing whitespace from libstdc++ headers

	* include/std/array: Remove trailing whitespace.
	* include/std/atomic: Likewise.
	* include/std/bitset: Likewise.
	* include/std/chrono: Likewise.
	* include/std/complex: Likewise.
	* include/std/condition_variable: Likewise.
	* include/std/fstream: Likewise.
	* include/std/functional: Likewise.
	* include/std/future: Likewise.
	* include/std/iomanip: Likewise.
	* include/std/iosfwd: Likewise.
	* include/std/istream: Likewise.
	* include/std/limits: Likewise.
	* include/std/ratio: Likewise.
	* include/std/scoped_allocator: Likewise.
	* include/std/sstream: Likewise.
	* include/std/stdexcept: Likewise.
	* include/std/string: Likewise.
	* include/std/system_error: Likewise.
	* include/std/thread: Likewise.
	* include/std/tuple: Likewise.
	* include/std/type_traits: Likewise.
	* include/std/utility: Likewise.
	* include/std/valarray: Likewise.
	* include/std/vector: Likewise.

From-SVN: r237528
parent 1dc8d15b
2016-06-16 Jonathan Wakely <jwakely@redhat.com>
* include/std/array: Remove trailing whitespace.
* include/std/atomic: Likewise.
* include/std/bitset: Likewise.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/condition_variable: Likewise.
* include/std/fstream: Likewise.
* include/std/functional: Likewise.
* include/std/future: Likewise.
* include/std/iomanip: Likewise.
* include/std/iosfwd: Likewise.
* include/std/istream: Likewise.
* include/std/limits: Likewise.
* include/std/ratio: Likewise.
* include/std/scoped_allocator: Likewise.
* include/std/sstream: Likewise.
* include/std/stdexcept: Likewise.
* include/std/string: Likewise.
* include/std/system_error: Likewise.
* include/std/thread: Likewise.
* include/std/tuple: Likewise.
* include/std/type_traits: Likewise.
* include/std/utility: Likewise.
* include/std/valarray: Likewise.
* include/std/vector: Likewise.
* include/bits/stl_vector.h (vector::_S_insert_aux_assign): Define
new overloaded functions.
* include/bits/vector.tcc (vector::_M_insert_aux): Use new functions
......
......@@ -134,19 +134,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
end() const noexcept
{ return const_iterator(data() + _Nm); }
reverse_iterator
reverse_iterator
rbegin() noexcept
{ return reverse_iterator(end()); }
const_reverse_iterator
const_reverse_iterator
rbegin() const noexcept
{ return const_reverse_iterator(end()); }
reverse_iterator
reverse_iterator
rend() noexcept
{ return reverse_iterator(begin()); }
const_reverse_iterator
const_reverse_iterator
rend() const noexcept
{ return const_reverse_iterator(begin()); }
......@@ -158,22 +158,22 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
cend() const noexcept
{ return const_iterator(data() + _Nm); }
const_reverse_iterator
const_reverse_iterator
crbegin() const noexcept
{ return const_reverse_iterator(end()); }
const_reverse_iterator
const_reverse_iterator
crend() const noexcept
{ return const_reverse_iterator(begin()); }
// Capacity.
constexpr size_type
constexpr size_type
size() const noexcept { return _Nm; }
constexpr size_type
constexpr size_type
max_size() const noexcept { return _Nm; }
constexpr bool
constexpr bool
empty() const noexcept { return size() == 0; }
// Element access.
......@@ -207,22 +207,22 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_AT_Type::_S_ref(_M_elems, 0));
}
reference
reference
front() noexcept
{ return *begin(); }
constexpr const_reference
constexpr const_reference
front() const noexcept
{ return _AT_Type::_S_ref(_M_elems, 0); }
reference
reference
back() noexcept
{ return _Nm ? *(end() - 1) : *end(); }
constexpr const_reference
constexpr const_reference
back() const noexcept
{
return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1)
{
return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1)
: _AT_Type::_S_ref(_M_elems, 0);
}
......@@ -237,7 +237,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// Array comparisons.
template<typename _Tp, std::size_t _Nm>
inline bool
inline bool
operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
{ return std::equal(__one.begin(), __one.end(), __two.begin()); }
......@@ -249,9 +249,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<typename _Tp, std::size_t _Nm>
inline bool
operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
{
{
return std::lexicographical_compare(__a.begin(), __a.end(),
__b.begin(), __b.end());
__b.begin(), __b.end());
}
template<typename _Tp, std::size_t _Nm>
......@@ -312,7 +312,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Tuple interface to class template array.
/// tuple_size
template<typename _Tp>
template<typename _Tp>
class tuple_size;
/// Partial specialization for std::array
......
......@@ -198,11 +198,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return load(); }
_Tp
operator=(_Tp __i) noexcept
operator=(_Tp __i) noexcept
{ store(__i); return __i; }
_Tp
operator=(_Tp __i) volatile noexcept
operator=(_Tp __i) volatile noexcept
{ store(__i); return __i; }
bool
......@@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tp
load(memory_order __m = memory_order_seq_cst) const noexcept
{
{
_Tp tmp;
__atomic_load(std::__addressof(_M_i), std::__addressof(tmp), __m);
return tmp;
......@@ -239,7 +239,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tp
load(memory_order __m = memory_order_seq_cst) const volatile noexcept
{
{
_Tp tmp;
__atomic_load(std::__addressof(_M_i), std::__addressof(tmp), __m);
return tmp;
......@@ -247,7 +247,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tp
exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept
{
{
_Tp tmp;
__atomic_exchange(std::__addressof(_M_i), std::__addressof(__i),
std::__addressof(tmp), __m);
......@@ -255,9 +255,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_Tp
exchange(_Tp __i,
exchange(_Tp __i,
memory_order __m = memory_order_seq_cst) volatile noexcept
{
{
_Tp tmp;
__atomic_exchange(std::__addressof(_M_i), std::__addressof(__i),
std::__addressof(tmp), __m);
......@@ -265,7 +265,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
memory_order __f) noexcept
{
return __atomic_compare_exchange(std::__addressof(_M_i),
......@@ -275,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
memory_order __f) volatile noexcept
{
return __atomic_compare_exchange(std::__addressof(_M_i),
......@@ -297,7 +297,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__cmpexch_failure_order(__m)); }
bool
compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
memory_order __f) noexcept
{
return __atomic_compare_exchange(std::__addressof(_M_i),
......@@ -307,7 +307,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
bool
compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
memory_order __f) volatile noexcept
{
return __atomic_compare_exchange(std::__addressof(_M_i),
......
......@@ -245,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_M_w[__n] = _M_w[__n - __wshift];
else
{
const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
- __offset);
for (size_t __n = _Nw - 1; __n > __wshift; --__n)
_M_w[__n] = ((_M_w[__n - __wshift] << __offset)
......@@ -279,7 +279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
| (_M_w[__n + __wshift + 1] << __sub_offset));
_M_w[__limit] = _M_w[_Nw-1] >> __offset;
}
std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
}
}
......@@ -556,7 +556,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_WordT&
_M_getword(size_t) _GLIBCXX_NOEXCEPT
{
__throw_out_of_range(__N("_Base_bitset::_M_getword"));
__throw_out_of_range(__N("_Base_bitset::_M_getword"));
return *new _WordT;
}
......@@ -659,7 +659,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef unsigned long _WordT;
static void
_S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { }
_S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { }
};
#if __cplusplus >= 201103L
......@@ -773,7 +773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
void
_M_do_sanitize() _GLIBCXX_NOEXCEPT
{
{
typedef _Sanitize<_Nb % _GLIBCXX_BITSET_BITS_PER_WORD> __sanitize_type;
__sanitize_type::_S_do_sanitize(this->_M_hiword());
}
......@@ -801,10 +801,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_WordT* _M_wp;
size_t _M_bpos;
// left undefined
reference();
public:
reference(bitset& __b, size_t __pos) _GLIBCXX_NOEXCEPT
{
......@@ -981,7 +981,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
return *this;
}
//@}
//@{
/**
* Operations on bitsets.
......@@ -1015,7 +1015,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
return *this;
}
//@}
//@{
/**
* These versions of single-bit set, reset, flip, and test are
......@@ -1058,7 +1058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
!= static_cast<_WordT>(0)); }
//@}
// Set, reset, and flip.
/**
* @brief Sets every bit to true.
......@@ -1107,7 +1107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
this->_M_check(__position, __N("bitset::reset"));
return _Unchecked_reset(__position);
}
/**
* @brief Toggles every bit to its opposite value.
*/
......@@ -1130,7 +1130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
this->_M_check(__position, __N("bitset::flip"));
return _Unchecked_flip(__position);
}
/// See the no-argument flip().
bitset<_Nb>
operator~() const _GLIBCXX_NOEXCEPT
......@@ -1159,7 +1159,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
operator[](size_t __position) const
{ return _Unchecked_test(__position); }
//@}
/**
* @brief Returns a numerical interpretation of the %bitset.
* @return The integral equivalent of the bits.
......@@ -1302,7 +1302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT
{ return !this->_M_is_equal(__rhs); }
//@}
/**
* @brief Tests the value of a bit.
* @param __position The index of a bit.
......@@ -1352,7 +1352,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
operator>>(size_t __position) const _GLIBCXX_NOEXCEPT
{ return bitset<_Nb>(*this) >>= __position; }
//@}
/**
* @brief Finds the index of the first "on" bit.
* @return The index of the first bit set, or size() if not found.
......@@ -1482,7 +1482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
for (size_t __i = _Nb; __i > 0; --__i)
{
static typename _Traits::int_type __eof = _Traits::eof();
typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc();
if (_Traits::eq_int_type(__c1, __eof))
{
......@@ -1508,7 +1508,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
}
__catch(__cxxabiv1::__forced_unwind&)
{
__is._M_setstate(__ios_base::badbit);
__is._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
__catch(...)
......
......@@ -72,7 +72,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.11.4.3 specialization of common_type (for duration, sfinae-friendly)
template<typename _CT, typename _Period1, typename _Period2>
struct __duration_common_type_wrapper
{
......@@ -98,7 +98,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ };
// 20.11.4.3 specialization of common_type (for time_point, sfinae-friendly)
template<typename _CT, typename _Clock>
struct __timepoint_common_type_wrapper
{
......@@ -625,11 +625,11 @@ _GLIBCXX_END_NAMESPACE_VERSION
typename common_type<duration<_Rep1, _Period1>, _Dur2>::type>
operator+(const duration<_Rep1, _Period1>& __lhs,
const time_point<_Clock, _Dur2>& __rhs)
{
{
typedef duration<_Rep1, _Period1> __dur1;
typedef typename common_type<__dur1,_Dur2>::type __ct;
typedef time_point<_Clock, __ct> __time_point;
return __time_point(__rhs.time_since_epoch() + __lhs);
return __time_point(__rhs.time_since_epoch() + __lhs);
}
template<typename _Clock, typename _Dur1,
......@@ -638,11 +638,11 @@ _GLIBCXX_END_NAMESPACE_VERSION
typename common_type<_Dur1, duration<_Rep2, _Period2>>::type>
operator-(const time_point<_Clock, _Dur1>& __lhs,
const duration<_Rep2, _Period2>& __rhs)
{
{
typedef duration<_Rep2, _Period2> __dur2;
typedef typename common_type<_Dur1,__dur2>::type __ct;
typedef time_point<_Clock, __ct> __time_point;
return __time_point(__lhs.time_since_epoch() -__rhs);
return __time_point(__lhs.time_since_epoch() -__rhs);
}
template<typename _Clock, typename _Dur1, typename _Dur2>
......@@ -688,9 +688,9 @@ _GLIBCXX_END_NAMESPACE_VERSION
{ return !(__lhs < __rhs); }
// Clocks.
// Clocks.
// Why nanosecond resolution as the default?
// Why nanosecond resolution as the default?
// Why have std::system_clock always count in the higest
// resolution (ie nanoseconds), even if on some OSes the low 3
// or 9 decimal digits will be always zero? This allows later
......
......@@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// cv_status
enum class cv_status { no_timeout, timeout };
/// condition_variable
class condition_variable
{
......@@ -250,7 +250,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
unique_lock<mutex> __my_lock2(std::move(__my_lock));
_M_cond.wait(__my_lock2);
}
template<typename _Lock, typename _Predicate>
void
......
......@@ -386,7 +386,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Common code for seekoff, seekpos, and overflow
pos_type
_M_seek(off_type __off, ios_base::seekdir __way, __state_type __state);
int
_M_get_ext_pos(__state_type &__state);
......
......@@ -1906,7 +1906,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)
* type @c T1, @c T2, ..., @c TN and returns a value convertible
* to @c Res.
*
* The newly-created %function object will target a copy of
* The newly-created %function object will target a copy of
* @a __f. If @a __f is @c reference_wrapper<F>, then this function
* object will contain a reference to the function object @c
* __f.get(). If @a __f is a NULL function pointer or NULL
......
......@@ -225,7 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef _Res result_type;
_Result() noexcept : _M_initialized() { }
~_Result()
{
if (_M_initialized)
......@@ -263,7 +263,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
explicit
_Result_alloc(const _Alloc& __a) : _Result<_Res>(), _Alloc(__a)
{ }
private:
void _M_destroy()
{
......
......@@ -62,24 +62,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Sent to a stream object, this manipulator resets the specified flags,
* via @e stream.setf(0,__mask).
*/
inline _Resetiosflags
inline _Resetiosflags
resetiosflags(ios_base::fmtflags __mask)
{ return { __mask }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
{
__is.setf(ios_base::fmtflags(0), __f._M_mask);
return __is;
{
__is.setf(ios_base::fmtflags(0), __f._M_mask);
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
{
__os.setf(ios_base::fmtflags(0), __f._M_mask);
return __os;
{
__os.setf(ios_base::fmtflags(0), __f._M_mask);
return __os;
}
......@@ -92,24 +92,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Sent to a stream object, this manipulator sets the format flags
* to @a __mask.
*/
inline _Setiosflags
inline _Setiosflags
setiosflags(ios_base::fmtflags __mask)
{ return { __mask }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
{
__is.setf(__f._M_mask);
return __is;
{
__is.setf(__f._M_mask);
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
{
__os.setf(__f._M_mask);
return __os;
{
__os.setf(__f._M_mask);
return __os;
}
......@@ -123,32 +123,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base
* is 8, 10, or 16, accordingly, and to 0 if @a __base is any other value.
*/
inline _Setbase
inline _Setbase
setbase(int __base)
{ return { __base }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
{
__is.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
__is.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
ios_base::fmtflags(0), ios_base::basefield);
return __is;
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
{
__os.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
__os.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
ios_base::fmtflags(0), ios_base::basefield);
return __os;
return __os;
}
template<typename _CharT>
struct _Setfill { _CharT _M_c; };
......@@ -166,19 +166,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return { __c }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
{
__is.fill(__f._M_c);
return __is;
{
__is.fill(__f._M_c);
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
{
__os.fill(__f._M_c);
return __os;
{
__os.fill(__f._M_c);
return __os;
}
......@@ -191,24 +191,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Sent to a stream object, this manipulator calls @c precision(__n) for
* that object.
*/
inline _Setprecision
inline _Setprecision
setprecision(int __n)
{ return { __n }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
{
__is.precision(__f._M_n);
return __is;
{
__is.precision(__f._M_n);
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
{
__os.precision(__f._M_n);
return __os;
{
__os.precision(__f._M_n);
return __os;
}
......@@ -221,35 +221,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Sent to a stream object, this manipulator calls @c width(__n) for
* that object.
*/
inline _Setw
inline _Setw
setw(int __n)
{ return { __n }; }
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
{
__is.width(__f._M_n);
return __is;
return __is;
}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
{
__os.width(__f._M_n);
return __os;
return __os;
}
#if __cplusplus >= 201103L
template<typename _MoneyT>
struct _Get_money { _MoneyT& _M_mon; bool _M_intl; };
/**
* @brief Extended manipulator for extracting money.
* @param __mon Either long double or a specialization of @c basic_string.
* @param __intl A bool indicating whether international format
* @param __intl A bool indicating whether international format
* is to be used.
*
* Sent to a stream object, this manipulator extracts @a __mon.
......@@ -286,7 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (__err)
__is.setstate(__err);
}
return __is;
return __is;
}
......@@ -296,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @brief Extended manipulator for inserting money.
* @param __mon Either long double or a specialization of @c basic_string.
* @param __intl A bool indicating whether international format
* @param __intl A bool indicating whether international format
* is to be used.
*
* Sent to a stream object, this manipulator inserts @a __mon.
......@@ -307,7 +307,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return { __mon, __intl }; }
template<typename _CharT, typename _Traits, typename _MoneyT>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
{
typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os);
......@@ -334,7 +334,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (__err)
__os.setstate(__err);
}
return __os;
return __os;
}
template<typename _CharT>
......@@ -490,7 +490,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // __cplusplus >= 201103L
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
#if _GLIBCXX_EXTERN_TEMPLATE
extern template ostream& operator<<(ostream&, _Setfill<char>);
......
......@@ -129,7 +129,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
/// Base class for @c char streams.
typedef basic_ios<char> ios;
typedef basic_ios<char> ios;
/// Base class for @c char buffers.
typedef basic_streambuf<char> streambuf;
......
......@@ -922,7 +922,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
{
{
__is >> __x;
return __is;
}
......
......@@ -3,14 +3,14 @@
// Copyright (C) 2008-2016 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
// terms of the GNU General Public License as published by the
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
......@@ -94,11 +94,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static const uintmax_t __b0 = __static_abs<_Qn>::value % __c;
static const uintmax_t __b1 = __static_abs<_Qn>::value / __c;
static_assert(__a1 == 0 || __b1 == 0,
static_assert(__a1 == 0 || __b1 == 0,
"overflow in multiplication");
static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1),
static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1),
"overflow in multiplication");
static_assert(__b0 * __a0 <= __INTMAX_MAX__,
static_assert(__b0 * __a0 <= __INTMAX_MAX__,
"overflow in multiplication");
static_assert((__a0 * __b1 + __b0 * __a1) * __c
<= __INTMAX_MAX__ - __b0 * __a0,
......@@ -257,7 +257,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* std::ratio<7,-21>::num == -1;
* std::ratio<7,-21>::den == 3;
* @endcode
*
*
*/
template<intmax_t _Num, intmax_t _Den = 1>
struct ratio
......@@ -340,7 +340,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct ratio_equal
: integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den>
{ };
/// ratio_not_equal
template<typename _R1, typename _R2>
struct ratio_not_equal
......@@ -354,7 +354,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __ratio_less_impl_1
: integral_constant<bool, __big_less<_Left::__hi, _Left::__lo,
_Right::__hi, _Right::__lo>::value>
{ };
{ };
template<typename _R1, typename _R2,
bool = (_R1::num == 0 || _R2::num == 0
......@@ -382,13 +382,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct ratio_less
: __ratio_less_impl<_R1, _R2>::type
{ };
/// ratio_less_equal
template<typename _R1, typename _R2>
struct ratio_less_equal
: integral_constant<bool, !ratio_less<_R2, _R1>::value>
{ };
/// ratio_greater
template<typename _R1, typename _R2>
struct ratio_greater
......
......@@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _OuterAlloc, typename... _InnerAllocs>
class scoped_allocator_adaptor;
template<typename...>
template<typename...>
struct __inner_type_impl;
template<typename _Outer>
......@@ -81,25 +81,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__inner_type_impl(__inner_type_impl&&) = default;
__inner_type_impl& operator=(const __inner_type_impl&) = default;
__inner_type_impl& operator=(__inner_type_impl&&) = default;
template<typename _Alloc>
__inner_type_impl(const __inner_type_impl<_Alloc>& __other)
{ }
template<typename _Alloc>
__inner_type_impl(__inner_type_impl<_Alloc>&& __other)
{ }
__type&
__type&
_M_get(__type* __p) noexcept { return *__p; }
const __type&
const __type&
_M_get(const __type* __p) const noexcept { return *__p; }
tuple<>
tuple<>
_M_tie() const noexcept { return tuple<>(); }
bool
bool
operator==(const __inner_type_impl&) const noexcept
{ return true; }
};
......@@ -108,17 +108,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __inner_type_impl<_Outer, _InnerHead, _InnerTail...>
{
typedef scoped_allocator_adaptor<_InnerHead, _InnerTail...> __type;
__inner_type_impl() = default;
__inner_type_impl(const __inner_type_impl&) = default;
__inner_type_impl(__inner_type_impl&&) = default;
__inner_type_impl& operator=(const __inner_type_impl&) = default;
__inner_type_impl& operator=(__inner_type_impl&&) = default;
template<typename... _Allocs>
__inner_type_impl(const __inner_type_impl<_Allocs...>& __other)
: _M_inner(__other._M_inner) { }
template<typename... _Allocs>
__inner_type_impl(__inner_type_impl<_Allocs...>&& __other)
: _M_inner(std::move(__other._M_inner)) { }
......@@ -128,24 +128,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__inner_type_impl(_Args&&... __args)
: _M_inner(std::forward<_Args>(__args)...) { }
__type&
__type&
_M_get(void*) noexcept { return _M_inner; }
const __type&
const __type&
_M_get(const void*) const noexcept { return _M_inner; }
tuple<const _InnerHead&, const _InnerTail&...>
tuple<const _InnerHead&, const _InnerTail&...>
_M_tie() const noexcept
{ return _M_inner._M_tie(); }
bool
bool
operator==(const __inner_type_impl& __other) const noexcept
{ return _M_inner == __other._M_inner; }
private:
template<typename...> friend class __inner_type_impl;
template<typename, typename...> friend class scoped_allocator_adaptor;
__type _M_inner;
};
......@@ -176,9 +176,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
using __outermost_alloc_traits
= allocator_traits<__outermost_type<_Alloc>>;
template<typename _Tp, typename... _Args>
void
void
_M_construct(__uses_alloc0, _Tp* __p, _Args&&... __args)
{
typedef __outermost_alloc_traits<scoped_allocator_adaptor> _O_traits;
......@@ -190,7 +190,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __uses_alloc2<typename __inner_type::__type> __uses_alloc2_;
template<typename _Tp, typename... _Args>
void
void
_M_construct(__uses_alloc1_, _Tp* __p, _Args&&... __args)
{
typedef __outermost_alloc_traits<scoped_allocator_adaptor> _O_traits;
......@@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
template<typename _Tp, typename... _Args>
void
void
_M_construct(__uses_alloc2_, _Tp* __p, _Args&&... __args)
{
typedef __outermost_alloc_traits<scoped_allocator_adaptor> _O_traits;
......
......@@ -209,7 +209,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
virtual streamsize
showmanyc()
{
{
streamsize __ret = -1;
if (_M_mode & ios_base::in)
{
......@@ -248,10 +248,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
// that an external char_type array of length __n exists
// and has been pre-allocated. If this is not the case,
// things will quickly blow up.
// Step 1: Destroy the current internal array.
_M_string.clear();
// Step 2: Use the external array.
_M_sync(__s, __n, 0);
}
......
......@@ -110,13 +110,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* program runs (e.g., violations of class invariants).
* @brief One of two subclasses of exception.
*/
class logic_error : public exception
class logic_error : public exception
{
__cow_string _M_msg;
public:
/** Takes a character string describing the error. */
explicit
explicit
logic_error(const string& __arg) _GLIBCXX_TXN_SAFE;
#if __cplusplus >= 201103L
......@@ -133,7 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** Returns a C-style character string describing the general cause of
* the current error (the same string passed to the ctor). */
virtual const char*
virtual const char*
what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT;
# ifdef _GLIBCXX_TM_TS_INTERNAL
......@@ -144,7 +144,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** Thrown by the library, or by you, to report domain errors (domain in
* the mathematical sense). */
class domain_error : public logic_error
class domain_error : public logic_error
{
public:
explicit domain_error(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -155,7 +155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/** Thrown to report invalid arguments to functions. */
class invalid_argument : public logic_error
class invalid_argument : public logic_error
{
public:
explicit invalid_argument(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** Thrown when an object is constructed that would exceed its maximum
* permitted size (e.g., a basic_string instance). */
class length_error : public logic_error
class length_error : public logic_error
{
public:
explicit length_error(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -179,7 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** This represents an argument whose value is not within the expected
* range (e.g., boundary checks in basic_string). */
class out_of_range : public logic_error
class out_of_range : public logic_error
{
public:
explicit out_of_range(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -194,13 +194,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the program executes.
* @brief One of two subclasses of exception.
*/
class runtime_error : public exception
class runtime_error : public exception
{
__cow_string _M_msg;
public:
/** Takes a character string describing the error. */
explicit
explicit
runtime_error(const string& __arg) _GLIBCXX_TXN_SAFE;
#if __cplusplus >= 201103L
......@@ -217,7 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** Returns a C-style character string describing the general cause of
* the current error (the same string passed to the ctor). */
virtual const char*
virtual const char*
what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT;
# ifdef _GLIBCXX_TM_TS_INTERNAL
......@@ -227,7 +227,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/** Thrown to indicate range errors in internal computations. */
class range_error : public runtime_error
class range_error : public runtime_error
{
public:
explicit range_error(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -238,7 +238,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/** Thrown to indicate arithmetic overflow. */
class overflow_error : public runtime_error
class overflow_error : public runtime_error
{
public:
explicit overflow_error(const string& __arg) _GLIBCXX_TXN_SAFE;
......@@ -249,7 +249,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/** Thrown to indicate arithmetic underflow. */
class underflow_error : public runtime_error
class underflow_error : public runtime_error
{
public:
explicit underflow_error(const string& __arg) _GLIBCXX_TXN_SAFE;
......
......@@ -46,10 +46,10 @@
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <bits/stl_function.h> // For less
#include <ext/numeric_traits.h>
#include <bits/stl_algobase.h>
#include <ext/numeric_traits.h>
#include <bits/stl_algobase.h>
#include <bits/range_access.h>
#include <bits/basic_string.h>
#include <bits/basic_string.tcc>
#include <bits/basic_string.tcc>
#endif /* _GLIBCXX_STRING */
......@@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
struct is_error_condition_enum : public false_type { };
template<>
template<>
struct is_error_condition_enum<errc>
: public true_type { };
......@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
virtual const char*
virtual const char*
name() const noexcept = 0;
// We need two different virtual functions here, one returning a
......@@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
virtual string
message(int) const = 0;
#else
virtual string
virtual string
message(int) const = 0;
private:
......@@ -103,21 +103,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
virtual error_condition
default_error_condition(int __i) const noexcept;
virtual bool
virtual bool
equivalent(int __i, const error_condition& __cond) const noexcept;
virtual bool
virtual bool
equivalent(const error_code& __code, int __i) const noexcept;
bool
bool
operator<(const error_category& __other) const noexcept
{ return less<const error_category*>()(this, &__other); }
bool
bool
operator==(const error_category& __other) const noexcept
{ return this == &__other; }
bool
bool
operator!=(const error_category& __other) const noexcept
{ return this != &__other; }
};
......@@ -148,14 +148,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
error_code(_ErrorCodeEnum __e) noexcept
{ *this = make_error_code(__e); }
void
void
assign(int __v, const error_category& __cat) noexcept
{
_M_value = __v;
_M_cat = &__cat;
_M_cat = &__cat;
}
void
void
clear() noexcept
{ assign(0, system_category()); }
......@@ -168,15 +168,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
int
value() const noexcept { return _M_value; }
const error_category&
const error_category&
category() const noexcept { return *_M_cat; }
error_condition
error_condition
default_error_condition() const noexcept;
_GLIBCXX_DEFAULT_ABI_TAG
string
string
message() const
{ return category().message(value()); }
......@@ -198,7 +198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline bool
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
{
{
return (__lhs.category() < __rhs.category()
|| (__lhs.category() == __rhs.category()
&& __lhs.value() < __rhs.value()));
......@@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// error_condition
// Portable error identification
struct error_condition
struct error_condition
{
error_condition() noexcept
: _M_value(0), _M_cat(&generic_category()) { }
......@@ -240,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator=(_ErrorConditionEnum __e) noexcept
{ return *this = make_error_condition(__e); }
void
void
clear() noexcept
{ assign(0, generic_category()); }
......@@ -252,7 +252,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
category() const noexcept { return *_M_cat; }
_GLIBCXX_DEFAULT_ABI_TAG
string
string
message() const
{ return category().message(value()); }
......@@ -270,7 +270,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
make_error_condition(errc __e) noexcept
{ return error_condition(static_cast<int>(__e), generic_category()); }
inline bool
inline bool
operator<(const error_condition& __lhs,
const error_condition& __rhs) noexcept
{
......@@ -325,7 +325,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return !(__lhs == __rhs); }
/**
/**
* @brief Thrown to indicate error code of underlying system.
*
* @ingroup exceptions
......@@ -358,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
virtual ~system_error() noexcept;
const error_code&
const error_code&
code() const noexcept { return _M_code; }
};
......
......@@ -112,7 +112,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ swap(__t); }
template<typename _Callable, typename... _Args>
explicit
explicit
thread(_Callable&& __f, _Args&&... __args)
{
#ifdef GTHR_ACTIVE_PROXY
......
......@@ -173,7 +173,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* get() operation.
*/
template<std::size_t _Idx, typename... _Elements>
struct _Tuple_impl;
struct _Tuple_impl;
/**
* Recursive tuple implementation. Here we store the @c Head element
......@@ -190,7 +190,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
typedef _Head_base<_Idx, _Head> _Base;
static constexpr _Head&
static constexpr _Head&
_M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); }
static constexpr const _Head&
......@@ -205,12 +205,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr _Tuple_impl()
: _Inherited(), _Base() { }
explicit
explicit
constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail)
: _Inherited(__tail...), _Base(__head) { }
template<typename _UHead, typename... _UTail, typename = typename
enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type>
enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type>
explicit
constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
: _Inherited(std::forward<_UTail>(__tail)...),
......@@ -222,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tuple_impl(_Tuple_impl&& __in)
noexcept(__and_<is_nothrow_move_constructible<_Head>,
is_nothrow_move_constructible<_Inherited>>::value)
: _Inherited(std::move(_M_tail(__in))),
: _Inherited(std::move(_M_tail(__in))),
_Base(std::forward<_Head>(_M_head(__in))) { }
template<typename... _UElements>
......@@ -260,13 +260,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
const _Tuple_impl& __in)
: _Inherited(__tag, __a, _M_tail(__in)),
: _Inherited(__tag, __a, _M_tail(__in)),
_Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { }
template<typename _Alloc>
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
_Tuple_impl&& __in)
: _Inherited(__tag, __a, std::move(_M_tail(__in))),
: _Inherited(__tag, __a, std::move(_M_tail(__in))),
_Base(__use_alloc<_Head, _Alloc, _Head>(__a),
std::forward<_Head>(_M_head(__in))) { }
......@@ -551,7 +551,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/// Primary class template, tuple
template<typename... _Elements>
template<typename... _Elements>
class tuple : public _Tuple_impl<0, _Elements...>
{
typedef _Tuple_impl<0, _Elements...> _Inherited;
......@@ -658,7 +658,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr tuple(const tuple&) = default;
constexpr tuple(tuple&&) = default;
constexpr tuple(tuple&&) = default;
// Shortcut for the cases where constructors taking tuples
// must avoid creating temporaries.
......@@ -1339,7 +1339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return bool(std::get<__i>(__t) == std::get<__i>(__u))
&& __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u);
}
static constexpr bool
__less(const _Tp& __t, const _Up& __u)
{
......@@ -1354,7 +1354,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
static constexpr bool
__eq(const _Tp&, const _Up&) { return true; }
static constexpr bool
__less(const _Tp&, const _Up&) { return false; }
};
......@@ -1569,7 +1569,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// swap
template<typename... _Elements>
inline void
inline void
swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
......
......@@ -49,7 +49,7 @@
*/
/** @file include/utility
* This is a Standard C++ Library header.
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_UTILITY
......@@ -150,7 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Tp1, class _Tp2>
struct tuple_element<0, std::pair<_Tp1, _Tp2>>
{ typedef _Tp1 type; };
/// Partial specialization for std::pair
template<class _Tp1, class _Tp2>
struct tuple_element<1, std::pair<_Tp1, _Tp2>>
......
......@@ -23,7 +23,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/valarray
* This is a Standard C++ Library header.
* This is a Standard C++ Library header.
*/
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
......@@ -45,11 +45,11 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Clos, typename _Tp>
template<class _Clos, typename _Tp>
class _Expr;
template<typename _Tp1, typename _Tp2>
class _ValArray;
template<typename _Tp1, typename _Tp2>
class _ValArray;
template<class _Oper, template<class, class> class _Meta, class _Dom>
struct _UnClos;
......@@ -57,22 +57,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Oper,
template<class, class> class _Meta1,
template<class, class> class _Meta2,
class _Dom1, class _Dom2>
class _Dom1, class _Dom2>
class _BinClos;
template<template<class, class> class _Meta, class _Dom>
template<template<class, class> class _Meta, class _Dom>
class _SClos;
template<template<class, class> class _Meta, class _Dom>
template<template<class, class> class _Meta, class _Dom>
class _GClos;
template<template<class, class> class _Meta, class _Dom>
template<template<class, class> class _Meta, class _Dom>
class _IClos;
template<template<class, class> class _Meta, class _Dom>
template<template<class, class> class _Meta, class _Dom>
class _ValFunClos;
template<template<class, class> class _Meta, class _Dom>
template<template<class, class> class _Meta, class _Dom>
class _RefFunClos;
template<class _Tp> class valarray; // An array of type _Tp
......@@ -88,7 +88,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
#include <bits/valarray_array.h>
#include <bits/valarray_before.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
......@@ -109,21 +109,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* aliasing that can result from pointer representations. It represents a
* one-dimensional array from which different multidimensional subsets can
* be accessed and modified.
*
*
* @tparam _Tp Type of object in the array.
*/
template<class _Tp>
template<class _Tp>
class valarray
{
template<class _Op>
struct _UnaryOp
struct _UnaryOp
{
typedef typename __fun<_Op, _Tp>::result_type __rt;
typedef _Expr<_UnClos<_Op, _ValArray, _Tp>, __rt> _Rt;
};
public:
typedef _Tp value_type;
// _lib.valarray.cons_ construct/destroy:
/// Construct an empty array.
valarray();
......@@ -254,7 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// _lib.valarray.access_ element access:
/**
* Return a reference to the i'th array element.
* Return a reference to the i'th array element.
*
* @param __i Index of element to return.
* @return Reference to the i'th element.
......@@ -482,10 +482,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Tp sum() const;
/// Return the minimum element using operator<().
_Tp min() const;
_Tp min() const;
/// Return the maximum element using operator<().
_Tp max() const;
_Tp max() const;
/**
* @brief Return a shifted array.
......@@ -559,14 +559,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
size_t _M_size;
_Tp* __restrict__ _M_data;
friend class _Array<_Tp>;
};
template<typename _Tp>
inline const _Tp&
valarray<_Tp>::operator[](size_t __i) const
{
{
__glibcxx_requires_subscript(__i);
return _M_data[__i];
}
......@@ -574,7 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
inline _Tp&
valarray<_Tp>::operator[](size_t __i)
{
{
__glibcxx_requires_subscript(__i);
return _M_data[__i];
}
......@@ -605,8 +605,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
valarray<_Tp>::valarray() : _M_size(0), _M_data(0) {}
template<typename _Tp>
inline
valarray<_Tp>::valarray(size_t __n)
inline
valarray<_Tp>::valarray(size_t __n)
: _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
{ std::__valarray_default_construct(_M_data, _M_data + __n); }
......@@ -620,9 +620,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline
valarray<_Tp>::valarray(const _Tp* __restrict__ __p, size_t __n)
: _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
{
{
__glibcxx_assert(__p != 0 || __n == 0);
std::__valarray_copy_construct(__p, __p + __n, _M_data);
std::__valarray_copy_construct(__p, __p + __n, _M_data);
}
template<typename _Tp>
......@@ -917,7 +917,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
template<class _Tp>
inline size_t
inline size_t
valarray<_Tp>::size() const
{ return _M_size; }
......@@ -1027,7 +1027,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
std::__valarray_fill_construct(_M_data, _M_data + __n, __c);
}
template<typename _Tp>
inline _Tp
valarray<_Tp>::min() const
......@@ -1043,7 +1043,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__glibcxx_assert(_M_size > 0);
return *std::max_element(_M_data, _M_data + _M_size);
}
template<class _Tp>
inline _Expr<_ValFunClos<_ValArray, _Tp>, _Tp>
valarray<_Tp>::apply(_Tp func(_Tp)) const
......@@ -1130,7 +1130,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, __shift_left)
_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right)
#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT
#define _DEFINE_BINARY_OPERATOR(_Op, _Name) \
template<typename _Tp> \
......
......@@ -62,7 +62,7 @@
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_vector.h>
#include <bits/stl_bvector.h>
#include <bits/stl_bvector.h>
#include <bits/range_access.h>
#ifndef _GLIBCXX_EXPORT_TEMPLATE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment