From 15d72060874c9714f5df3d6693a2a4f9b6c06528 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 6 Feb 2004 21:32:48 +0000 Subject: [PATCH] stl_construct.h: Wrap overlong lines, reformat according to the coding standards. 2004-02-06 Paolo Carlini * include/bits/stl_construct.h: Wrap overlong lines, reformat according to the coding standards. * include/bits/stl_pair.h: Likewise. * include/bits/stl_raw_storage_iter.h: Likewise. * include/bits/stl_stack.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/stream_iterator.h: Likewise. * include/bits/streambuf_iterator.h: Likewise. * include/bits/type_traits.h: Likewise. From-SVN: r77425 --- libstdc++-v3/ChangeLog | 12 + libstdc++-v3/include/bits/stl_construct.h | 5 +- libstdc++-v3/include/bits/stl_pair.h | 159 +++---- .../include/bits/stl_raw_storage_iter.h | 7 +- libstdc++-v3/include/bits/stl_stack.h | 34 +- libstdc++-v3/include/bits/stl_uninitialized.h | 42 +- libstdc++-v3/include/bits/stream_iterator.h | 25 +- .../include/bits/streambuf_iterator.h | 9 +- libstdc++-v3/include/bits/type_traits.h | 432 ++++++++++-------- 9 files changed, 410 insertions(+), 315 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 02220a9cbbd..d56df036a16 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2004-02-06 Paolo Carlini + + * include/bits/stl_construct.h: Wrap overlong lines, reformat + according to the coding standards. + * include/bits/stl_pair.h: Likewise. + * include/bits/stl_raw_storage_iter.h: Likewise. + * include/bits/stl_stack.h: Likewise. + * include/bits/stl_uninitialized.h: Likewise. + * include/bits/stream_iterator.h: Likewise. + * include/bits/streambuf_iterator.h: Likewise. + * include/bits/type_traits.h: Likewise. + 2004-02-06 Paolo Carlini * testsuite/27_io/basic_filebuf/open/char/9507.cc: diff --git a/libstdc++-v3/include/bits/stl_construct.h b/libstdc++-v3/include/bits/stl_construct.h index c705c003b5d..6db195b29a2 100644 --- a/libstdc++-v3/include/bits/stl_construct.h +++ b/libstdc++-v3/include/bits/stl_construct.h @@ -1,6 +1,6 @@ // nonstandard construct and destroy functions -*- C++ -*- -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -115,7 +115,8 @@ namespace std */ template inline void - __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) + __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, + __false_type) { for ( ; __first != __last; ++__first) std::_Destroy(&*__first); } /** diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 6b08b93d584..46eabb311c9 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -1,6 +1,6 @@ // Pair implementation -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2004 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 @@ -64,85 +64,88 @@ namespace std { -/// pair holds two objects of arbitrary type. -template -struct pair { - typedef _T1 first_type; ///< @c first_type is the first bound type - typedef _T2 second_type; ///< @c second_type is the second bound type + /// pair holds two objects of arbitrary type. + template + struct pair + { + typedef _T1 first_type; ///< @c first_type is the first bound type + typedef _T2 second_type; ///< @c second_type is the second bound type + + _T1 first; ///< @c first is a copy of the first object + _T2 second; ///< @c second is a copy of the second object + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 265. std::pair::pair() effects overly restrictive + /** The default constructor creates @c first and @c second using their + * respective default constructors. */ + pair() + : first(), second() {} + + /** Two objects may be passed to a @c pair constructor to be copied. */ + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) {} + + /** There is also a templated copy ctor for the @c pair class itself. */ + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) {} + }; + + /// Two pairs of the same type are equal iff their members are equal. + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + /// + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + + /// Uses @c operator== to find the result. + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + + /// Uses @c operator< to find the result. + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + + /// Uses @c operator< to find the result. + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + + /// Uses @c operator< to find the result. + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } + + /** + * @brief A convenience wrapper for creating a pair from two objects. + * @param x The first object. + * @param y The second object. + * @return A newly-constructed pair<> object of the appropriate type. + * + * The standard requires that the objects be passed by reference-to-const, + * but LWG issue #181 says they should be passed by const value. We follow + * the LWG by default. + */ + template - _T1 first; ///< @c first is a copy of the first object - _T2 second; ///< @c second is a copy of the second object // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 265. std::pair::pair() effects overly restrictive - /** The default constructor creates @c first and @c second using their - * respective default constructors. */ - pair() : first(), second() {} - - /** Two objects may be passed to a @c pair constructor to be copied. */ - pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} - - /** There is also a templated copy ctor for the @c pair class itself. */ - template - pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} -}; - -/// Two pairs of the same type are equal iff their members are equal. -template -inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) -{ - return __x.first == __y.first && __x.second == __y.second; -} - -/// -template -inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) -{ - return __x.first < __y.first || - (!(__y.first < __x.first) && __x.second < __y.second); -} - -/// Uses @c operator== to find the result. -template -inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__x == __y); -} - -/// Uses @c operator< to find the result. -template -inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return __y < __x; -} - -/// Uses @c operator< to find the result. -template -inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__y < __x); -} - -/// Uses @c operator< to find the result. -template -inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__x < __y); -} - -/** - * @brief A convenience wrapper for creating a pair from two objects. - * @param x The first object. - * @param y The second object. - * @return A newly-constructed pair<> object of the appropriate type. - * - * The standard requires that the objects be passed by reference-to-const, - * but LWG issue #181 says they should be passed by const value. We follow - * the LWG by default. -*/ -template -// _GLIBCXX_RESOLVE_LIB_DEFECTS -// 181. make_pair() unintended behavior -inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) -{ - return pair<_T1, _T2>(__x, __y); -} - + // 181. make_pair() unintended behavior + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } + } // namespace std #endif /* _PAIR_H */ diff --git a/libstdc++-v3/include/bits/stl_raw_storage_iter.h b/libstdc++-v3/include/bits/stl_raw_storage_iter.h index 3460205e7a8..5b40e0a46cb 100644 --- a/libstdc++-v3/include/bits/stl_raw_storage_iter.h +++ b/libstdc++-v3/include/bits/stl_raw_storage_iter.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2004 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 @@ -68,7 +68,7 @@ namespace std * uninitialized memory. */ template - class raw_storage_iterator + class raw_storage_iterator : public iterator { protected: @@ -76,7 +76,8 @@ namespace std public: explicit - raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} + raw_storage_iterator(_ForwardIterator __x) + : _M_iter(__x) {} raw_storage_iterator& operator*() { return *this; } diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h index d72755a9fae..953b78fee7b 100644 --- a/libstdc++-v3/include/bits/stl_stack.h +++ b/libstdc++-v3/include/bits/stl_stack.h @@ -1,6 +1,6 @@ // Stack implementation -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2004 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 @@ -79,7 +79,6 @@ namespace std inline bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); - /** * @brief A standard container giving FILO behavior. * @@ -116,9 +115,9 @@ namespace std __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) - template - friend bool - operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); + template + friend bool + operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template friend bool @@ -141,17 +140,20 @@ namespace std * @brief Default constructor creates no elements. */ explicit - stack(const _Sequence& __c = _Sequence()) : c(__c) {} + stack(const _Sequence& __c = _Sequence()) + : c(__c) {} /** * Returns true if the %stack is empty. */ bool - empty() const { return c.empty(); } + empty() const + { return c.empty(); } /** Returns the number of elements in the %stack. */ size_type - size() const { return c.size(); } + size() const + { return c.size(); } /** * Returns a read/write reference to the data at the first @@ -185,7 +187,8 @@ namespace std * underlying sequence. */ void - push(const value_type& __x) { c.push_back(__x); } + push(const value_type& __x) + { c.push_back(__x); } /** * @brief Removes first element. @@ -206,7 +209,6 @@ namespace std } }; - /** * @brief Stack equality comparison. * @param x A %stack. @@ -221,7 +223,7 @@ namespace std */ template inline bool - operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __x.c == __y.c; } /** @@ -239,31 +241,31 @@ namespace std */ template inline bool - operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __x.c < __y.c; } /// Based on operator== template inline bool - operator!=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__x == __y); } /// Based on operator< template inline bool - operator>(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __y < __x; } /// Based on operator< template inline bool - operator<=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__y < __x); } /// Based on operator< template inline bool - operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) + operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__x < __y); } } // namespace std diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index 1111646fd74..ecf6981232b 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -1,6 +1,6 @@ // Raw memory manipulators -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2004 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 @@ -109,7 +109,8 @@ namespace std { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD; - return std::__uninitialized_copy_aux(__first, __last, __result, _Is_POD()); + return std::__uninitialized_copy_aux(__first, __last, __result, + _Is_POD()); } inline char* @@ -138,15 +139,15 @@ namespace std template void - __uninitialized_fill_aux(_ForwardIterator __first, - _ForwardIterator __last, + __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, __false_type) { _ForwardIterator __cur = __first; - try { - for ( ; __cur != __last; ++__cur) - std::_Construct(&*__cur, __x); - } + try + { + for ( ; __cur != __last; ++__cur) + std::_Construct(&*__cur, __x); + } catch(...) { std::_Destroy(__first, __cur); @@ -235,10 +236,12 @@ namespace std _InputIterator2 __last2, _ForwardIterator __result) { - _ForwardIterator __mid = std::uninitialized_copy(__first1, __last1, __result); - try { - return std::uninitialized_copy(__first2, __last2, __mid); - } + _ForwardIterator __mid = std::uninitialized_copy(__first1, __last1, + __result); + try + { + return std::uninitialized_copy(__first2, __last2, __mid); + } catch(...) { std::_Destroy(__result, __mid); @@ -252,13 +255,14 @@ namespace std template inline _ForwardIterator __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid, - const _Tp& __x, - _InputIterator __first, _InputIterator __last) + const _Tp& __x, _InputIterator __first, + _InputIterator __last) { std::uninitialized_fill(__result, __mid, __x); - try { - return std::uninitialized_copy(__first, __last, __mid); - } + try + { + return std::uninitialized_copy(__first, __last, __mid); + } catch(...) { std::_Destroy(__result, __mid); @@ -272,8 +276,8 @@ namespace std template inline void __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1, - _ForwardIterator __first2, _ForwardIterator __last2, - const _Tp& __x) + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x) { _ForwardIterator __mid2 = std::uninitialized_copy(__first1, __last1, __first2); diff --git a/libstdc++-v3/include/bits/stream_iterator.h b/libstdc++-v3/include/bits/stream_iterator.h index a8bc0565a90..0433fe0de3a 100644 --- a/libstdc++-v3/include/bits/stream_iterator.h +++ b/libstdc++-v3/include/bits/stream_iterator.h @@ -45,7 +45,7 @@ namespace std template, typename _Dist = ptrdiff_t> class istream_iterator - : public iterator + : public iterator { public: typedef _CharT char_type; @@ -59,10 +59,13 @@ namespace std public: /// Construct end of input stream iterator. - istream_iterator() : _M_stream(0), _M_ok(false) {} + istream_iterator() + : _M_stream(0), _M_ok(false) {} /// Construct start of input stream iterator. - istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } istream_iterator(const istream_iterator& __obj) : _M_stream(__obj._M_stream), _M_value(__obj._M_value), @@ -104,14 +107,14 @@ namespace std bool _M_equal(const istream_iterator& __x) const - { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);} + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } private: void _M_read() { _M_ok = (_M_stream && *_M_stream) ? true : false; - if (_M_ok) + if (_M_ok) { *_M_stream >> _M_value; _M_ok = *_M_stream ? true : false; @@ -133,7 +136,6 @@ namespace std const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return !__x._M_equal(__y); } - /** * @brief Provides output iterator semantics for streams. * @@ -148,7 +150,7 @@ namespace std template > class ostream_iterator - : public iterator + : public iterator { public: //@{ @@ -197,13 +199,16 @@ namespace std } ostream_iterator& - operator*() { return *this; } + operator*() + { return *this; } ostream_iterator& - operator++() { return *this; } + operator++() + { return *this; } ostream_iterator& - operator++(int) { return *this; } + operator++(int) + { return *this; } }; } // namespace std #endif diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h index 908b8ddf33a..b11d24c6a2c 100644 --- a/libstdc++-v3/include/bits/streambuf_iterator.h +++ b/libstdc++-v3/include/bits/streambuf_iterator.h @@ -159,9 +159,9 @@ namespace std { if (!traits_type::eq_int_type(_M_c, __eof)) __ret = _M_c; - else - if (traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof)) - _M_sbuf = 0; + else if (traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_sbuf = 0; } return __ret; } @@ -248,7 +248,8 @@ namespace std _M_put(const _CharT* __ws, streamsize __len) { if (__builtin_expect(!_M_failed, true) - && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false)) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) _M_failed = true; return *this; } diff --git a/libstdc++-v3/include/bits/type_traits.h b/libstdc++-v3/include/bits/type_traits.h index 80f7e39575e..be82c4bf2d2 100644 --- a/libstdc++-v3/include/bits/type_traits.h +++ b/libstdc++-v3/include/bits/type_traits.h @@ -1,6 +1,6 @@ // Type traits implementation -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2004 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 @@ -91,13 +91,14 @@ struct __true_type {}; struct __false_type {}; template -struct __type_traits { - typedef __true_type this_dummy_member_must_be_first; - /* Do not remove this member. It informs a compiler which - automatically specializes __type_traits that this - __type_traits template is special. It just makes sure that - things work if an implementation is using a template - called __type_traits for something unrelated. */ + struct __type_traits + { + typedef __true_type this_dummy_member_must_be_first; + /* Do not remove this member. It informs a compiler which + automatically specializes __type_traits that this + __type_traits template is special. It just makes sure that + things work if an implementation is using a template + called __type_traits for something unrelated. */ /* The following restrictions should be observed for the sake of compilers which automatically produce type specific specializations @@ -110,227 +111,292 @@ struct __type_traits { you add the appropriate support in the compiler. */ - typedef __false_type has_trivial_default_constructor; - typedef __false_type has_trivial_copy_constructor; - typedef __false_type has_trivial_assignment_operator; - typedef __false_type has_trivial_destructor; - typedef __false_type is_POD_type; -}; + typedef __false_type has_trivial_default_constructor; + typedef __false_type has_trivial_copy_constructor; + typedef __false_type has_trivial_assignment_operator; + typedef __false_type has_trivial_destructor; + typedef __false_type is_POD_type; + }; // Provide some specializations. -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; -template<> struct __type_traits { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; +template<> + struct __type_traits + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; template -struct __type_traits<_Tp*> { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; - + struct __type_traits<_Tp*> + { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; + }; // The following could be written in terms of numeric_limits. // We're doing it separately to reduce the number of dependencies. -template struct _Is_integer { - typedef __false_type _Integral; -}; +template + struct _Is_integer + { + typedef __false_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template<> struct _Is_integer { - typedef __true_type _Integral; -}; +template<> + struct _Is_integer + { + typedef __true_type _Integral; + }; -template struct _Is_normal_iterator { - typedef __false_type _Normal; -}; +template + struct _Is_normal_iterator + { + typedef __false_type _Normal; + }; // Forward declaration hack, should really include this from somewhere. namespace __gnu_cxx { - template class __normal_iterator; + template + class __normal_iterator; } template -struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > { - typedef __true_type _Normal; -}; + struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + typedef __true_type _Normal; + }; #endif /* _TYPE_TRAITS_H */