This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Inline std::uninitialized helper
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Sep 2006 20:57:47 +0200
- Subject: [v3] Inline std::uninitialized helper
Hi,
tested x86-linux, committed to mainline.
Paolo.
////////////////////
2006-09-28 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_uninitialized.h
(__uninitialized_fill_n_a(_ForwardIterator, _Size, const _Tp&,
allocator<>)): Inline.
Index: include/bits/stl_uninitialized.h
===================================================================
--- include/bits/stl_uninitialized.h (revision 117279)
+++ include/bits/stl_uninitialized.h (working copy)
@@ -1,6 +1,7 @@
// Raw memory manipulators -*- C++ -*-
-// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// 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
@@ -250,9 +251,7 @@
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result,
allocator<_Tp>)
- {
- return std::uninitialized_copy(__first, __last, __result);
- }
+ { return std::uninitialized_copy(__first, __last, __result); }
template<typename _ForwardIterator, typename _Tp, typename _Allocator>
void
@@ -276,9 +275,7 @@
inline void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, allocator<_Tp2>)
- {
- std::uninitialized_fill(__first, __last, __x);
- }
+ { std::uninitialized_fill(__first, __last, __x); }
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Allocator>
@@ -302,13 +299,11 @@
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Tp2>
- void
+ inline void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x,
allocator<_Tp2>)
- {
- std::uninitialized_fill_n(__first, __n, __x);
- }
+ { std::uninitialized_fill_n(__first, __n, __x); }
// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,