Chip Salzenberg
d069a690ee
re PR libstdc++/54025 (atomic<chrono::duration> won't compile: chrono::duration::duration() is not C++11 compliant)
...
2012-07-20 Chip Salzenberg <chip@pobox.com>
Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/54025
* include/std/chrono (duration<>::duration): Fix per C++11.
* testsuite/20_util/duration/cons/54025.cc: New.
* testsuite/20_util/duration/cons/constexpr.cc: Adjust.
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
From-SVN: r189711
2012-07-20 09:48:57 +00:00
Paolo Carlini
d1870ff1bc
adl.cc: Add missing dg-requires.
...
2012-07-20 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/30_threads/thread/adl.cc: Add missing dg-requires.
From-SVN: r189709
2012-07-20 09:44:15 +00:00
Paolo Carlini
0e69fdf016
DR 1170 PR c++/51213
...
DR 1170
PR c++/51213
* semantics.c (perform_access_checks): Add complain parm, return bool.
(perform_deferred_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
(speculative_access_check): Remove.
* call.c (enforce_access): Add complain parm, return bool.
* decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
* search.c: Adjust callers.
* cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
(FNDECL_RECHECK_ACCESS_P): New macro.
* method.c (synthesized_method_walk): Stop deferring access checks.
* pt.c (recheck_decl_substitution): New.
(instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r189639
2012-07-18 21:36:50 -04:00
Paolo Carlini
f8b54112b5
re PR libstdc++/53872 ([C++11] ADL bug in std::thread)
...
2012-07-06 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.
From-SVN: r189329
2012-07-06 13:55:58 +00:00
Jonathan Wakely
7f426c93a7
re PR libstdc++/53830 (condition_variable_any - deadlock issue)
...
PR libstdc++/53830
* include/std/condition_variable (condition_variable_any::wait):
Move _Unlock type to class scope.
(condition_variable_any::wait_until): Reuse it.
* testsuite/30_threads/condition_variable_any/53830.cc: New.
From-SVN: r189268
2012-07-04 23:17:18 +01:00
Paolo Carlini
c128d2031e
re PR libstdc++/53840 ([C++11] DR 921. Rational Arithmetic should use template aliases)
...
2012-07-03 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53840
* include/std/ratio (ratio_multiply, ratio_divide, ratio_add,
ratio_subtract): Use template aliases.
* include/std/chrono (duration<>::duration(const duration<>&),
duration_cast): Adjust.
* testsuite/20_util/ratio/operations/53840.cc: New.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
From-SVN: r189239
2012-07-03 19:24:07 +00:00
Paolo Carlini
d695f91575
revert: re PR libstdc++/49561 ([C++0x] std::list::size complexity)
...
2012-07-02 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2011-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/49561
* include/bits/stl_list.h (_List_base<>::_List_impl::_M_size):
Add in C++0x mode.
(_List_base<>::_List_impl, _List_base<>::_M_get_node,
_List_base<>::_M_put_node, _List_base<>::_List_base(_List_base&&),
list<>::size, list<>::swap, list<>::splice): Use it.
(operator==(const list<>&, const list<>&)): Rewrite in C++0x mode.
* include/bits/list.tcc (list<>::erase): Likewise.
(list<>::merge): Adjust in C++0x mode.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* 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.
From-SVN: r189185
2012-07-03 00:47:17 +00:00
Benjamin Kosnik
e07b233d2e
c++config: Remove __regex nested namespace.
...
2012-06-27 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/c++config: Remove __regex nested namespace.
* include/bits/regex_compiler.h: Change __regex to
__detail. Adjust doxygen markup, add regex-details group.
* include/bits/regex_constants.h: Same.
* include/bits/regex_cursor.h: Same.
* include/bits/regex_error.h: Same.
* include/bits/regex_grep_matcher.h: Same.
* include/bits/regex_grep_matcher.tcc: Same.
* include/bits/regex_nfa.h: Same.
* include/bits/regex_nfa.tcc: Same.
* include/bits/regex.h: Same. Remove static from global constants.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers.
* include/bits/locale_classes.tcc: Add use_facet, has_facet to
locales group.
From-SVN: r189039
2012-06-28 07:50:34 +00:00
Benjamin Kosnik
511e47fc2f
02_match: To...
...
2012-06-24 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/28_regex/algorithms/02_match: To...
* testsuite/28_regex/algorithms/match: ...this.
* testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc: Remove
duplicate.
From-SVN: r188923
2012-06-25 06:01:13 +00:00
Jörg Sonnenberger
843f0d3c88
re PR libstdc++/53678 (namespace pollution on NetBSD)
...
2012-06-18 Jörg Sonnenberger <joerg@britannica.bec.de>
Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/53678
* config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U.
* testsuite/22_locale/ctype_base/53678.cc: New.
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
From-SVN: r188755
2012-06-18 22:43:58 +01:00
Jonathan Wakely
5c8dd62a1b
re PR libstdc++/53648 ([C++11] nested empty tuples)
...
PR libstdc++/53648
* include/std/tuple (__empty_not_final): Do not use EBO for tuples.
* testsuite/20_util/tuple/53648.cc: New.
* testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error line
number.
From-SVN: r188636
2012-06-14 23:07:33 +01:00
François Dumont
80a009e565
2012-05-29 François Dumont <fdumont@gcc.gnu.org>
...
* include/bits/stl_tempbuf.h (__uninitialized_construct_buf)
(__uninitialized_construct_buf_dispatch<>::__ucr): Fix to work
with iterator returning rvalue.
* testsuite/25_algorithms/stable_sort/3.cc: New.
From-SVN: r187985
2012-05-29 19:29:29 +00:00
Paolo Carlini
5d497b05fe
re PR c++/53503 ([C++0x] unexpected AST of kind ltgt_expr)
...
gcc/cp
2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53503
* semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
libstdc++-v3
2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53503
* testsuite/26_numerics/headers/cmath/53503.cc: New.
From-SVN: r187928
2012-05-28 12:09:01 +00:00
Paolo Carlini
d847ec803d
9780-2.cc: Avoid -Wall warnings.
...
2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/22_locale/num_put/put/char/9780-2.cc: Avoid -Wall warnings.
* testsuite/29_atomics/atomic/cons/49445.cc: Likewise.
* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
* Likewise.
* testsuite/23_containers/unordered_map/observers.cc: Likewise.
* testsuite/23_containers/unordered_map/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multimap/erase/2.cc: Likewise.
* testsuite/23_containers/unordered_multimap/insert/53115.cc: Likewise.
* testsuite/23_containers/unordered_multimap/observers.cc: Likewise.
* testsuite/23_containers/vector/debug/alloc_prop.cc: Likewise.
* testsuite/23_containers/unordered_set/observers.cc: Likewise.
* testsuite/23_containers/unordered_set/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
* testsuite/23_containers/unordered_multiset/erase/2.cc: Likewise.
* testsuite/23_containers/unordered_multiset/insert/53115.cc: Likewise.
* testsuite/23_containers/unordered_multiset/insert/multiset_range.cc:
* Likewise.
* testsuite/23_containers/unordered_multiset/observers.cc: Likewise.
From-SVN: r187751
2012-05-21 23:40:55 +00:00
Paolo Carlini
041f207220
re PR c++/53361 (Could not convert ‘{0, 0, 0}’ from ‘<brace-enclosed initializer list>’ to ‘std::array<unsigned int, 3ul>’)
...
2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53361
* testsuite/23_containers/array/cons/53361.cc: New.
From-SVN: r187746
2012-05-21 22:17:54 +00:00
Paolo Carlini
f330f5991e
re PR c++/44516 (improve error message when no matching operator)
...
gcc/cp
2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44516
* typeck.c (build_x_array_ref, build_x_conditional_expr,
build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
(finish_class_member_access_expr, build_x_indirect_ref,
build_x_binary_op, build_x_compound_expr_from_list,
build_x_compound_expr_from_vec): Adjust callers.
* tree.c (build_min_nt_loc): New.
(build_min_nt): Remove.
* typeck2.c (build_x_arrow): Adjust callers.
* pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
tsubst_copy_and_build): Likewise.
* semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
finish_omp_atomic): Likewise.
* decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
* parser.c (cp_parser_question_colon_clause,
cp_parser_assignment_expression, cp_parser_expression,
cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
* cp-tree.h: Update.
gcc/testsuite
2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44516
* g++.dg/parse/error48.C: New.
* g++.dg/template/crash89.C: Adjust dg-error line numbers.
* g++.old-deja/g++.robertl/eb109.C: Add column info to dg-error string.
libstdc++
2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44516
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust
dg-error line number.
From-SVN: r187627
2012-05-17 10:29:46 +00:00
Paolo Carlini
a2f6dee8a9
cons_overflow_neg.cc: Revert unintended commit.
...
2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Revert
unintended commit.
From-SVN: r187516
2012-05-15 10:03:00 +00:00
Paolo Carlini
5ac4e73a1d
re PR libstdc++/53339 (unordered_map::iterator requires Value to be complete type)
...
2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53339
* include/bits/hashtable_policy.h (__detail::_Identity,
__detail::_Select1st): Add.
(_Map_base, _Hashtable_base): Use the latter, adjust parameters.
* include/bits/hashtable.h (_Hashtable::__key_extract): Adjust.
* include/bits/unordered_set.h (__uset_hashtable, __umset_hashtable):
Likewise.
* include/bits/unordered_map.h (__umap_hashtable, __ummap_hashtable):
Likewise.
* include/bits/stl_function.h (_Identity, _Select1st, _Select2nd)
Unconditionally derive from unary_function.
* include/ext/functional (identity, select1st, select2nd): Remove
#ifdef __GXX_EXPERIMENTAL_CXX0X__ bits.
* testsuite/23_containers/unordered_map/requirements/53339.cc: New.
* testsuite/23_containers/unordered_multimap/requirements/
53339.cc: Likewise.
From-SVN: r187515
2012-05-15 10:00:19 +00:00
Benjamin Kosnik
d632488ae0
re PR libstdc++/44015 (template parameters not documented)
...
2012-05-02 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/44015
* include/bits/basic_ios.h: Add tparam markup for
* doxygen. include/bits/basic_string.h: Same.
* include/bits/forward_list.h: Same.
* include/bits/stl_bvector.h: Same.
* include/bits/stl_deque.h: Same.
* include/bits/stl_list.h: Same. include/bits/stl_map.h:
* Same. include/bits/stl_multimap.h: Same.
* include/bits/stl_multiset.h: Same.
* include/bits/stl_pair.h: Same.
* include/bits/stl_queue.h: Same.
* include/bits/stl_set.h: Same.
* include/bits/stl_stack.h: Same.
* include/bits/stl_vector.h: Same.
* include/bits/unordered_map.h: Same.
* include/bits/unordered_set.h: Same. include/std/array:
* Same. include/std/atomic: Same. include/std/fstream:
* Same. include/std/istream: Same. include/std/ostream:
* Same. include/std/sstream: Same.
* include/std/streambuf: Same.
* testsuite/23_containers/deque/requirements/dr438/*:
Adjust line numbers.
* testsuite/23_containers/list/requirements/dr438/*: Same.
* testsuite/23_containers/vector/requirements/dr438/*: Same.
From-SVN: r187066
2012-05-02 22:25:28 +00:00
François Dumont
b7a9facb2c
re PR libstdc++/53115 (_Hashtable::_M_rehash_aux(false_type) is broken)
...
2012-05-01 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/53115
* include/bits/hashtable.h
(_Hashtable<>::_M_rehash_aux(size_type, false_type)): Fix buckets
after insertion of several equivalent elements.
* testsuite/23_containers/unordered_multiset/insert/53115.cc: New.
* testsuite/23_containers/unordered_multimap/insert/53115.cc: New.
From-SVN: r187025
2012-05-01 20:29:16 +00:00
Marc Glisse
cf48c25519
re PR libstdc++/51795 (linear_congruential_engine doesn't work correctly)
...
2012-04-29 Marc Glisse <marc.glisse@inria.fr>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51795
* include/bits/stl_algobase.h (__lg<>(_Size)): Remove.
(__lg(int), __lg(unsigned), __lg(long), __lg(unsigned long),
__lg(long long), __lg(unsigned long long)): Define constexpr.
* include/bits/random.h (_Mod<>): Overcome Schrage's algorithm
limitations.
(__mod): Adjust.
(linear_congruential): Remove FIXME static_assert.
* include/bits/random.tcc (_Mod<>): Adjust.
* testsuite/26_numerics/random/linear_congruential_engine/operators/
51795.cc: New.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r186948
2012-04-29 23:36:09 +00:00
Jonathan Wakely
143a1ce16c
functional (function::function(F)): LWG 2132: Disable constructor if argument isn't callable.
...
* include/std/functional (function::function(F)): LWG 2132: Disable
constructor if argument isn't callable.
* testsuite/20_util/function/cons/callable.cc: New.
From-SVN: r186947
2012-04-29 23:59:37 +01:00
Benjamin Kosnik
6d0f7cacc0
re PR libstdc++/52689 (static linking with libstdc++ fails)
...
2012-04-25 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/52689
* testsuite/17_intro/static.cc: Fix.
* testsuite/lib/dg-options.exp (dg-require-static-libstdcxx): New.
From-SVN: r186845
2012-04-25 22:47:52 +00:00
Jonathan Wakely
862023d77a
scoped_allocator (scoped_allocator::__outermost): Do not pass non-POD to varargs function.
...
* include/std/scoped_allocator (scoped_allocator::__outermost): Do
not pass non-POD to varargs function.
* testsuite/20_util/scoped_allocator/1.cc: Fix test.
From-SVN: r186836
2012-04-25 19:03:03 +01:00
Benjamin Kosnik
3b34ddb8e0
re PR libstdc++/52689 (static linking with libstdc++ fails)
...
2012-04-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/52689
* testsuite/17_intro/static.cc: New.
From-SVN: r186794
2012-04-25 01:17:57 +00:00
Daniel Krugler
62fa805ffa
type_traits (is_nothrow_destructible): Implement.
...
2012-04-23 Daniel Krugler <daniel.kruegler@googlemail.com>
* include/std/type_traits (is_nothrow_destructible): Implement.
(is_destructible): Implement LWG 2049.
* testsuite/util/testsuite_tr1.h: Add tests.
* testsuite/20_util/is_nothrow_destructible/value.cc: New.
* testsuite/20_util/is_nothrow_destructible/requirements/typedefs.cc:
* testsuite/20_util/is_nothrow_destructible/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_destructible/value.cc: Adjust and extend.
* testsuite/20_util/is_default_constructible/value.cc: Tweak.
* testsuite/20_util/is_constructible/value-2.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
From-SVN: r186726
2012-04-23 21:34:06 +00:00
Paolo Carlini
9771644a91
re PR libstdc++/53080 (tuple interface to std::array doesn't check bounds)
...
2012-04-23 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53080
* include/std/array (tuple_element, get): static_assert I < N.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
New.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/tuple_element.cc: Fix.
From-SVN: r186702
2012-04-23 12:26:43 +00:00
Chris Jefferson
ff5be0e34e
re PR testsuite/53046 (New libstdc++ test failures)
...
2012-04-23 Chris Jefferson <chris@bubblescope.net>
PR testsuite/53046
* testsuite/25_algorithms/stable_partition/mem_check.cc: Fix size
of array A.
* testsuite/25_algorithms/stable_sort/mem_check.cc: Likewise.
From-SVN: r186701
2012-04-23 11:17:28 +00:00
Paolo Carlini
970aa0b9a9
re PR c++/53067 (c++0x GCC 4.7.0 Regression std::ref with unordered sets)
...
2012-04-22 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53067
* include/bits/hashtable_policy.h: Change inheritances to public.
* testsuite/23_containers/unordered_map/requirements/53067.cc: New.
* testsuite/23_containers/unordered_set/requirements/53067.cc: Likewise.
From-SVN: r186676
2012-04-22 17:37:57 +00:00
Jonathan Wakely
fcf6e948d1
ptr_traits.h (pointer_traits::rebind): Make public.
...
* include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
* testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
rebind works.
From-SVN: r186670
2012-04-22 14:42:38 +01:00
Jonathan Wakely
7c688aded4
forward_list (forward_list::splice_after): Check allocators are equal.
...
* include/debug/forward_list (forward_list::splice_after): Check
allocators are equal.
* src/c++11/debug.cc: Fix spelling.
* testsuite/23_containers/forward_list/debug/splice_after5_neg.cc:
New.
* testsuite/23_containers/forward_list/debug/splice_after6_neg.cc:
Likewise.
* testsuite/23_containers/forward_list/debug/splice_after7_neg.cc:
Likewise.
From-SVN: r186669
2012-04-22 14:27:16 +01:00
Paolo Carlini
aa5889c373
re PR libstdc++/53052 ([C++11] is_explicitly_convertible still part of <type_traits> header)
...
2012-04-20 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53052
* include/std/type_traits (is_explicitly_convertible): Remove.
* testsuite/20_util/is_explicitly_convertible: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adjust dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
From-SVN: r186618
2012-04-20 09:39:29 +00:00
Paolo Carlini
b4989a1af9
re PR libstdc++/53052 ([C++11] is_explicitly_convertible still part of <type_traits> header)
...
2012-04-20 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53052
* include/std/type_traits (is_explicitly_convertible): Remove.
* testsuite/20_util/is_explicitly_convertible: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adjust dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
From-SVN: r186617
2012-04-20 09:39:17 +00:00
Benjamin Kosnik
ac9ce934ed
808590.cc: New.
...
2012-04-17 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
808590.cc: New.
From-SVN: r186539
2012-04-17 16:41:40 +00:00
Rainer Orth
332781bba5
Fix merging default libstdc++.log
...
* testsuite/util/testsuite_abi.cc (compare_symbols): Change
summary header to avoid confusion with DejaGnu header.
From-SVN: r186524
2012-04-17 10:21:25 +00:00
Paolo Carlini
6a9ecd3492
re PR libstdc++/52702 ([C++11] std::is_trivially_destructible is missing)
...
2012-04-15 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/52702
* include/std/type_traits (is_trivially_destructible): Add.
(has_trivial_destructor): Remove.
* testsuite/util/testsuite_common_types.h: Adjust.
* testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
* testsuite/20_util/pair/requirements/dr801.cc: Likewise.
* testsuite/20_util/is_trivially_destructible/value.cc: New.
* testsuite/20_util/is_trivially_destructible/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/is_trivially_destructible/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adjust dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
From-SVN: r186474
2012-04-15 23:35:27 +00:00
Paolo Carlini
6a9218cc9c
51083.cc: Move...
...
2012-04-13 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/26_numerics/cmath/51083.cc: Move...
* testsuite/26_numerics/headers/cmath/51083.cc: ... here.
From-SVN: r186445
2012-04-14 01:34:00 +00:00
Paolo Carlini
079c74f3fc
safe_iterator.h (_BeforeBeginHelper<>:: _S_Is_Beginnest): Add.
...
2012-04-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/safe_iterator.h (_BeforeBeginHelper<>::
_S_Is_Beginnest): Add.
* include/debug/forward_list (_BeforeBeginHelper<>::
_S_Is_Beginnest): Likewise.
(_Safe_iterator<>::_M_is_beginnest): Add.
* include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_valid_range):
Use the latter.
* testsuite/23_containers/forward_list/debug/splice_after.cc:
Add test.
From-SVN: r186411
2012-04-13 10:43:28 +00:00
Benjamin Kosnik
4dad8b49ee
unordered_map.h (__unordered_map): Remove.
...
2012-04-12 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/unordered_map.h (__unordered_map): Remove.
(__unordered_multimap): Remove.
Add aliases for __umap_traits, __umap_hashtable, __ummap_traits,
__ummap_hashtable.
(unordered_map): Derive from __umap_hashtable.
(unordered_multimap): Derive from __ummap_hashtable.
* include/bits/unordered_set.h (__unordered_set): Remove.
(__unordered_multiset): Remove.
Add aliases for __uset_traits, __uset_hashtable, __umset_traits,
__umset_hashtable.
(unordered_set): Derive from __uset_hashtable.
(unordered_multiset): Derive from __umset_hashtable.
* include/bits/hashtable.h (__cache_default): New, consolidated
cache defaults for _Hashtable. Adjust comments for doxygen.
(_Hashtable): Consolidate bool template parameters into new,
_Traits class. Inherited base classes synthesize _Hashtable in
CRTP via original 10 parameters. Prefer using declarations to
typedefs, add __node_type, __bucket_type, etc. Push many nested
types down hierarchy to _Hashtable_base. Add constructors
necessary for top-level unordered_containers. Consolidate insert
member functions and logic in new base class, __detail::_Insert
and __detail::_Insert_base.
(_Hashtable::operator=(initializer_list)): Add.
* include/bits/hashtable_policy.h: Convert to doxygen markup.
(_Hashtable_traits) New. Consolidate bool template parameters here.
(_Insert, _Insert_base): New, consolidated insert member functions.
(_Map_base, _Equality, _Rehash_base): Adjust template parameters,
use base types.
(_Hashtable_base): Move type declarations useful to other base
classes into this class.
* python/libstdcxx/v6/printers.py (Tr1HashtableIterator): Update.
* testsuite/23_containers/unordered_set/instantiation_neg.cc:
Adjust traits, line numbers.
From-SVN: r186403
2012-04-13 00:33:10 +00:00
Jeffrey Yasskin
2fc9b37dd0
Fix PR52822 (stable_partition move-assigns object to itself) by scanning for...
...
Fix PR52822 (stable_partition move-assigns object to itself) by
scanning for the first value that doesn't match the predicate before
starting to rearrange values.
2012-04-03 Jeffrey Yasskin <jyasskin@google.com>
PR libstdc++/52822
* include/bits/stl_algo.h (__find_if_not): Expose in
C++98 mode.
(__find_if_not_n): Like __find_if_not, but works on and updates a
counted range instead of a bounded range.
(stable_partition): Guarantee !__pred(*__first) in call to
__stable_partition_adaptive() or __inplace_stable_partition().
(__stable_partition_adaptive): Use new precondition to avoid
moving/copying objects onto themselves. Guarantee new
precondition to recursive calls.
(__inplace_stable_partition): Use new precondition to simplify
base case, remove __last parameter. Guarantee new precondition to
recursive calls.
* testsuite/25_algorithms/stable_partition/moveable.cc (test02):
Test a sequence that starts with a value matching the predicate.
* testsuite/25_algorithms/stable_partition/pr52822.cc:
Test vectors, which have a destructive self-move-assignment.
From-SVN: r186391
2012-04-12 20:59:09 +00:00
Andreas Schwab
a2547fd0d6
Makefile.am (check_DEJAGNUnormal0): Run prettyprinters.exp.
...
* testsuite/Makefile.am (check_DEJAGNUnormal0): Run
prettyprinters.exp.
* testsuite/Makefile.in: Regenerated.
From-SVN: r186389
2012-04-12 20:20:01 +00:00
Paolo Carlini
b9b0921497
re PR libstdc++/52942 (using std::ref with a std::unordered_map fails to compile)
...
2012-04-12 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/52942
* include/bits/stl_function.h (_Identity, _Select1st, _Select2nd):
In C++11 mode do not derive from std::unary_function.
* include/ext/functional (identity, select1st, select2nd): Adjust.
* testsuite/23_containers/unordered_map/requirements/52942.cc: New.
* testsuite/23_containers/unordered_set/requirements/52942.cc: Likewise.
From-SVN: r186375
2012-04-12 12:18:06 +00:00
Jonathan Wakely
a00cc15e3d
re PR c++/52924 (Using an std::function object as deleter of shared_ptr in C++0x mode does not compile)
...
PR libstdc++/52924
* include/bits/shared_ptr_base.h (_Sp_counted_deleter): Add
user-defined destructor.
(_Sp_counted_inplace): Likewise.
* testsuite/20_util/shared_ptr/cons/52924.cc: New.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error
line numbers.
From-SVN: r186363
2012-04-11 23:54:53 +01:00
Jonathan Wakely
6cc5558fe8
* testsuite/performance/30_threads/future/polling.cc: Adjust.
...
From-SVN: r186354
2012-04-11 21:31:06 +01:00
Paolo Carlini
7826329699
forward_list.h (splice_after(const_iterator, forward_list&), [...]): Add per C++11 as published (and LWG 1310).
...
2012-04-11 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (splice_after(const_iterator,
forward_list&), splice_after(const_iterator, forward_list&,
consst_iterator), splice_after(const_iterator, forward_list&,
const_iterator, const_iterator), merge(forward_list&),
merge(forward_list&, _Comp)): Add per C++11 as published (and
LWG 1310).
* include/debug/forward_list: Adjust.
* include/bits/forward_list.h (splice_after(const_iterator,
forward_list&&, const_iterator)): Only declare.
(_M_transfer_after): Remove.
(_M_splice_after(const_iterator, forward_list&&)): Change signature.
(splice_after(const_iterator, forward_list&&, const_iterator,
const_iterator)): Use the latter.
* include/bits/forward_list.tcc (splice_after(const_iterator,
forward_list&&, const_iterator)): Define here.
(_M_splice_after): Define, use throughout.
* include/bits/forward_list.h (insert_after(const_iterator,
std::initializer_list<_Tp>)): Forward to insert_after(const_iterator,
_InputIterator, _InputIterator).
* include/bits/forward_list.tcc: Remove definition.
* testsuite/23_containers/forward_list/modifiers/6.cc: New.
* testsuite/23_containers/forward_list/operations/1.cc: Adjust.
From-SVN: r186338
2012-04-11 17:31:57 +00:00
Paolo Carlini
b16212bd3c
re PR libstdc++/52931 (std::hash shouldn't be defined for unknown types)
...
2012-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/52931
* include/bits/functional_hash.h (struct hash): Remove definition.
* testsuite/20_util/hash/52931.cc: New.
From-SVN: r186310
2012-04-11 11:27:50 +00:00
Manuel López-Ibáñez
9fec00429d
re PR c++/24985 (caret diagnostics)
...
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 24985
gcc/
* diagnostic.h (show_caret): Declare.
(caret_max_width): Declare.
(diagnostic_show_locus): Declare.
* diagnostic.c (diagnostic_initialize): Initialize to false.
(diagnostic_show_locus): New.
(diagnostic_report_diagnostic): Call it.
(getenv_columns): New.
(adjust_line): New.
(diagnostic_set_caret_max_width): New.
* input.c (read_line): New.
(location_get_source_line): New.
* input.h (location_get_source_line): Declare.
* toplev.c (general_init): Initialize show_caret from options.
* dwarf2out.c (gen_producer_string): Handle fdiagnostics-show-caret.
* opts.c (common_handle_option): Likewise.
* pretty-print.h (pp_get_prefix): New.
(pp_base_get_prefix): New.
* common.opt (fdiagnostics-show-caret): New option.
* doc/invoke.texi (fdiagnostics-show-caret): Document it.
testsuite/
* lib/prune.exp: Add -fno-diagnostics-show-caret.
libstdc++-v3/
* testsuite/lib/prune.exp: Handle caret.
libmudflap/
* testsuite/lib/libmudflap.exp: Handle caret.
From-SVN: r186305
2012-04-11 09:26:48 +00:00
Jonathan Wakely
ea2c1a6d67
re PR libstdc++/52591 ([C++0x] [4.7 Regression] moving std::vector relies on movable elements)
...
PR libstdc++/52591
* include/bits/stl_vector.h (vector::operator=(vector&&)): Dispatch
to _M_move_assign depending on whether allocator is moved.
(vector::_M_move_assign): Add overloaded functions.
* testsuite/23_containers/vector/52591.cc: New.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
From-SVN: r186057
2012-04-01 23:04:54 +01:00
Jonathan Wakely
181c9de2a6
functional (__callable_functor): Overload for volatile-qualified pointers.
...
* include/std/functional (__callable_functor): Overload for
volatile-qualified pointers.
* testsuite/20_util/function/10.cc: New.
From-SVN: r186055
2012-04-01 18:10:57 +01:00
Jeffrey Yasskin
195940adc0
re PR libstdc++/52799 (deque::emplace(iterator, ...) tries to call push_front(...), which doesn't exist)
...
2012-03-30 Jeffrey Yasskin <jyasskin@gcc.gnu.org>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/52799
* include/bits/deque.tcc (emplace): Fix thinko, replace push_front
-> emplace_front, and likewise for *_back.
* testsuite/23_containers/deque/modifiers/emplace/52799.cc: New.
* testsuite/23_containers/list/modifiers/emplace/52799.cc: Likewise.
* testsuite/23_containers/vector/modifiers/emplace/52799.cc: Likewise.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r186035
2012-03-31 01:56:55 +00:00