From 6e4355c2ac20048cead81b6266eae5c4005e4dbb Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 3 Apr 2007 18:44:01 +0000 Subject: 2007-04-03 Paolo Carlini * include/bits/stl_algobase.h (__copy_aux(_II, _II, _OI), __copy_backward_aux(_BI1, _BI1, _BI2)): Use __is_pod. * include/bits/stl_deque.h (deque<>::_M_destroy_data(iterator, iterator, const std::allocator<>&)): Use __has_trivial_constructor. (deque<>::_M_destroy_data_dispatch): Remove. * include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator), uninitialized_fill(_ForwardIterator, _ForwardIterator, const _Tp&), uninitialized_fill_n(_ForwardIterator, _Size, const _Tp&)): Use __is_pod. * include/bits/stl_tempbuf.h (_Temporary_buffer:: _Temporary_buffer(_ForwardIterator, _ForwardIterator)): Use __is_pod. (_Temporary_buffer::_M_initialize_buffer): Remove. * include/bits/stl_construct.h (_Destroy(_ForwardIterator, _ForwardIterator)): Use __has_trivial_destructor. (__destroy_aux): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123480 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/bits/stl_deque.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'libstdc++-v3/include/bits/stl_deque.h') diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 9da0bb7ea79..2030a937e5c 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -1,6 +1,6 @@ // Deque implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1424,13 +1424,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) void _M_destroy_data_aux(iterator __first, iterator __last); - void - _M_destroy_data_dispatch(iterator, iterator, __true_type) { } - - void - _M_destroy_data_dispatch(iterator __first, iterator __last, __false_type) - { _M_destroy_data_aux(__first, __last); } - // Called by ~deque(). // NB: Doesn't deallocate the nodes. template @@ -1442,9 +1435,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) _M_destroy_data(iterator __first, iterator __last, const std::allocator<_Tp>&) { - typedef typename std::__is_scalar::__type - _Has_trivial_destructor; - _M_destroy_data_dispatch(__first, __last, _Has_trivial_destructor()); + if (!__has_trivial_destructor(value_type)) + _M_destroy_data_aux(__first, __last); } // Called by erase(q1, q2). -- cgit v1.2.1