gcc/libstdc++-v3/include/bits/move.h

232 lines
6.7 KiB
C
Raw Normal View History

// Move, forward and identity for C++11 + swap -*- C++ -*-
2021-01-04 10:26:59 +01:00
// Copyright (C) 2007-2021 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
// 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
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/move.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{utility}
*/
#ifndef _MOVE_H
#define _MOVE_H 1
#include <bits/c++config.h>
Add iterator concepts and range access customization points for C++20 This adds most of the new C++20 features to <iterator>, as well as a few initial pieces of <ranges> (but no actual <ranges> header just yet). * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/iterator_concepts.h: New header. (contiguous_iterator_tag, iter_reference_t, ranges::iter_move) (iter_rvalue_reference_t, incrementable_traits, iter_difference_t) (readable_traits, iter_value_t, readable, iter_common_reference_t) (writable, waekly_incrementable, incrementable) (input_or_output_iterator, sentinel_for, disable_sized_sentinel) (sized_sentinel_for, input_iterator, output_iterator) (forward_iterator, bidirectional_iterator, random_access_iterator) (contiguous_iterator, indirectly_unary_invocable) (indirectly_regular_unary_invocable, indirect_unary_predicate) (indirect_relation, indirect_strict_weak_order, indirect_result_t) (projected, indirectly_movable, indirectly_movable_storable) (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap) (indirectly_swappable, indirectly_comparable, permutable, mergeable) (sortable, unreachable_sentinel_t, unreachable_sentinel) (default_sentinel_t, default_sentinel): Define. (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator) (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator) (__detail::__cpp17_randacc_iterator): Define. (__iterator_traits): Define constrained specializations. * include/bits/move.h (move): Only use old concept check for C++98. * include/bits/range_access.h (ranges::disable_sized_range) (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define new customization points for C++20. (ranges::range, ranges::sized_range): Define new concepts for C++20. (ranges::advance, ranges::distance, ranges::next, ranges::prev): Define new functions for C++20. (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin) (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size) (__adl_empty): Remove. * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize for reverse_iterator. * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag): Define new struct for C++20. (iterator_traits<_Tp*>): Constrain partial specialization in C++20. * include/std/concepts (__is_class_or_enum): Move to __detail namespace. * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number. * testsuite/20_util/forward/f_neg.cc: Likewise. * testsuite/24_iterators/associated_types/incrementable.traits.cc: New test. * testsuite/24_iterators/associated_types/readable.traits.cc: New test. * testsuite/24_iterators/contiguous/concept.cc: New test. * testsuite/24_iterators/contiguous/tag.cc: New test. * testsuite/24_iterators/customization_points/iter_move.cc: New test. * testsuite/24_iterators/customization_points/iter_swap.cc: New test. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test. * testsuite/24_iterators/range_operations/advance.cc: New test. * testsuite/24_iterators/range_operations/distance.cc: New test. * testsuite/24_iterators/range_operations/next.cc: New test. * testsuite/24_iterators/range_operations/prev.cc: New test. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/2.cc: Rename types that conflict with C++20 concepts. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/experimental/iterator/requirements.cc: Likewise. * testsuite/std/ranges/access/begin.cc: New test. * testsuite/std/ranges/access/cbegin.cc: New test. * testsuite/std/ranges/access/cdata.cc: New test. * testsuite/std/ranges/access/cend.cc: New test. * testsuite/std/ranges/access/crbegin.cc: New test. * testsuite/std/ranges/access/crend.cc: New test. * testsuite/std/ranges/access/data.cc: New test. * testsuite/std/ranges/access/empty.cc: New test. * testsuite/std/ranges/access/end.cc: New test. * testsuite/std/ranges/access/rbegin.cc: New test. * testsuite/std/ranges/access/rend.cc: New test. * testsuite/std/ranges/access/size.cc: New test. * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper) (test_range, test_sized_range): New test utilities. From-SVN: r277579
2019-10-29 18:44:18 +01:00
#if __cplusplus < 201103L
# include <bits/concept_check.h>
#endif
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
// Used, in C++03 mode too, by allocators, etc.
/**
* @brief Same as C++11 std::addressof
* @ingroup utilities
*/
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
template<typename _Tp>
inline _GLIBCXX_CONSTEXPR _Tp*
__addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
{ return __builtin_addressof(__r); }
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
re PR libstdc++/81064 (Inline namespace regression) 2017-07-23 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/81064 * include/bits/algorithmfwd.h: Reorganize versioned namespace. * include/bits/basic_string.h: Likewise. * include/bits/c++config: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/forward_list.tcc: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/move.h: Likewise. * include/bits/quoted_string.h: Likewise. * include/bits/random.h: Likewise. * include/bits/random.tcc: Likewise. * include/bits/regex.h: Likewise. * include/bits/regex.tcc: Likewise. * include/bits/regex_automaton.h: Likewise. * include/bits/regex_automaton.tcc: Likewise. * include/bits/regex_compiler.h: Likewise. * include/bits/regex_compiler.tcc: Likewise. * include/bits/regex_constants.h: Likewise. * include/bits/regex_error.h: Likewise. * include/bits/regex_executor.h: Likewise. * include/bits/regex_executor.tcc: Likewise. * include/bits/regex_scanner.h: Likewise. * include/bits/regex_scanner.tcc: Likewise. * include/bits/specfun.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/uniform_int_dist.h: Likewise. * include/bits/unordered_map.h: Likewise. * include/bits/unordered_set.h: Likewise. * include/bits/vector.tcc: Likewise. * include/c_global/cmath: Likewise. * include/c_std/cmath: Likewise. * include/decimal/decimal: Likewise. * include/decimal/decimal.h: Likewise. * include/experimental/algorithm: Likewise. * include/experimental/any: Likewise. * include/experimental/array: Likewise. * include/experimental/bits/erase_if.h: Likewise. * include/experimental/bits/fs_dir.h: Likewise. * include/experimental/bits/fs_fwd.h: Likewise. * include/experimental/bits/fs_ops.h: Likewise. * include/experimental/bits/fs_path.h: Likewise. * include/experimental/bits/lfts_config.h: Likewise. * include/experimental/bits/shared_ptr.h: Likewise. * include/experimental/bits/string_view.tcc: Likewise. * include/experimental/chrono: Likewise. * include/experimental/deque: Likewise. * include/experimental/filesystem: Likewise. * include/experimental/forward_list: Likewise. * include/experimental/functional: Likewise. * include/experimental/iterator: Likewise. * include/experimental/list: Likewise. * include/experimental/map: Likewise. * include/experimental/memory: Likewise. * include/experimental/memory_resource: Likewise. * include/experimental/numeric: Likewise. * include/experimental/optional: Likewise. * include/experimental/propagate_const: Likewise. * include/experimental/random: Likewise. * include/experimental/ratio: Likewise. * include/experimental/regex: Likewise. * include/experimental/set: Likewise. * include/experimental/source_location: Likewise. * include/experimental/string: Likewise. * include/experimental/string_view: Likewise. * include/experimental/system_error: Likewise. * include/experimental/tuple: Likewise. * include/experimental/type_traits: Likewise. * include/experimental/unordered_map: Likewise. * include/experimental/unordered_set: Likewise. * include/experimental/utility: Likewise. * include/experimental/vector: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/codecvt_specializations.h: Likewise. * include/ext/rope: Likewise. * include/ext/typelist.h: Likewise. * include/std/chrono: Likewise. * include/std/complex: Likewise. * include/std/functional: Likewise. * include/std/numeric: Likewise. * include/std/string_view: Likewise. * include/std/thread: Likewise. * include/std/variant: Likewise. * include/tr1/array: Likewise. * include/tr1/bessel_function.tcc: Likewise. * include/tr1/beta_function.tcc: Likewise. * include/tr1/cmath: Likewise. * include/tr1/complex: Likewise. * include/tr1/ell_integral.tcc: Likewise. * include/tr1/exp_integral.tcc: Likewise. * include/tr1/functional: Likewise. * include/tr1/functional_hash.h: Likewise. * include/tr1/gamma.tcc: Likewise. * include/tr1/hashtable.h: Likewise. * include/tr1/hashtable_policy.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/tr1/legendre_function.tcc: Likewise. * include/tr1/modified_bessel_func.tcc: Likewise. * include/tr1/poly_hermite.tcc: Likewise. * include/tr1/poly_laguerre.tcc: Likewise. * include/tr1/random.h: Likewise. * include/tr1/random.tcc: Likewise. * include/tr1/regex: Likewise. * include/tr1/riemann_zeta.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/special_function_util.h: Likewise. * include/tr1/tuple: Likewise. * include/tr1/type_traits: Likewise. * include/tr1/unordered_map.h: Likewise. * include/tr1/unordered_set.h: Likewise. * include/tr1/utility: Likewise. * include/tr2/bool_set: Likewise. * include/tr2/bool_set.tcc: Likewise. * include/tr2/dynamic_bitset: Likewise. * include/tr2/dynamic_bitset.tcc: Likewise. * include/tr2/ratio: Likewise. * include/tr2/type_traits: Likewise. * src/c++11/chrono.cc: Likewise. * src/c++11/compatibility-c++0x.cc: Likewise. * src/c++11/compatibility-chrono.cc: Likewise. * src/c++11/cxx11-shim_facets.cc: Likewise. * src/c++11/hashtable_c++0x.cc: Likewise. * src/c++11/placeholders.cc: Likewise. * src/c++11/thread.cc: Likewise. * src/c++98/bitmap_allocator.cc: Likewise. * src/c++98/hashtable_tr1.cc: Likewise. * src/c++98/list.cc: Likewise. * src/shared/hashtable-aux.cc: Likewise. * testsuite/20_util/duration/literals/range.cc: Adapt line number. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise. * testsuite/20_util/forward/c_neg.cc: Likewise. * testsuite/20_util/forward/f_neg.cc: Likewise. * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise. * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. * testsuite/26_numerics/random/pr60037-neg.cc: Likewise. * python/libstdcxx/v6/printers.py: Adapt. From-SVN: r250458
2017-07-23 10:41:35 +02:00
#if __cplusplus >= 201103L
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
#include <type_traits> // Brings in std::declval too.
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
/**
* @brief Forward an lvalue.
* @return The parameter cast to the specified type.
*
* This function is used to implement "perfect forwarding".
*/
template<typename _Tp>
_GLIBCXX_NODISCARD
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type& __t) noexcept
{ return static_cast<_Tp&&>(__t); }
/**
* @brief Forward an rvalue.
* @return The parameter cast to the specified type.
*
* This function is used to implement "perfect forwarding".
*/
template<typename _Tp>
_GLIBCXX_NODISCARD
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
{
static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"
" substituting _Tp must not be an lvalue reference type");
return static_cast<_Tp&&>(__t);
}
/**
* @brief Convert a value to an rvalue.
* @param __t A thing of arbitrary type.
* @return The parameter cast to an rvalue-reference to allow moving it.
*/
template<typename _Tp>
_GLIBCXX_NODISCARD
constexpr typename std::remove_reference<_Tp>::type&&
move(_Tp&& __t) noexcept
{ return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
template<typename _Tp>
struct __move_if_noexcept_cond
: public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
is_copy_constructible<_Tp>>::type { };
/**
* @brief Conditionally convert a value to an rvalue.
* @param __x A thing of arbitrary type.
* @return The parameter, possibly cast to an rvalue-reference.
*
* Same as std::move unless the type's move constructor could throw and the
* type is copyable, in which case an lvalue-reference is returned instead.
*/
template<typename _Tp>
_GLIBCXX_NODISCARD
constexpr typename
conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type
move_if_noexcept(_Tp& __x) noexcept
{ return std::move(__x); }
// declval, from type_traits.
#if __cplusplus > 201402L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2296. std::addressof should be constexpr
# define __cpp_lib_addressof_constexpr 201603
#endif
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
/**
* @brief Returns the actual address of the object or function
* referenced by r, even in the presence of an overloaded
* operator&.
* @param __r Reference to an object or function.
* @return The actual address.
*/
template<typename _Tp>
_GLIBCXX_NODISCARD
inline _GLIBCXX17_CONSTEXPR _Tp*
addressof(_Tp& __r) noexcept
[multiple changes] 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41792 * include/tr1_impl/array: Use std::__addressof. * include/std/functional (reference_wrapper): Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/array_allocator.h: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/stl_construct.h: Likewise. * include/bits/stl_tree.h: Likewise. * testsuite/20_util/reference_wrapper/41792.cc: New. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/vector/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/deque/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/list/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/map/requirements/ explicit_instantiation/4.cc: Likewise. * testsuite/23_containers/array/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. 2010-05-20 Peter Dimov <pdimov@pdimov.com> Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (__addressof, addressof): Add. * testsuite/util/testsuite_api.h (struct OverloadedAddress): Add. * testsuite/20_util/addressof/requirements/ explicit_instantiation.cc: New. * testsuite/20_util/addressof/1.cc: Likewise. From-SVN: r159643
2010-05-21 00:35:49 +02:00
{ return std::__addressof(__r); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2598. addressof works on temporaries
template<typename _Tp>
const _Tp* addressof(const _Tp&&) = delete;
Make streams movable and swappable. PR libstdc++/54316 PR libstdc++/53626 * config/abi/pre/gnu.ver: Add new exports. * config/io/basic_file_stdio.h (__basic_file): Support moving and swapping. * include/bits/basic_ios.h (basic_ios::move, basic_ios::swap): Likewise. * include/bits/ios_base.h (ios_base::_M_move, ios_base::_M_swap): Likewise. * include/bits/fstream.tcc (basic_filebuf): Likewise. * include/bits/move.h (__exchange): Define for C++11 mode. * include/ext/stdio_filebuf.h (stdio_filebuf): Support moving and swapping. * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf): Likewise. * include/std/fstream (basic_filebuf, basic_ifstream, basic_ofstream, basic_fstream): Likewise. * include/std/ios: Remove whitespace. * include/std/istream (basic_istream, basic_iostream): Support moving and swapping. * include/std/ostream (basic_ostream): Likewise. * include/std/sstream (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/streambuf (basic_streambuf): Do not default copy constructor and assignment on first declaration. * include/std/utility (exchange): Forward to __exchange. * testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New. * src/c++11/Makefile.am: Add stream-related files. * src/c++11/Makefile.in: Regenerate. * src/c++11/ext11-inst.cc (stdio_filebuf, stdio_sync_filebuf): New file for explicit instantiation definitions. * src/c++11/ios.cc: Move from src/c++98 to here. (ios_base::_M_move, ios_base::_M_swap): Define. * src/c++11/ios-inst.cc: Move from src/c++98 to here. * src/c++11/iostream-inst.cc: Likewise. * src/c++11/istream-inst.cc: Likewise. * src/c++11/ostream-inst.cc: Likewise. * src/c++11/sstream-inst.cc: Likewise. * src/c++11/streambuf-inst.cc: Likewise. * src/c++98/Makefile.am: Remove stream-related files. * src/c++98/Makefile.in: Regenerate. * src/c++98/ext-inst.cc (stdio_filebuf): Remove explicit instantiations. * src/c++98/misc-inst.cc (stdio_sync_filebuf): Likewise. * src/c++98/ios-inst.cc: Move to src/c++11/. * src/c++98/ios.cc: Move to src/c++11/. * src/c++98/iostream-inst.cc: Likewise. * src/c++98/istream-inst.cc: Likewise. * src/c++98/ostream-inst.cc: Likewise. * src/c++98/sstream-inst.cc: Likewise. * src/c++98/streambuf-inst.cc: Likewise. * testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New. * testsuite/27_io/basic_fstream/cons/move.cc: New. * testsuite/27_io/basic_fstream/assign/1.cc: New. * testsuite/27_io/basic_ifstream/cons/move.cc: New. * testsuite/27_io/basic_ifstream/assign/1.cc: New. * testsuite/27_io/basic_istringstream/assign/1.cc: New. * testsuite/27_io/basic_istringstream/cons/move.cc: New. * testsuite/27_io/basic_ofstream/cons/move.cc: New. * testsuite/27_io/basic_ofstream/assign/1.cc: New. * testsuite/27_io/basic_ostringstream/assign/1.cc: New. * testsuite/27_io/basic_ostringstream/cons/move.cc: New. * testsuite/27_io/basic_stringstream/assign/1.cc: New. * testsuite/27_io/basic_stringstream/cons/move.cc: New. From-SVN: r215463
2014-09-22 15:34:09 +02:00
// C++11 version of std::exchange for internal use.
template <typename _Tp, typename _Up = _Tp>
Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. Implement C++20 p1023 - constexpr comparison operators for std::array. * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy, copy_backward, copy_if, copy_n, equal_range, fill, find_end, find_if_not, includes, is_heap, is_heap_until, is_partitioned, is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound, none_of, partition_copy, partition_point, remove, remove_if, remove_copy, remove_copy_if, replace_copy, replace_copy_if, reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count, count_if, equal, find, find_first_of, find_if, for_each, generate, generate_n, lexicographical_compare, merge, mismatch, replace, replace_if, search, search_n, set_difference, set_intersection, set_symmetric_difference, set_union, transform, unique_copy): Mark constexpr. * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr. * include/bits/predefined_ops.h (_Iter_less_val::operator(), _Val_less_iter::operator(), _Iter_equal_to_iter::operator(), _Iter_equal_to_val::operator(), _Iter_equals_val::operator()): Use const ref instead of ref arg; (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter, __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val, _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val, _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter, _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter, __iter_comp_iter): Mark constexpr. * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n, __search, __search_n_aux, __search_n, __find_end, find_end, all_of, none_of, any_of, find_if_not, is_partitioned, partition_point, __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n, copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find, __unique, unique, __unique_copy, reverse_copy, rotate_copy, __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort, __final_insertion_sort, lower_bound, __upper_bound, upper_bound, __equal_range, equal_range, binary_search, __includes, includes, __next_permutation, __prev_permutation, __replace_copy_if, replace_copy, replace_copy_if, __count_if, is_sorted, __is_sorted_until, is_sorted_until, __is_permutation, is_permutation, for_each, find, find_if, find_first_of, adjacent_find, count, count_if, search, search_n, transform, replace, replace_if, generate, generate_n, unique_copy, __merge, merge, __set_union, set_union, __set_intersection, set_intersection, __set_difference, set_difference, __set_symmetric_difference, set_symmetric_difference): Mark constexpr. * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr wrappers around __builtin_memmove and __builtin_memcmp respectively; (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2, copy, move, __copy_move_b, __copy_move_backward_a, __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill, __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2, __lexicographical_compare_impl, __lexicographical_compare, __lexicographical_compare<true>::__lc, __lexicographical_compare_aux, __lower_bound, lower_bound, equal, __equal4, lexicographical_compare, __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until, is_heap): Mark constexpr. * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until, is_heap): Mark constexpr. * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr. * include/std/array: Make comparison ops constexpr. * include/std/utility: Make exchange constexpr. * include/std/version (__cpp_lib_constexpr_algorithms): New macro. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/ tuple_element_neg.cc: Adjust. * testsuite/20_util/exchange/constexpr.cc: New. * testsuite/23_containers/array/comparison_operators/constexpr.cc: New. * testsuite/25_algorithms/constexpr_macro.cc: New. * testsuite/25_algorithms/adjacent_find/constexpr.cc: New. * testsuite/25_algorithms/all_of/constexpr.cc: New. * testsuite/25_algorithms/any_of/constexpr.cc: New. * testsuite/25_algorithms/binary_search/constexpr.cc: New. * testsuite/25_algorithms/copy/constexpr.cc: New. * testsuite/25_algorithms/copy_backward/constexpr.cc: New. * testsuite/25_algorithms/copy_if/constexpr.cc: New. * testsuite/25_algorithms/copy_n/constexpr.cc: New. * testsuite/25_algorithms/count/constexpr.cc: New. * testsuite/25_algorithms/count_if/constexpr.cc: New. * testsuite/25_algorithms/equal/constexpr.cc: New. * testsuite/25_algorithms/equal_range/constexpr.cc: New. * testsuite/25_algorithms/fill/constexpr.cc: New. * testsuite/25_algorithms/fill_n/constexpr.cc: New. * testsuite/25_algorithms/find/constexpr.cc: New. * testsuite/25_algorithms/find_end/constexpr.cc: New. * testsuite/25_algorithms/find_first_of/constexpr.cc: New. * testsuite/25_algorithms/find_if/constexpr.cc: New. * testsuite/25_algorithms/find_if_not/constexpr.cc: New. * testsuite/25_algorithms/for_each/constexpr.cc: New. * testsuite/25_algorithms/generate/constexpr.cc: New. * testsuite/25_algorithms/generate_n/constexpr.cc: New. * testsuite/25_algorithms/is_heap/constexpr.cc: New. * testsuite/25_algorithms/is_heap_until/constexpr.cc: New. * testsuite/25_algorithms/is_partitioned/constexpr.cc: New. * testsuite/25_algorithms/is_permutation/constexpr.cc: New. * testsuite/25_algorithms/is_sorted/constexpr.cc: New. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New. * testsuite/25_algorithms/lower_bound/constexpr.cc: New. * testsuite/25_algorithms/merge/constexpr.cc: New. * testsuite/25_algorithms/mismatch/constexpr.cc: New. * testsuite/25_algorithms/none_of/constexpr.cc: New. * testsuite/25_algorithms/partition_copy/constexpr.cc: New. * testsuite/25_algorithms/partition_point/constexpr.cc: New. * testsuite/25_algorithms/remove/constexpr.cc: New. * testsuite/25_algorithms/remove_copy/constexpr.cc: New. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New. * testsuite/25_algorithms/remove_if/constexpr.cc: New. * testsuite/25_algorithms/replace_copy/constexpr.cc: New. * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New. * testsuite/25_algorithms/replace_if/constexpr.cc: New. * testsuite/25_algorithms/reverse_copy/constexpr.cc: New. * testsuite/25_algorithms/rotate_copy/constexpr.cc: New. * testsuite/25_algorithms/search/constexpr.cc: New. * testsuite/25_algorithms/search_n/constexpr.cc: New. * testsuite/25_algorithms/set_difference/constexpr.cc: New. * testsuite/25_algorithms/set_intersection/constexpr.cc: New. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New. * testsuite/25_algorithms/set_union/constexpr.cc: New. * testsuite/25_algorithms/transform/constexpr.cc: New. * testsuite/25_algorithms/unique/constexpr.cc: New. * testsuite/25_algorithms/unique_copy/constexpr.cc: New. * testsuite/25_algorithms/upper_bound/constexpr.cc: New. From-SVN: r273975
2019-08-01 17:25:42 +02:00
_GLIBCXX20_CONSTEXPR
Make streams movable and swappable. PR libstdc++/54316 PR libstdc++/53626 * config/abi/pre/gnu.ver: Add new exports. * config/io/basic_file_stdio.h (__basic_file): Support moving and swapping. * include/bits/basic_ios.h (basic_ios::move, basic_ios::swap): Likewise. * include/bits/ios_base.h (ios_base::_M_move, ios_base::_M_swap): Likewise. * include/bits/fstream.tcc (basic_filebuf): Likewise. * include/bits/move.h (__exchange): Define for C++11 mode. * include/ext/stdio_filebuf.h (stdio_filebuf): Support moving and swapping. * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf): Likewise. * include/std/fstream (basic_filebuf, basic_ifstream, basic_ofstream, basic_fstream): Likewise. * include/std/ios: Remove whitespace. * include/std/istream (basic_istream, basic_iostream): Support moving and swapping. * include/std/ostream (basic_ostream): Likewise. * include/std/sstream (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/streambuf (basic_streambuf): Do not default copy constructor and assignment on first declaration. * include/std/utility (exchange): Forward to __exchange. * testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New. * src/c++11/Makefile.am: Add stream-related files. * src/c++11/Makefile.in: Regenerate. * src/c++11/ext11-inst.cc (stdio_filebuf, stdio_sync_filebuf): New file for explicit instantiation definitions. * src/c++11/ios.cc: Move from src/c++98 to here. (ios_base::_M_move, ios_base::_M_swap): Define. * src/c++11/ios-inst.cc: Move from src/c++98 to here. * src/c++11/iostream-inst.cc: Likewise. * src/c++11/istream-inst.cc: Likewise. * src/c++11/ostream-inst.cc: Likewise. * src/c++11/sstream-inst.cc: Likewise. * src/c++11/streambuf-inst.cc: Likewise. * src/c++98/Makefile.am: Remove stream-related files. * src/c++98/Makefile.in: Regenerate. * src/c++98/ext-inst.cc (stdio_filebuf): Remove explicit instantiations. * src/c++98/misc-inst.cc (stdio_sync_filebuf): Likewise. * src/c++98/ios-inst.cc: Move to src/c++11/. * src/c++98/ios.cc: Move to src/c++11/. * src/c++98/iostream-inst.cc: Likewise. * src/c++98/istream-inst.cc: Likewise. * src/c++98/ostream-inst.cc: Likewise. * src/c++98/sstream-inst.cc: Likewise. * src/c++98/streambuf-inst.cc: Likewise. * testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New. * testsuite/27_io/basic_fstream/cons/move.cc: New. * testsuite/27_io/basic_fstream/assign/1.cc: New. * testsuite/27_io/basic_ifstream/cons/move.cc: New. * testsuite/27_io/basic_ifstream/assign/1.cc: New. * testsuite/27_io/basic_istringstream/assign/1.cc: New. * testsuite/27_io/basic_istringstream/cons/move.cc: New. * testsuite/27_io/basic_ofstream/cons/move.cc: New. * testsuite/27_io/basic_ofstream/assign/1.cc: New. * testsuite/27_io/basic_ostringstream/assign/1.cc: New. * testsuite/27_io/basic_ostringstream/cons/move.cc: New. * testsuite/27_io/basic_stringstream/assign/1.cc: New. * testsuite/27_io/basic_stringstream/cons/move.cc: New. From-SVN: r215463
2014-09-22 15:34:09 +02:00
inline _Tp
__exchange(_Tp& __obj, _Up&& __new_val)
{
_Tp __old_val = std::move(__obj);
__obj = std::forward<_Up>(__new_val);
return __old_val;
}
/// @} group utilities
#define _GLIBCXX_FWDREF(_Tp) _Tp&&
move.h (forward): Update to N3092. 2010-08-05 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (forward): Update to N3092. (identity): Remove (US 92 is NAD). * include/debug/set.h: Fix move constructor to simply use move. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/vector: Likewise. * include/debug/unordered_set: Likewise. * include/debug/deque: Likewise. * include/debug/map.h: Likewise. * include/debug/string: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * include/profile/set.h: Likewise. * include/profile/unordered_map: Likewise. * include/profile/multiset.h: Likewise. * include/profile/unordered_set: Likewise. * include/profile/vector: Likewise. * include/profile/deque: Likewise. * include/profile/map.h: Likewise. * include/profile/list: Likewise. * include/profile/multimap.h: Likewise. * include/ext/vstring.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/unordered_map.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/unordered_set.h: Likewise. * include/bits/stl_bvector.h: Likewise. * testsuite/20_util/identity/value.cc: Remove * testsuite/20_util/identity/requirements/typedefs.cc: Likewise. * testsuite/20_util/identity/requirements/explicit_instantiation.cc: Likewise. From-SVN: r162898
2010-08-05 09:34:08 +02:00
#define _GLIBCXX_MOVE(__val) std::move(__val)
#define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
#else
#define _GLIBCXX_FWDREF(_Tp) const _Tp&
move.h (forward): Update to N3092. 2010-08-05 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/move.h (forward): Update to N3092. (identity): Remove (US 92 is NAD). * include/debug/set.h: Fix move constructor to simply use move. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/vector: Likewise. * include/debug/unordered_set: Likewise. * include/debug/deque: Likewise. * include/debug/map.h: Likewise. * include/debug/string: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * include/profile/set.h: Likewise. * include/profile/unordered_map: Likewise. * include/profile/multiset.h: Likewise. * include/profile/unordered_set: Likewise. * include/profile/vector: Likewise. * include/profile/deque: Likewise. * include/profile/map.h: Likewise. * include/profile/list: Likewise. * include/profile/multimap.h: Likewise. * include/ext/vstring.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/unordered_map.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/unordered_set.h: Likewise. * include/bits/stl_bvector.h: Likewise. * testsuite/20_util/identity/value.cc: Remove * testsuite/20_util/identity/requirements/typedefs.cc: Likewise. * testsuite/20_util/identity/requirements/explicit_instantiation.cc: Likewise. From-SVN: r162898
2010-08-05 09:34:08 +02:00
#define _GLIBCXX_MOVE(__val) (__val)
#define _GLIBCXX_FORWARD(_Tp, __val) (__val)
#endif
/**
* @addtogroup utilities
* @{
*/
/**
* @brief Swaps two values.
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @return Nothing.
*/
template<typename _Tp>
Implement C++20 p0879 - Constexpr for swap and swap related functions. 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p0879 - Constexpr for swap and swap related functions. * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro. * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms): New macro. (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap) (prev_permutation, push_heap, reverse, rotate, sort_heap, swap) (swap_ranges, nth_element, partial_sort, sort): Add constexpr. * include/bits/move.h (swap): Add constexpr. * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse) (__gcd, __rotate, rotate, __partition, __heap_select) (__partial_sort_copy, partial_sort_copy, __unguarded_partition) (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort) (__introselect, __chunk_insertion_sort, next_permutation) (prev_permutation, partition, partial_sort, nth_element, sort) (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr. * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap) (swap_ranges): Add constexpr. * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap, __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Add constexpr. * include/std/type_traits (swap): Add constexpr. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr. * testsuite/25_algorithms/iter_swap/constexpr.cc: New test. * testsuite/25_algorithms/make_heap/constexpr.cc: New test. * testsuite/25_algorithms/next_permutation/constexpr.cc: New test. * testsuite/25_algorithms/nth_element/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test. * testsuite/25_algorithms/partition/constexpr.cc: New test. * testsuite/25_algorithms/pop_heap/constexpr.cc: New test. * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test. * testsuite/25_algorithms/push_heap/constexpr.cc: New test. * testsuite/25_algorithms/reverse/constexpr.cc: New test. * testsuite/25_algorithms/rotate/constexpr.cc: New test. * testsuite/25_algorithms/sort/constexpr.cc: New test. * testsuite/25_algorithms/sort_heap/constexpr.cc: New test. * testsuite/25_algorithms/swap/constexpr.cc: New test. * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test. From-SVN: r274488
2019-08-14 19:54:15 +02:00
_GLIBCXX20_CONSTEXPR
inline
#if __cplusplus >= 201103L
Implement LWG 2766, Swapping non-swappable types and LWG 2749, swappable traits for variants. * include/bits/move.h (swap(_Tp&, _Tp&)): Constrain with __is_tuple_like. * include/bits/stl_pair.h (swap(pair<_T1, _T2>&, pair<_T1, _T2>&)): Add a deleted overload. * include/bits/unique_ptr.h (swap(unique_ptr<_Tp, _Dp>&, unique_ptr<_Tp, _Dp>&)): Likewise. * include/std/array (swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&)): Likewise. * include/std/optional (swap(optional<_Tp>&, optional<_Tp>&)): Likewise. * include/std/tuple (__is_tuple_like_impl, __is_tuple_like): Move to type_traits. (swap(tuple<_Elements...>&, tuple<_Elements...>&)): Add a deleted overload. * include/std/type_traits (__is_tuple_like_impl, __is_tuple_like): New. (swap(_Tp&, _Tp&)): Constrain with __is_tuple_like. * include/std/utility (__is_tuple_like_impl): Move to type_traits. * include/std/variant (swap(variant<_Types...>&, variant<_Types...>&)): Add a deleted overload. * testsuite/20_util/optional/swap/2.cc: Add tests for disabled swaps. * testsuite/20_util/pair/swap_cxx17.cc: New. * testsuite/20_util/tuple/swap_cxx17.cc: Likewise. * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc: Likewise. * testsuite/20_util/variant/compile.cc: Add tests for disabled swaps. * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc: New. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Likewise. From-SVN: r243120
2016-12-01 17:23:21 +01:00
typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
is_move_constructible<_Tp>,
is_move_assignable<_Tp>>::value>::type
#else
void
#endif
swap(_Tp& __a, _Tp& __b)
_GLIBCXX_NOEXCEPT_IF(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
{
Add iterator concepts and range access customization points for C++20 This adds most of the new C++20 features to <iterator>, as well as a few initial pieces of <ranges> (but no actual <ranges> header just yet). * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/iterator_concepts.h: New header. (contiguous_iterator_tag, iter_reference_t, ranges::iter_move) (iter_rvalue_reference_t, incrementable_traits, iter_difference_t) (readable_traits, iter_value_t, readable, iter_common_reference_t) (writable, waekly_incrementable, incrementable) (input_or_output_iterator, sentinel_for, disable_sized_sentinel) (sized_sentinel_for, input_iterator, output_iterator) (forward_iterator, bidirectional_iterator, random_access_iterator) (contiguous_iterator, indirectly_unary_invocable) (indirectly_regular_unary_invocable, indirect_unary_predicate) (indirect_relation, indirect_strict_weak_order, indirect_result_t) (projected, indirectly_movable, indirectly_movable_storable) (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap) (indirectly_swappable, indirectly_comparable, permutable, mergeable) (sortable, unreachable_sentinel_t, unreachable_sentinel) (default_sentinel_t, default_sentinel): Define. (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator) (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator) (__detail::__cpp17_randacc_iterator): Define. (__iterator_traits): Define constrained specializations. * include/bits/move.h (move): Only use old concept check for C++98. * include/bits/range_access.h (ranges::disable_sized_range) (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define new customization points for C++20. (ranges::range, ranges::sized_range): Define new concepts for C++20. (ranges::advance, ranges::distance, ranges::next, ranges::prev): Define new functions for C++20. (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin) (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size) (__adl_empty): Remove. * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize for reverse_iterator. * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag): Define new struct for C++20. (iterator_traits<_Tp*>): Constrain partial specialization in C++20. * include/std/concepts (__is_class_or_enum): Move to __detail namespace. * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number. * testsuite/20_util/forward/f_neg.cc: Likewise. * testsuite/24_iterators/associated_types/incrementable.traits.cc: New test. * testsuite/24_iterators/associated_types/readable.traits.cc: New test. * testsuite/24_iterators/contiguous/concept.cc: New test. * testsuite/24_iterators/contiguous/tag.cc: New test. * testsuite/24_iterators/customization_points/iter_move.cc: New test. * testsuite/24_iterators/customization_points/iter_swap.cc: New test. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test. * testsuite/24_iterators/range_operations/advance.cc: New test. * testsuite/24_iterators/range_operations/distance.cc: New test. * testsuite/24_iterators/range_operations/next.cc: New test. * testsuite/24_iterators/range_operations/prev.cc: New test. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/2.cc: Rename types that conflict with C++20 concepts. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/experimental/iterator/requirements.cc: Likewise. * testsuite/std/ranges/access/begin.cc: New test. * testsuite/std/ranges/access/cbegin.cc: New test. * testsuite/std/ranges/access/cdata.cc: New test. * testsuite/std/ranges/access/cend.cc: New test. * testsuite/std/ranges/access/crbegin.cc: New test. * testsuite/std/ranges/access/crend.cc: New test. * testsuite/std/ranges/access/data.cc: New test. * testsuite/std/ranges/access/empty.cc: New test. * testsuite/std/ranges/access/end.cc: New test. * testsuite/std/ranges/access/rbegin.cc: New test. * testsuite/std/ranges/access/rend.cc: New test. * testsuite/std/ranges/access/size.cc: New test. * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper) (test_range, test_sized_range): New test utilities. From-SVN: r277579
2019-10-29 18:44:18 +01:00
#if __cplusplus < 201103L
// concept requirements
__glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
Add iterator concepts and range access customization points for C++20 This adds most of the new C++20 features to <iterator>, as well as a few initial pieces of <ranges> (but no actual <ranges> header just yet). * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/iterator_concepts.h: New header. (contiguous_iterator_tag, iter_reference_t, ranges::iter_move) (iter_rvalue_reference_t, incrementable_traits, iter_difference_t) (readable_traits, iter_value_t, readable, iter_common_reference_t) (writable, waekly_incrementable, incrementable) (input_or_output_iterator, sentinel_for, disable_sized_sentinel) (sized_sentinel_for, input_iterator, output_iterator) (forward_iterator, bidirectional_iterator, random_access_iterator) (contiguous_iterator, indirectly_unary_invocable) (indirectly_regular_unary_invocable, indirect_unary_predicate) (indirect_relation, indirect_strict_weak_order, indirect_result_t) (projected, indirectly_movable, indirectly_movable_storable) (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap) (indirectly_swappable, indirectly_comparable, permutable, mergeable) (sortable, unreachable_sentinel_t, unreachable_sentinel) (default_sentinel_t, default_sentinel): Define. (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator) (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator) (__detail::__cpp17_randacc_iterator): Define. (__iterator_traits): Define constrained specializations. * include/bits/move.h (move): Only use old concept check for C++98. * include/bits/range_access.h (ranges::disable_sized_range) (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define new customization points for C++20. (ranges::range, ranges::sized_range): Define new concepts for C++20. (ranges::advance, ranges::distance, ranges::next, ranges::prev): Define new functions for C++20. (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin) (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size) (__adl_empty): Remove. * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize for reverse_iterator. * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag): Define new struct for C++20. (iterator_traits<_Tp*>): Constrain partial specialization in C++20. * include/std/concepts (__is_class_or_enum): Move to __detail namespace. * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number. * testsuite/20_util/forward/f_neg.cc: Likewise. * testsuite/24_iterators/associated_types/incrementable.traits.cc: New test. * testsuite/24_iterators/associated_types/readable.traits.cc: New test. * testsuite/24_iterators/contiguous/concept.cc: New test. * testsuite/24_iterators/contiguous/tag.cc: New test. * testsuite/24_iterators/customization_points/iter_move.cc: New test. * testsuite/24_iterators/customization_points/iter_swap.cc: New test. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test. * testsuite/24_iterators/range_operations/advance.cc: New test. * testsuite/24_iterators/range_operations/distance.cc: New test. * testsuite/24_iterators/range_operations/next.cc: New test. * testsuite/24_iterators/range_operations/prev.cc: New test. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/2.cc: Rename types that conflict with C++20 concepts. * testsuite/26_numerics/adjacent_difference/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/26_numerics/partial_sum/requirements/ explicit_instantiation/pod.cc: Likewise. * testsuite/experimental/iterator/requirements.cc: Likewise. * testsuite/std/ranges/access/begin.cc: New test. * testsuite/std/ranges/access/cbegin.cc: New test. * testsuite/std/ranges/access/cdata.cc: New test. * testsuite/std/ranges/access/cend.cc: New test. * testsuite/std/ranges/access/crbegin.cc: New test. * testsuite/std/ranges/access/crend.cc: New test. * testsuite/std/ranges/access/data.cc: New test. * testsuite/std/ranges/access/empty.cc: New test. * testsuite/std/ranges/access/end.cc: New test. * testsuite/std/ranges/access/rbegin.cc: New test. * testsuite/std/ranges/access/rend.cc: New test. * testsuite/std/ranges/access/size.cc: New test. * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper) (test_range, test_sized_range): New test utilities. From-SVN: r277579
2019-10-29 18:44:18 +01:00
#endif
_Tp __tmp = _GLIBCXX_MOVE(__a);
__a = _GLIBCXX_MOVE(__b);
__b = _GLIBCXX_MOVE(__tmp);
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 809. std::swap should be overloaded for array types.
/// Swap the contents of two arrays.
template<typename _Tp, size_t _Nm>
Implement C++20 p0879 - Constexpr for swap and swap related functions. 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p0879 - Constexpr for swap and swap related functions. * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro. * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms): New macro. (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap) (prev_permutation, push_heap, reverse, rotate, sort_heap, swap) (swap_ranges, nth_element, partial_sort, sort): Add constexpr. * include/bits/move.h (swap): Add constexpr. * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse) (__gcd, __rotate, rotate, __partition, __heap_select) (__partial_sort_copy, partial_sort_copy, __unguarded_partition) (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort) (__introselect, __chunk_insertion_sort, next_permutation) (prev_permutation, partition, partial_sort, nth_element, sort) (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr. * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap) (swap_ranges): Add constexpr. * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap, __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Add constexpr. * include/std/type_traits (swap): Add constexpr. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr. * testsuite/25_algorithms/iter_swap/constexpr.cc: New test. * testsuite/25_algorithms/make_heap/constexpr.cc: New test. * testsuite/25_algorithms/next_permutation/constexpr.cc: New test. * testsuite/25_algorithms/nth_element/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test. * testsuite/25_algorithms/partition/constexpr.cc: New test. * testsuite/25_algorithms/pop_heap/constexpr.cc: New test. * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test. * testsuite/25_algorithms/push_heap/constexpr.cc: New test. * testsuite/25_algorithms/reverse/constexpr.cc: New test. * testsuite/25_algorithms/rotate/constexpr.cc: New test. * testsuite/25_algorithms/sort/constexpr.cc: New test. * testsuite/25_algorithms/sort_heap/constexpr.cc: New test. * testsuite/25_algorithms/swap/constexpr.cc: New test. * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test. From-SVN: r274488
2019-08-14 19:54:15 +02:00
_GLIBCXX20_CONSTEXPR
inline
#if __cplusplus >= 201103L
typename enable_if<__is_swappable<_Tp>::value>::type
#else
void
#endif
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
_GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Tp>::value)
{
for (size_t __n = 0; __n < _Nm; ++__n)
swap(__a[__n], __b[__n]);
}
/// @} group utilities
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _MOVE_H */