diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-14 19:40:45 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-14 19:40:45 +0000 |
| commit | 4cf5c70f4c237d1722b930589c326740a691aa22 (patch) | |
| tree | e5032559fc9d1fe4df369033b7e88567f6f92795 /libstdc++-v3/include/ext/memory | |
| parent | 474b6f88b01214b45eba292655b47253140ab2d0 (diff) | |
| download | ppe42-gcc-4cf5c70f4c237d1722b930589c326740a691aa22.tar.gz ppe42-gcc-4cf5c70f4c237d1722b930589c326740a691aa22.zip | |
2004-06-14 Paolo Carlini <pcarlini@suse.de>
* include/ext/hash_map: Trivial formatting fixes.
* include/ext/hash_set: Likewise.
* include/ext/memory: Likewise.
* include/ext/numeric: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83131 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext/memory')
| -rw-r--r-- | libstdc++-v3/include/ext/memory | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/libstdc++-v3/include/ext/memory b/libstdc++-v3/include/ext/memory index 1d93f90ac7a..adb15ce2992 100644 --- a/libstdc++-v3/include/ext/memory +++ b/libstdc++-v3/include/ext/memory @@ -1,6 +1,6 @@ // Memory extensions -*- C++ -*- -// Copyright (C) 2002 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -82,7 +82,7 @@ namespace __gnu_cxx _ForwardIter __cur = __result; try { - for ( ; __count > 0 ; --__count, ++__first, ++__cur) + for (; __count > 0 ; --__count, ++__first, ++__cur) std::_Construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } @@ -100,19 +100,16 @@ namespace __gnu_cxx std::random_access_iterator_tag) { _RandomAccessIter __last = __first + __count; - return pair<_RandomAccessIter, _ForwardIter>( - __last, - std::uninitialized_copy(__first, __last, __result)); + return (pair<_RandomAccessIter, _ForwardIter> + (__last, std::uninitialized_copy(__first, __last, __result))); } template<typename _InputIter, typename _Size, typename _ForwardIter> inline pair<_InputIter, _ForwardIter> __uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result) - { - return __uninitialized_copy_n(__first, __count, __result, - __iterator_category(__first)); - } + { return __uninitialized_copy_n(__first, __count, __result, + __iterator_category(__first)); } /** * @brief Copies the range [first,last) into result. @@ -128,11 +125,8 @@ namespace __gnu_cxx inline pair<_InputIter, _ForwardIter> uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result) - { - return __uninitialized_copy_n(__first, __count, __result, - __iterator_category(__first)); - } - + { return __uninitialized_copy_n(__first, __count, __result, + __iterator_category(__first)); } /** * This class provides similar behavior and semantics of the standard @@ -155,16 +149,16 @@ namespace __gnu_cxx * @ingroup SGIextensions */ template <class _ForwardIterator, class _Tp - = typename std::iterator_traits<_ForwardIterator>::value_type > - struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> - { - /// Requests storage large enough to hold a copy of [first,last). - temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) - : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) { } - - /// Destroys objects and frees storage. - ~temporary_buffer() { } - }; + = typename std::iterator_traits<_ForwardIterator>::value_type > + struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> + { + /// Requests storage large enough to hold a copy of [first,last). + temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) { } + + /// Destroys objects and frees storage. + ~temporary_buffer() { } + }; } // namespace __gnu_cxx #endif |

