Marc Glisse
194571f10e
re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
...
2015-04-14 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/61347
* include/bits/stl_iterator_base_funcs.h (_List_iterator,
_List_const_iterator): Declare.
(__distance): Declare new overloads for _List_iterator and
_List_const_iterator.
* include/bits/stl_list.h (__distance): New overloads for
_List_iterator and _List_const_iterator.
* testsuite/23_containers/list/61347.cc: New testcase.
From-SVN: r222082
2015-04-14 11:02:48 +00:00
Jonathan Wakely
c3d71b62c6
shared_mutex (shared_timed_mutex): Only use pthread_rwlock_t when the POSIX Timeouts option is supported.
...
* include/std/shared_mutex (shared_timed_mutex): Only use
pthread_rwlock_t when the POSIX Timeouts option is supported.
* testsuite/30_threads/shared_lock/cons/5.cc: Remove
dg-require-gthreads-timed.
* testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
* testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
* testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
From-SVN: r221971
2015-04-10 10:00:00 +01:00
Jonathan Wakely
43b0e124e4
shared_mutex (shared_timed_mutex): Add comments to explain the logic in the non-pthread_rwlock_t version.
...
* include/std/shared_mutex (shared_timed_mutex): Add comments to
explain the logic in the non-pthread_rwlock_t version.
(_Mutex): Remove redundant type.
(_M_n_readers): Rename to _S_max_readers.
(_M_write_entered, _M_readers): New convenience functions.
(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
functions. Use predicates with condition variables. Simplify bitwise
operations.
(try_lock_for, try_shared_lock_for): Convert duration to time_point
and call try_lock_until or try_shared_lock_until respectively.
(try_lock_until, try_shared_lock_until): Wait on the condition
variables until the specified time passes.
(unlock): Add Debug Mode assertion.
(unlock_shared): Add Debug Mode assertion.
* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.
From-SVN: r221970
2015-04-10 09:59:54 +01:00
Jonathan Wakely
4cbaaa459e
re PR libstdc++/65147 (alignment of std::atomic object is not correct)
...
2015-04-09 Jonathan Wakely <jwakely@redhat.com>
Richard Henderson <rth@redhat.com>
PR libstdc++/65147
* include/bits/atomic_base.h (__atomic_base<_ITp>): Increase
alignment.
* include/std/atomic (atomic): For types with a power of two size set
alignment to at least the size.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/65147.cc: New.
* testsuite/29_atomics/atomic_integral/65147.cc: New.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r221945
2015-04-09 12:15:44 +01:00
Tim Shen
2894311302
re PR libstdc++/65420 (Enumerators in std::regex_constants should be constexpr variables instead)
...
PR libstdc++/65420
* include/bits/regex_constants.h: Use constexpr variables for flags.
* testsuite/28_regex/constants/constexpr.cc: New testcase.
From-SVN: r221750
2015-03-28 04:17:12 +00:00
Jonathan Wakely
04f69fda7a
re PR libstdc++/65499 (Missing "using namespace literals::chrono_literals" in std::chrono)
...
PR libstdc++/65499
* include/std/chrono: Add using-directive for literals to std::chrono.
* testsuite/20_util/duration/literals/65499.cc: New.
From-SVN: r221730
2015-03-27 12:45:10 +00:00
Jonathan Wakely
d1a74a287e
re PR libstdc++/58038 (std::this_thread::sleep_until can cause inifinite sleep)
...
PR libstdc++/58038
PR libstdc++/60421
* include/std/thread (this_thread::sleep_for): Check for negative
durations.
(this_thread::sleep_until): Check for times in the past.
* testsuite/30_threads/this_thread/58038.cc: New.
* testsuite/30_threads/this_thread/60421.cc: New.
From-SVN: r221708
2015-03-26 19:59:08 +00:00
Jonathan Wakely
4280698d09
re PR libstdc++/62259 (atomic class doesn't enforce required alignment on powerpc64)
...
PR libstdc++/62259
PR libstdc++/65147
* include/std/atomic (atomic<T>): Increase alignment for types with
the same size as one of the integral types.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/62259.cc: New.
From-SVN: r221703
2015-03-26 19:27:02 +00:00
Richard Henderson
8be568519b
re PR libstdc++/65033 (C++11 atomics: is_lock_free result does not always match the real lock-free property)
...
PR libstdc++/65033
* include/bits/atomic_base.h (__atomic_base<T>::is_lock_free): Build
a fake pointer indicating type alignment.
(__atomic_base<T *>::is_lock_free): Likewise.
* include/std/atomic (atomic<T>::is_lock_free): Likewise.
From-SVN: r221701
2015-03-26 11:31:11 -07:00
Paolo Carlini
ea348bbe59
re PR libstdc++/65543 (rvalue stream insertion and extraction operators incorrectly implemented)
...
2015-03-25 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/65543
* include/std/istream (operator>>(basic_istream<>&&, _Tp&): Revert
thinko in r150387.
* include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&):
Likewise.
* testsuite/27_io/rvalue_streams-2.cc: New.
From-SVN: r221655
2015-03-25 09:57:06 +00:00
Jonathan Wakely
df6d9c7f6a
c++config (__gnu_cxx::__cxx11): Define new namespace.
...
* include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace.
* include/ext/codecvt_specializations.h (encoding_state,
encoding_char_traits): Remove abi-tag and use inline namespace.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line.
From-SVN: r221533
2015-03-20 13:26:55 +00:00
Jason Merrill
7cb7357360
re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
...
PR c++/65046
Automatically propagate ABI tags to variables and functions
from their (return) type.
* class.c (check_tag): Handle variables and functions.
(mark_or_check_attr_tags): Split out from find_abi_tags_r.
(mark_or_check_tags): Likewise.
(mark_abi_tags): Use it. Rename from mark_type_abi_tags.
(check_abi_tags): Add single argument overload for decls.
Handle inheriting tags for decls.
* mangle.c (write_mangled_name): Call it.
(mangle_return_type_p): Split out from write_encoding.
(unmangled_name_p): Split out from write_mangled_name.
(write_mangled_name): Ignore abi_tag on namespace.
* cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
* parser.c (cp_parser_namespace_definition): Set it.
* name-lookup.c (handle_namespace_attrs): Use arguments. Warn
about abi_tag attribute on non-inline namespace.
* tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
(handle_abi_tag_attribute): Allow tags on variables.
From-SVN: r221521
2015-03-19 15:31:48 -04:00
Jonathan Wakely
168ad5f5e3
re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
...
PR c++/65046
* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs,
get_catalogs): Add abi-tag.
* include/ext/codecvt_specializations.h (encoding_state,
encoding_char_traits): Likewise.
* src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise.
* src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string,
numpunct_shim, collate_shim, time_get_shim, moneypunct_shim,
money_get_shim, money_put_shim, messages_shim): Likewise.
* src/c++11/future.cc (future_error_category::message): Likewise.
* src/c++11/system_error.cc (generic_error_category::message,
system_error_category::message): Likewise.
(__sso_string): Disable -Wabi-tag warnings.
From-SVN: r221497
2015-03-18 18:08:29 +00:00
Jonathan Wakely
5e0216f173
acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
...
2015-03-18 Jonathan Wakely <jwakely@redhat.com>
Torvald Riegel <triegel@redhat.com>
* acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/std/shared_mutex: Check _GLIBCXX_USE_PTHREAD_RWLOCK_T.
(shared_timed_mutex::_M_rwlock): Use PTHREAD_RWLOCK_INITIALIZER.
(shared_timed_mutex::lock_shared()): Retry on EAGAIN.
(shared_timed_mutex::try_lock_shared_until()): Retry on EAGAIN and
EDEADLK.
Co-Authored-By: Torvald Riegel <triegel@redhat.com>
From-SVN: r221484
2015-03-18 10:53:38 +00:00
Jonathan Wakely
e83a01c383
* include/experimental/system_error: Fix include guard.
...
From-SVN: r221417
2015-03-13 12:47:21 +00:00
Tim Shen
84839a5140
re PR libstdc++/64441 (A match_results returns an incorrect sub_match if the sub_match::matched is false)
...
PR libstdc++/64441
* include/bits/regex.h (match_results<>::size,
match_results<>::position, match_results<>::str,
match_results<>::operator[], match_results<>::prefix,
match_results<>::suffix, match_results<>::end,
match_results<>::_M_resize, match_results<>::_M_unmatched_sub,
match_results<>::_M_prefix, match_results<>::_M_suffix): Remove
global __unmatched_sub. Add unmatched submatch as part of
match_results.
* include/bits/regex.tcc (__regex_algo_impl<>, regex_replace<>,
regex_iterator<>::operator++): Adjust to use match_results::_M_prefix.
* testsuite/28_regex/match_results/out_of_range_submatches.cc:
New testcases.
From-SVN: r221330
2015-03-10 18:41:46 +00:00
Jonathan Wakely
664e99eac4
future (future_error(error_code)): Construct base class with error_code's message.
...
* include/std/future (future_error(error_code)): Construct base
class with error_code's message.
* src/c++11/future.cc (future_error::what()): Do not call c_str() on
temporary string.
From-SVN: r221236
2015-03-06 12:31:43 +00:00
Jonathan Wakely
9933260f2f
locale_conv.h (wstring_convert::_M_conv): Handle noconv result.
...
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
noconv result.
* testsuite/22_locale/conversions/string/2.cc: Also test UTF-8.
* testsuite/22_locale/conversions/string/3.cc: Likewise, and UTF-16.
From-SVN: r221212
2015-03-05 13:36:21 +00:00
Jonathan Wakely
b6584a72ac
re PR libstdc++/64797 (22_locale/conversions/string/2.cc FAILs)
...
PR libstdc++/64797
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
incomplete multibyte sequences correctly.
* include/std/codecvt (codecvt_utf8, codecvt_utf16,
codecvt_utf8_utf16): Limit _Maxcode to maximum Unicode code point.
* src/c++11/codecvt.cc (invalid_mb_sequence, incomplete_mb_character):
Define constants.
(is_high_surrogate, is_low_surrogate, surrogate_pair_to_code_point):
Define convenience functions.
(read_utf8_code_point): Return relevant constant to distinguish
incomplete characters from invalid sequences.
(read_utf16_code_point): Likewise. Check for invalid sequences.
(ucs4_in, utf16_in): Use incomplete_mb_character constant.
(utf16_out): Check for invalid sequences.
(utf16_span): Fix condition.
(ucs2_out): Use is_high_surrogate.
(ucs2_in): Use incomplete_mb_character constant and fix condition.
* testsuite/22_locale/codecvt/char16_t.cc: Fix whitespace.
* testsuite/22_locale/conversions/buffer/1.cc: New.
* testsuite/22_locale/conversions/string/2.cc: Use char16_t and
char32_t instead of wchar_t.
* testsuite/22_locale/conversions/string/3.cc: New.
From-SVN: r221189
2015-03-04 17:19:55 +00:00
Jonathan Wakely
9d8dbe732a
re PR libstdc++/65279 (std::scoped_allocator_adaptor is not assignable)
...
PR libstdc++/65279
* include/std/scoped_allocator (__inner_type_impl,
scoped_allocator_adaptor): Add defaulted copy assignment and move
assignment operators.
* testsuite/20_util/scoped_allocator/65279.cc: New.
From-SVN: r221119
2015-03-02 17:50:55 +00:00
Jonathan Wakely
e59a2e945e
re PR libstdc++/64367 (g++-v5/stdexcept:52:28: error: invalid use of non-static data member '_M_p')
...
PR libstdc++/64367
* include/std/stdexcept (__sso_string): Don't use non-static member
in sizeof.
From-SVN: r221118
2015-03-02 16:50:24 +00:00
Jonathan Wakely
87839f22d2
re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should return a forward iterator to first + (last - middle).)
...
PR libstdc++/58357
* include/bits/algorithmfwd.h (rotate): Move to inline namespace _V2.
* include/bits/stl_algo.h (__rotate, rotate): Likewise.
From-SVN: r220823
2015-02-19 20:57:40 +00:00
Jonathan Wakely
faa7d78e41
re PR libstdc++/65085 (Move-assigned empty string corrupt with -D_GLIBCXX_USE_CXX11_ABI=1)
...
PR libstdc++/65085
* include/bits/basic_string.h (basic_string(basic_string&&)): Ensure
empty string gets null-terminated.
* testsuite/21_strings/basic_string/cons/char/65085.cc: New.
From-SVN: r220758
2015-02-17 12:44:26 +00:00
Jonathan Wakely
13fc08e44e
re PR libstdc++/64883 (FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10)
...
PR libstdc++/64883
* include/c_global/cstdio (gets): Use __deprecated__ attribute instead
of deprecated.
* include/c_std/cstdio (gets): Likewise.
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Avoid clashing
with attributes used in darwin headers.
From-SVN: r220318
2015-02-01 15:11:08 +00:00
Jonathan Wakely
85d44192f6
atomic_base.h: Use __always_inline__ instead of always_inline.
...
* include/bits/atomic_base.h: Use __always_inline__ instead of
always_inline.
* include/bits/atomic_futex.h: Likewise.
* include/bits/c++config: Use __abi_tag__ instead of abi_tag.
* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Use
__packed__ instead of packed.
* include/std/shared_mutex: Use __unused__ instead of unused.
* testsuite/17_intro/headers/c++1998/all_attributes.cc: New.
* testsuite/17_intro/headers/c++200x/all_attributes.cc: New.
* testsuite/17_intro/headers/c++2014/all_attributes.cc: New.
From-SVN: r220243
2015-01-29 12:47:20 +00:00
Jonathan Wakely
506f03c370
re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
...
PR libstdc++/64368
* include/std/shared_mutex (shared_timed_mutex::try_lock_for,
shared_timed_mutex::try_lock_until): Only define when POSIX thread
timeouts option is supported.
(shared_timed_mutex::try_shared_lock_for,
shared_timed_mutex::try_shared_lock_until): Likewise.
From-SVN: r220161
2015-01-27 11:12:04 +00:00
Tim Shen
770acfc9e3
re PR libstdc++/64680 (basic_regex::operator= does not reset flags)
...
PR libstdc++/64680
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::operator=, basic_regex<>::imbue): Conform to the
standard interface.
* testsuite/28_regex/basic_regex/assign/char/cstring.cc: New testcase.
From-SVN: r219987
2015-01-22 05:07:03 +00:00
Tim Shen
77033d2668
re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
...
PR libstdc++/64649
* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
regex_traits<>::lookup_classname): Correctly narrow input chars.
* testsuite/28_regex/traits/wchar_t/user_defined.cc: New testcase.
From-SVN: r219986
2015-01-22 05:02:38 +00:00
Jonathan Wakely
4159cf0d22
re PR libstdc++/64650 (std::experimental::bad_optional_access is not default constructible)
...
PR libstdc++/64650
* include/experimental/optional (bad_optional_access): Add default
constructor.
* testsuite/experimental/optional/requirements.cc: Test for default
constructor.
From-SVN: r219889
2015-01-20 11:51:03 +00:00
Jonathan Wakely
91c78ea5b6
Implement N3657: heterogeneous lookup in associative containers.
...
* include/bits/stl_map.h (map::find<>, map::count<>,
map::lower_bound<>, map::upper_bound<>, map::equal_range<>): New
member function templates to perform heterogeneous lookup.
* include/bits/stl_multimap.h (multimap::find<>, multimap::count<>,
multimap::lower_bound<>, multimap::upper_bound<>,
multimap::equal_range<>): Likewise.
* include/bits/stl_multiset.h (multiset::find<>, multiset::count<>,
multiset::lower_bound<>, multiset::upper_bound<>,
multiset::equal_range<>): Likewise.
* include/bits/stl_set.h (set::find<>, set::count<>,
set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
* include/bits/stl_tree.h (_Rb_tree::_S_lower_bound_tr,
_Rb_tree::_S_upper_bound_tr, _Rb_tree::_M_find_tr,
_Rb_tree::_M_count_tr, _Rb_tree::_M_lower_bound_tr,
_Rb_tree::_M_upper_bound_tr, _Rb_tree::_M_equal_range_tr): Likewise.
* testsuite/23_containers/map/operations/2.cc: New.
* testsuite/23_containers/multimap/operations/2.cc: New.
* testsuite/23_containers/multiset/operations/2.cc: New.
* testsuite/23_containers/set/operations/2.cc: New.
From-SVN: r219888
2015-01-20 11:50:58 +00:00
Jonathan Wakely
71a16cd8bc
Add C++11 std::string constructors for locales and facets.
...
* config/abi/pre/gnu.ver: Export new constructors.
* include/bits/codecvt.h (codecvt_byname): Add string constructor.
(codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit
specializations and declare explicit instantiations.
* include/bits/locale_classes.h (locale, collate_byname): Add string
constructors.
* include/bits/locale_facets.h (ctype_byname, numpunct_byname):
Likewise.
* include/bits/locale_facets_nonio.h (time_get_byname,
time_put_byname, moneypunct_byname, messages_byname): Likewise.
* src/c++11/codecvt.cc (codecvt_byname<char16_t>,
codecvt_byname<char32_t>): Define explicit instantiations.
* src/c++11/locale-inst.cc (time_put_byname, codecvt_byname):
Instantiate string constructors.
(ctype_byname): Define string constructor.
* testsuite/22_locale/codecvt_byname/1.cc: New.
* testsuite/22_locale/collate_byname/1.cc: New.
* testsuite/22_locale/ctype_byname/2.cc: New.
* testsuite/22_locale/messages_byname/1.cc: New.
* testsuite/22_locale/moneypunct_byname/1.cc: New.
* testsuite/22_locale/numpunct_byname/1.cc: New.
From-SVN: r219887
2015-01-20 11:50:51 +00:00
Jonathan Wakely
0e4974d62e
re PR libstdc++/64658 (std::atomic_init() undefined)
...
PR libstdc++/64658
* include/std/atomic (atomic_init): Define.
* testsuite/29_atomics/atomic/64658.cc: New.
From-SVN: r219886
2015-01-20 11:50:43 +00:00
Tim Shen
e5f3553320
re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
...
PR libstdc++/64649
* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
regex_traits<>::lookup_classname): Support forward iterators.
* testsuite/28_regex/traits/char/lookup_classname.cc: New testcases.
* testsuite/28_regex/traits/char/lookup_collatename.cc: New testcase.
From-SVN: r219866
2015-01-19 23:00:13 +00:00
Tim Shen
60c176fb45
re PR libstdc++/64584 (basic_regex::assign breaks *this if it throws regex_error)
...
PR libstdc++/64584
PR libstdc++/64585
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::assign, basic_regex<>::imbue,
basic_regex<>::swap, basic_regex<>::mark_count): Drop NFA after
imbuing basic_regex; Make assign() transactional against exception.
* include/bits/regex_compiler.h (__compile_nfa<>): Add back
__compile_nfa SFINAE.
* include/std/regex: Adjust include order to avoid __compile_nfa
forward declaration.
* testsuite/28_regex/basic_regex/assign/char/string.cc: New testcase.
* testsuite/28_regex/basic_regex/imbue/string.cc: New testcase.
From-SVN: r219865
2015-01-19 22:56:04 +00:00
Ville Voutilainen
8bae22b708
range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR on overloads for arrays.
...
2015-01-19 Ville Voutilainen <ville.voutilainen@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
* include/bits/range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR
on overloads for arrays.
(cbegin, cend, rbegin, rend, crbegin, crend): New.
* testsuite/24_iterators/range_access_cpp14.cc: New.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r219846
2015-01-19 14:37:03 +00:00
Jonathan Wakely
257024e31e
re PR libstdc++/64646 (New overloads of std::is_permutation dereference past-the-end iterator)
...
PR libstdc++/64646
* include/bits/stl_algo.h (__is_permutation): Also test for reaching
end of the second range.
* testsuite/25_algorithms/is_permutation/64646.cc: New.
From-SVN: r219821
2015-01-18 16:31:06 +00:00
Jonathan Wakely
87361f3098
atomic_futex.h: Use mutex and condition_variable when atomic int is not lock-free.
...
* include/bits/atomic_futex.h: Use mutex and condition_variable when
atomic int is not lock-free. Make member variables private.
* src/c++11/futex.cc: Likewise.
From-SVN: r219815
2015-01-18 14:25:22 +00:00
Jonathan Wakely
c6c1bfd99b
re PR libstdc++/64638 (Build failure with recent futex changes in libstdc++, likely all non-gthreads targets)
...
PR libstdc++/64638
* include/bits/atomic_futex.h: Use appropriate config macros for
availability of std::mutex, std::condition and std::chrono.
From-SVN: r219799
2015-01-17 13:48:48 +00:00
Jonathan Wakely
1d0a12dc55
DR 488 PR libstdc++/58357
...
DR 488
PR libstdc++/58357
* include/bits/algorithmfwd.h (rotate): Return an iterator.
* include/bits/stl_algo.h (rotate, __rotate): Likewise.
* testsuite/25_algorithms/rotate/dr488.cc: New.
* testsuite/25_algorithms/rotate/check_type.cc: Adjust function type.
* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
2.cc: Likewise.
* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
pod.cc: Likewise.
From-SVN: r219793
2015-01-17 03:15:52 +00:00
Jonathan Wakely
d31b87976f
re PR libstdc++/60940 (general operations on atomic types do not work with atomic integral typedefs)
...
PR libstdc++/60940
* include/bits/atomic_base.h: Remove atomic integral typedefs as
synonyms for __atomic_base<int> etc.
* include/std/atomic: Make atomic_int a synonym for atomic<int> and
likewise for all atomic integral types.
* testsuite/29_atomics/atomic_integral/cons/copy_list.cc: New.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
From-SVN: r219790
2015-01-17 01:23:28 +00:00
Jonathan Wakely
3ecec1eff7
re PR libstdc++/56785 (std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements)
...
PR libstdc++/56785
* include/std/tuple (_Tuple_impl): Remove zero-element specialization
and define one-element specialization.
* testsuite/20_util/tuple/56785.cc: New.
From-SVN: r219785
2015-01-17 00:21:41 +00:00
Jonathan Wakely
96d8c147aa
locale_conv.h (wstring_convert, [...]): New.
...
* include/bits/locale_conv.h (wstring_convert, wbuffer_convert): New.
* include/std/locale: Include new header.
* include/Makefile.am: Add it.
* include/Makefile.in: Regenerate.
* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc: New.
* testsuite/22_locale/conversions/string/1.cc: New.
* testsuite/22_locale/conversions/string/2.cc: New.
* testsuite/22_locale/conversions/string/requirements/typedefs.cc: New.
* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
New.
From-SVN: r219780
2015-01-16 23:38:48 +00:00
Jonathan Wakely
28af1fb39d
Implement C++11 <codecvt> header.
...
* config/abi/pre/gnu.ver: Export new symbols.
* include/Makefile.am: Add codecvt.
* include/Makefile.in: Regenerate.
* include/std/codecvt: New header.
* src/c++11/codecvt.cc (__codecvt_utf8_base, __codecvt_utf16_base,
__codecvt_utf8_utf16_base): Define specializations.
* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: New.
* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc: New.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
New.
From-SVN: r219779
2015-01-16 23:38:35 +00:00
Torvald Riegel
eae801bacc
libstdc++: Optimize synchronization in std::future if futexes are available.
...
* src/c++11/futex.cc: New file.
* include/bits/atomic_futex.h: New file.
* include/std/future (__future_base::_State_baseV2): Use
atomic_futex_unsigned instead of mutex+condvar.
* src/c++11/futex.cc: Likewise.
* include/Makefile.am: Add atomic_futex.h.
* include/Makefile.in: Likewise.
* src/c++11/Makefile.am: Add futex.cc.
* src/c++11/Makefile.in: Likewise.
From-SVN: r219770
2015-01-16 19:50:43 +00:00
Jonathan Wakely
bb93f35da1
acinclude.m4: Fix typo in comment.
...
* acinclude.m4: Fix typo in comment.
* configure: Regenerate.
* include/bits/codecvt.h (codecvt<char16_t, char, mbstate_t>,
codecvt<char16_t, char, mbstate_t>): Declare specializations.
* include/bits/locale_facets.h: Reserve space for new specializations.
* src/c++11/Makefile.am: Add codecvt.cc.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/codecvt.cc: New.
* src/c++98/Makefile.am: Compile locale_init.cc and localename.cc
with -std=gnu++11.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/locale_init.cc: Initialize new codecvt specializations.
* src/c++98/localename.cc: Likewise.
* config/abi/pre/gnu.ver: Exports for new codecvt specializations.
* testsuite/22_locale/codecvt/utf8.cc: New.
* testsuite/22_locale/locale/cons/unicode.cc: Check that new
specializations are installed in locale objects.
From-SVN: r219747
2015-01-16 15:02:35 +00:00
Torvald Riegel
6220fdff17
libstdc++: Add POSIX variant of shared_timed_mutex.
...
* include/std/shared_mutex (shared_timed_mutex): Add POSIX-based
implementation.
From-SVN: r219737
2015-01-16 13:22:00 +00:00
Jonathan Wakely
0edf5aadea
re PR libstdc++/64476 (std::uninitialized_copy tests assignability the wrong way, resulting in performance pessimization)
...
PR libstdc++/64476
* include/bits/stl_uninitialized.h (uninitialized_copy): Fix
is_assignable arguments.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/64476.cc:
New.
From-SVN: r219398
2015-01-09 18:02:47 +00:00
Tim Shen
a8e67466d3
re PR libstdc++/64239 (regex_iterator::operator= should copy match_results::position)
...
PR libstdc++/64239
* include/bits/regex.h (match_results<>::swap): Use std::swap
instead of swap.
* include/bits/regex_compiler.tcc (_Compiler<>::_M_quantifier):
Likewise.
* testsuite/28_regex/match_results/swap.cc: New testcase.
From-SVN: r219373
2015-01-09 03:58:59 +00:00
Jonathan Wakely
c66b93fe20
re PR libstdc++/60132 (C++11: lack of is_trivially_copy_constructible)
...
PR libstdc++/60132
* include/std/type_traits (has_trivial_default_constructor,
has_trivial_copy_constructor, has_trivial_copy_assign): Add deprecated
attribute.
* testsuite/20_util/has_trivial_copy_assign/requirements/
explicit_instantiation.cc: Use -Wno-deprecated.
* testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
* testsuite/20_util/has_trivial_default_constructor/requirements/
explicit_instantiation.c: Likewise.
* testsuite/20_util/has_trivial_default_constructor/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/has_trivial_default_constructor/value.cc:
Likewise.
* testsuite/20_util/pair/requirements/dr801.cc: Replace deprecated
trait.
* testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
* testsuite/util/testsuite_common_types.h: Likewise.
From-SVN: r219350
2015-01-08 16:24:55 +00:00
Jonathan Wakely
ea0b599a91
* include/bits/hashtable_policy.h: Use __bool_constant.
...
From-SVN: r219343
2015-01-08 13:27:30 +00:00