Ville Voutilainen
dbc6221fe5
Support allocators in tuples of zero size.
...
* include/std/tuple (tuple<>::tuple(),
tuple<>::tuple(allocator_arg_t, const _Alloc&),
tuple<>::tuple(allocator_arg_t, const _Alloc&, const tuple&)): New.
* testsuite/20_util/tuple/cons/allocators.cc: Adjust.
From-SVN: r237143
2016-06-06 19:28:59 +03:00
Jonathan Wakely
94229fb6dc
libstdc++/71320 Add or remove file permissions correctly
...
PR libstdc++/71320
* src/filesystem/ops.cc (permissions(const path&, perms, error_code&)):
Add or remove permissions according to perms argument.
* testsuite/experimental/filesystem/operations/permissions.cc: New
test.
From-SVN: r237136
2016-06-06 16:50:01 +01:00
Ville Voutilainen
7a66745357
Protect allocator-overloads of tuple-from-tuple constructors from cases that would create dangling references.
...
Protect allocator-overloads of tuple-from-tuple constructors
from cases that would create dangling references.
* include/std/tuple (tuple(allocator_arg_t, const _Alloc&,
const tuple<_UElements...>&), tuple(allocator_arg_t, const _Alloc&,
tuple<_UElements...>&&)): Add a check for _NonNestedTuple.
* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Adjust.
From-SVN: r237106
2016-06-05 20:39:10 +03:00
Ville Voutilainen
b702100693
re PR libstdc++/66338 (std::forward_as_tuple() issue with single argument)
...
2016-05-24 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/66338
* include/std/tuple (_TMC): Add a check for _NotSameTuple.
* include/std/tuple (tuple(_UElements&&...)): Remove the separate
check for _NotSameTuple.
* include/std/tuple (_TMCT): New.
* include/std/tuple (tuple(const tuple<_UElements...>&)): Use it.
* include/std/tuple (tuple(tuple<_UElements...>&&)): Likewise.
* include/std/tuple (tuple(allocator_arg_t, const _Alloc&,
const tuple<_UElements...>&)): Likewise.
* include/std/tuple (tuple(allocator_arg_t, const _Alloc&,
tuple<_UElements...>&&)): Likewise.
* testsuite/20_util/tuple/cons/66338.cc: New.
From-SVN: r236822
2016-05-27 17:08:37 +03:00
François Dumont
732eb07625
c++config (_GLIBCXX14_USE_CONSTEXPR): New.
...
2016-05-24 François Dumont <fdumont@gcc.gnu.org>
* include/bits/c++config (_GLIBCXX14_USE_CONSTEXPR): New.
* include/bits/hashtable_policy.h
(_Prime_rehash_policy::__has_load_factor): New. Mark rehash policy
having load factor management.
(_Mask_range_hashing): New.
(__clp2): New.
(_Power2_rehash_policy): New.
(_Inserts<>): Remove last template parameter, _Unique_keys, so that
partial specializations only depend on whether iterators are constant
or not.
* testsuite/23_containers/unordered_set/hash_policy/26132.cc: Adapt to
test new hash policy.
* testsuite/23_containers/unordered_set/hash_policy/load_factor.cc:
Likewise.
* testsuite/23_containers/unordered_set/hash_policy/rehash.cc:
Likewise.
* testsuite/23_containers/unordered_set/insert/hash_policy.cc:
Likewise.
* testsuite/23_containers/unordered_set/max_load_factor/robustness.cc:
Likewise.
* testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
New.
* testsuite/performance/23_containers/insert/54075.cc: Add benchmark
using the new hash policy.
* testsuite/performance/23_containers/insert_erase/41975.cc: Likewise.
From-SVN: r236669
2016-05-24 20:55:57 +00:00
Thomas Preud'homme
11f8114b51
re PR libstdc++/71081 (experimental/memory_resource/1.cc run for targets without atomics)
...
2016-05-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR libstdc++/71081
* testsuite/experimental/memory_resource/1.cc: Add required argument
to dg-require-atomic-builtins.
From-SVN: r236507
2016-05-20 12:36:57 +00:00
Jonathan Wakely
068b220e52
Add dg-require-atomic-builtins to test
...
PR libstdc++/71081
* testsuite/experimental/memory_resource/1.cc: Require atomics.
From-SVN: r236177
2016-05-12 15:08:45 +01:00
Jonathan Wakely
7f99d40a99
Test begin and end functions for directory iterators
...
* include/experimental/bits/fs_dir.h (begin, end): Add noexcept.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
Test begin and end functions.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Likewise.
From-SVN: r236085
2016-05-10 16:39:20 +01:00
Jonathan Wakely
6fe673ad0f
libstdc++/71038 fix error checks in filesystem::copy_file
...
PR libstdc++/71038
* src/filesystem/ops.cc (do_copy_file): Fix backwards conditions.
* testsuite/experimental/filesystem/operations/copy_file.cc: New test.
From-SVN: r236084
2016-05-10 16:39:14 +01:00
Jonathan Wakely
f9a39467b6
libstdc++/71036 Handle EEXIST in filesystem::create_directory
...
PR libstdc++/71036
* src/filesystem/ops.cc (create_dir): Handle EEXIST from mkdir.
* testsuite/experimental/filesystem/operations/create_directory.cc:
New test.
From-SVN: r236076
2016-05-10 14:04:21 +01:00
Jonathan Wakely
6f0800d418
libstdc++/71037 Add base path to filesystem::canonical exceptions
...
PR libstdc++/71037
* src/filesystem/ops.cc (canonical(const path&, const path&)): Add
base path to exception.
* testsuite/experimental/filesystem/operations/canonical.cc: Test
paths contained in exception.
From-SVN: r236074
2016-05-10 13:22:32 +01:00
Jonathan Wakely
f10b2e1cae
2.cc: Remove unused using declaration.
...
* testsuite/experimental/type_erased_allocator/2.cc: Remove unused
using declaration.
From-SVN: r236073
2016-05-10 13:04:22 +01:00
Jonathan Wakely
d7187f9ea1
libstdc++/71005 fix post-increment for filesystem iterators
...
PR libstdc++/71005
* include/experimental/bits/fs_dir.h (__directory_iterator_proxy):
New type.
(directory_iterator::operator++(int)): Return proxy.
(recursive_directory_iterator::operator++(int)): Likewise.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
Test post-increment.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Likewise.
From-SVN: r236072
2016-05-10 12:25:06 +01:00
Jonathan Wakely
7972e24663
libstdc++/71004 fix recent additions to testcase
...
PR libstdc++/71004
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Fix test02 to not call member
functions on invalid iterator, and use VERIFY not assert.
From-SVN: r236028
2016-05-09 12:50:01 +01:00
Ville Voutilainen
fb334765e2
Avoid endless run-time recursion for copying single-element tuples where the...
...
Avoid endless run-time recursion for copying single-element
tuples where the element type is by-value constructible
from any type.
* include/std/tuple (_NotSameTuple): New.
* include/std/tuple (tuple(_UElements&&...): Use it.
* testsuite/20_util/tuple/cons/element_accepts_anything_byval.cc: New.
From-SVN: r236025
2016-05-09 14:03:36 +03:00
Jonathan Wakely
e4cce0cea0
libstdc++/71004 fix recursive_directory_iterator default constructor
...
PR libstdc++/71004
* include/experimental/bits/fs_dir.h (recursive_directory_iterator):
Initialize scalar member variables in default constructor.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Teste default construction.
From-SVN: r236023
2016-05-09 11:09:37 +01:00
Rainer Orth
40436d8169
Enable dg-reqire-sharedlib on Solaris
...
* testsuite/lib/libstdc++.exp (libstdc++_init): Enable on *-*-solaris*.
From-SVN: r235931
2016-05-05 19:54:42 +00:00
Jonathan Wakely
f5c40ce2cf
Add dg-require-filesystem-ts directive to test
...
* testsuite/experimental/filesystem/path/native/string.cc: Add
dg-require-filesystem-ts directive.
From-SVN: r235919
2016-05-05 11:03:56 +01:00
Jonathan Wakely
d9cb3e7598
libstdc++/70940 Start fixing polymorphic memory resources
...
PR libstdc++/70940
* include/experimental/memory_resource
(__resource_adaptor_imp::do_allocate): Do not default-construct
rebound allocator.
(__resource_adaptor_imp::do_deallocate): Likewise. Use
allocator_traits to get pointer type.
(__null_memory_resource::do_allocate): Remove unused parameters.
(__null_memory_resource::do_deallocate): Likewise.
(__null_memory_resource::do_is_equal): Likewise. Add return statement.
* testsuite/experimental/type_erased_allocator/1.cc: Combine with ...
* testsuite/experimental/type_erased_allocator/1_neg.cc: This, and
move to ...
* testsuite/experimental/memory_resource/1.cc: Here.
* testsuite/experimental/memory_resource/null_memory_resource.cc: New.
* testsuite/experimental/memory_resource/resource_adaptor.cc: New.
From-SVN: r235868
2016-05-04 13:08:45 +01:00
Chris Gregory
f92ab29ffa
Remove trailing whitespace from libstdc++-v3 files
...
2016-04-29 Chris Gregory <czipperz@gmail.com>
* config/*: Remove trailing whitespace.
* src/*: Likewise.
* testsuite/tr1/*: Likewise.
* testsuite/util/*: Likewise.
From-SVN: r235645
2016-04-29 17:11:43 +01:00
Jonathan Wakely
9f9eb84eac
libstdc++/70766 use std::addressof instead of operator&
...
PR libstdc++/70766
* include/bits/basic_ios.tcc (basic_ios::_M_cache_locale): Use
__addressof.
* include/bits/stream_iterator.h (istream_iterator, ostream_iterator):
Likewise.
* include/std/atomic (atomic<_Tp>): Likewise.
* include/std/shared_mutex (shared_lock): Likewise.
* testsuite/24_iterators/istream_iterator/70766.cc: New test.
* testsuite/24_iterators/ostream_iterator/70766.cc : New test.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/70766.cc: New test.
* testsuite/30_threads/shared_lock/70766.cc: New test.
From-SVN: r235565
2016-04-28 13:33:07 +01:00
Jonathan Wakely
a635cdb2cc
libstdc++/70762 fix fallback implementation of nonexistent_path
...
PR libstdc++/70762
* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
static counter to return a different path on every call.
From-SVN: r235395
2016-04-24 19:06:54 +01:00
Tim Shen
216f7526fe
re PR libstdc++/70745 (Wrong handling of regex_constant::match_not_eow and regex_constant::match_not_bow)
...
PR libstdc++/70745
* include/bits/regex_executor.tcc (_Executor<>::_M_word_boundary):
Fix the match_not_bow and match_not_eow behavior.
* testsuite/28_regex/regression.cc: Add testcase.
From-SVN: r235382
2016-04-23 03:58:37 +00:00
Jonathan Wakely
29ca91f72e
libstdc++/69703 ignore endianness in codecvt_utf8
...
PR libstdc++/69703
* src/c++11/codecvt.cc (__codecvt_utf8_base<char16_t>::do_in)):
Override endianness bit in mode.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: New test.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: Test
that little_endian mode is ignored.
* testsuite/experimental/filesystem/path/native/string.cc: New test.
From-SVN: r235216
2016-04-19 19:02:46 +01:00
Jonathan Wakely
1490525104
libstdc++/70609 fix filesystem::copy()
...
PR libstdc++/70609
* src/filesystem/ops.cc (close_fd): New function.
(do_copy_file): Set permissions before copying file contents. Check
result of closing file descriptors. Don't copy streambuf when file
is empty.
(copy(const path&, const path&, copy_options, error_code&)): Use
lstat for source file when copy_symlinks is set.
* testsuite/experimental/filesystem/operations/copy.cc: Test copy().
From-SVN: r235215
2016-04-19 19:02:39 +01:00
Jonathan Wakely
0cded43df4
PR libstdc++/41759 reword static assertions in <random>
...
PR libstdc++/41759
* include/bits/random.h: Reword static assertion messages to state
positive conditions.
* include/bits/random.tcc: Likewise.
* include/bits/uniform_int_dist.h: Likewise.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
patterns.
From-SVN: r235160
2016-04-18 19:03:50 +01:00
Jonathan Wakely
b05cf382e0
Define std: 🧵 :id comparison operators at namespace-scope
...
From-SVN: r235155
2016-04-18 17:16:14 +01:00
Jonathan Wakely
4ed6e52446
Make use of extensions more explicit in libstdc++ tests
...
* testsuite/18_support/bad_exception/23591_thread-1.c: Add
-Wno-pedantic to dg-options.
* testsuite/20_util/align/2.cc: Use type as operand of alignof.
* testsuite/20_util/is_floating_point/value.cc: Add -Wno-pedantic
to dg-options.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc:
Remove extra semi-colon.
* testsuite/23_containers/array/tuple_interface/tuple_element.cc:
Always supply second argument to static_assert.
* testsuite/25_algorithms/lower_bound/no_operator_ne.cc: Remove extra
semi-colon.
* testsuite/26_numerics/complex/c99.cc: Add -Wno-pedantic to
dg-options.
* testsuite/26_numerics/complex/literals/values.cc: Likewise.
* testsuite/29_atomics/atomic/60695.cc: Likewise.
* testsuite/29_atomics/atomic/62259.cc: use __alignof__ instead of
alignof when operand is an object not a type.
* testsuite/decimal/ctor.cc: Add -Wno-pedantic to dg-options.
* testsuite/decimal/make-decimal.cc: Likewise.
* testsuite/experimental/type_traits/value.cc: Always supply second
argument to static_assert.
* testsuite/util/testsuite_common_types.h: Use __extension__ for
__int128 types.
From-SVN: r235154
2016-04-18 16:44:25 +01:00
Jonathan Wakely
abb6e0a19d
Don't include internal header in libstdc++ tests
...
* testsuite/experimental/type_erased_allocator/1.cc: Don't include
internal header.
* testsuite/experimental/type_erased_allocator/1_neg.cc: Likewise.
* testsuite/experimental/type_erased_allocator/2.cc: Likewise.
* testsuite/experimental/type_erased_allocator/uses_allocator.cc:
Likewise. Add licence and change to compile-only test.
From-SVN: r235153
2016-04-18 16:44:16 +01:00
Jason Merrill
9f285ccb77
Revert empty class parameter passing ABI changes.
...
From-SVN: r234977
2016-04-14 12:23:06 -04:00
Martin Sebor
342fac9537
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
...
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/70019 - VLA size overflow not detected
PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2
gcc/testsuite/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
* g++.dg/cpp1y/vla11.C: New test.
* g++.dg/cpp1y/vla12.C: New test.
* g++.dg/cpp1y/vla13.C: New test.
* g++.dg/cpp1y/vla14.C: New test.
* g++.dg/cpp1y/vla3.C: Restore deleted test.
* gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
* g++.dg/ubsan/vla-1.C: Disable exceptions.
gcc/cp/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
functions.
* decl.c (check_initializer, cp_finish_decl): Call them.
(reshape_init_r): Reject incompletely braced intializer-lists
for VLAs.
* init.c (throw_bad_array_length, build_vla_check)
(build_vla_size_check, build_vla_init_check): Define new functions.
* typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
to detect a VLA.
(store_init_value): Same.
gcc/doc/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* extend.texi (Variable Length): Document C++ specifics.
libstdc++-v3/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
* testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
upper bound is positive.
From-SVN: r234966
2016-04-13 17:26:41 -06:00
Jonathan Wakely
a6297ab587
Adjust for new empty class parameter passing ABI.
...
* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
of functions taking empty structs by value. Add a template parameter
to overloads without hints. Rename overloads with hints to
_M_emplace_hint.
(_Hashtable::_M_erase(true_type, const_iterator),
_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
by reordering parameters.
* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
_M_emplace_hint instead of _M_emplace.
* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
__shared_ptr): Likewise.
* include/bits/stl_algo.h (replace_if): Likewise.
* include/bits/stl_pair.h (piecewise_construct_t,
piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
__uses_alloc0): Likewise.
* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
From-SVN: r234964
2016-04-13 23:00:50 +01:00
Jonathan Wakely
6da8b93163
* testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass.
...
From-SVN: r234808
2016-04-07 15:26:24 +01:00
Jonathan Wakely
d5ec69f374
* testsuite/30_threads/thread/70503.cc: Require -static to work.
...
From-SVN: r234757
2016-04-05 18:21:48 +01:00
Jonathan Wakely
87cec93ee0
Ensure std::thread helpers have internal linkage
...
PR libstdc++/70503
* src/c++11/thread.cc (execute_native_thread_routine,
execute_native_thread_routine_compat): Give internal linkage.
* testsuite/30_threads/thread/70503.cc: New test.
From-SVN: r234746
2016-04-05 14:35:32 +01:00
Ville Voutilainen
7b3318c41e
re PR libstdc++/70437 (Instantiation loop with pair and is_constructible)
...
PR libstdc++/70437
* include/bits/stl_pair.h (_ConstructiblePair,
_ImplicitlyConvertiblePair, _MoveConstructiblePair,
_ImplicitlyMoveConvertiblePair): Add shortcut conditions
for same-type cases.
* testsuite/20_util/pair/70437.cc: New.
From-SVN: r234743
2016-04-05 14:31:30 +03:00
Jonathan Wakely
00e6c25ac8
libstdc++/69945 Add __gnu_cxx::__freeres hook
...
PR libstdc++/69945
* config/abi/pre/gnu.ver: Add new symbol.
* libsupc++/eh_alloc.cc (__gnu_cxx::__freeres): Define.
* testsuite/18_support/free_eh_pool.cc: New test.
From-SVN: r234465
2016-03-24 18:13:40 +00:00
Jonathan Wakely
9aee022eb9
libstdc++/69893 make <tr1/cmath> work with C++11
...
PR libstdc++/69893
* include/tr1/cmath (acosh, asinh, atanh, cbrt, copysign, erf, erfc,
exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma, llrint,
llround, log1p, log2, logb, lrint, lround, nan, nearbyint, nextafter,
nexttoward, remainder, remquo, rint, round, scalbln, scalbn, tgamma,
trunc) [__cplusplus >= 201103L]: Import from namespace std.
(fabs) [__cplusplus < 201103L]: Import from namespace std.
* include/tr1/complex (acosh, asinh, atanh) [__cplusplus >= 201103L]:
Likewise.
* testsuite/tr1/headers/c++200x/complex.cc: Add std::fabs to global
namespace before including TR1 headers.
* testsuite/tr1/headers/c++200x/math.cc: New test.
From-SVN: r233644
2016-02-23 19:49:31 +00:00
Tim Shen
244901a572
re PR libstdc++/69794 (std::regex_search match failure with regex object with flags grep|icase)
...
2016-02-16 Tim Shen <timshen@google.com>
PR libstdc++/69794
* include/bits/regex_scanner.h: Add different special character
sets for grep and egrep regex.
* include/bits/regex_scanner.tcc: Use _M_spec_char more uniformly.
* testsuite/28_regex/regression.cc: Add new testcase.
From-SVN: r233482
2016-02-17 03:33:02 +00:00
Mike Stump
82f0f78917
Fix FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors)
...
From-SVN: r233391
2016-02-12 21:23:11 +00:00
Mike Stump
af583c4457
Ensure stdout is newline terminated for status wrappers.
...
From-SVN: r233254
2016-02-09 20:18:10 +00:00
Jonathan Wakely
3555173fb9
Test for C99 stdlib.h functions with -std=c++98
...
PR libstdc++/69626
* acinclude.m4 (GLIBCXX_ENABLE_C99): Check C99 stdlib.h functions
with -std=c++98 and define _GLIBCXX98_USE_C99_STDLIB.
* config.h.in: Regenerate.
* configure: Regenerate.
* testsuite/21_strings/c_strings/char/69626.cc: New.
From-SVN: r233161
2016-02-04 23:47:21 +00:00
Jakub Jelinek
8dc781e454
* testsuite/libstdc++-prettyprinters/whatis.cc: Include <random>.
...
From-SVN: r232898
2016-01-27 20:31:06 +01:00
Jonathan Wakely
bae87f7fdd
Set FP options for failing special functions tests
...
PR libstdc++/69295
* testsuite/ext/special_functions/hyperg/check_value.cc: Use
-ffp-contract=off, and -ffloat-store to disable excess precision.
* testsuite/special_functions/02_assoc_legendre/check_value.cc: Use
-ffp-contract=off.
From-SVN: r232879
2016-01-27 15:09:38 +00:00
Jonathan Wakely
f1d591e8a6
Fix assertions for move assignment of trivial types
...
PR libstdc++/69478
* include/bits/stl_algobase.h (__copy_move<_IsMove, true,
random_access_iterator_tag>): Check is_move_assignable when moving.
(__copy_move_backwards<_IsMove, true, random_access_iterator_tag>):
Likewise.
* testsuite/25_algorithms/copy/move_iterators/69478.cc: New.
* testsuite/25_algorithms/copy_backward/move_iterators/69478.cc: New.
* testsuite/25_algorithms/move/69478.cc: New.
* testsuite/25_algorithms/move_backward/69478.cc: new.
From-SVN: r232842
2016-01-26 19:38:20 +00:00
Jonathan Wakely
2944621e2c
Avoid including all of <random> in <algorithm>
...
PR libstdc++/69464
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/random.h (uniform_int_distribution): Move to
bits/uniform_int_dist.h.
* include/bits/random.tcc (uniform_int_distribution::operator(),
uniform_int_distribution::__generate_impl): Likewise.
* include/bits/uniform_int_dist.h: New header.
* include/bits/stl_algo.h [__cplusplus >= 201103L]: Include
<bits/uniform_int_dist.h> instead of <random>.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
move_iterators/1.cc: Include correct header for uninitialized_copy.
* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
move_iterators/1.cc: Likewise.
* testsuite/25_algorithms/nth_element/58800.cc: Include correct
header for vector.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lines.
From-SVN: r232798
2016-01-25 16:44:30 +00:00
Edward Smith-Rowland
02dc241929
TR29124 C++ Special Math - <math.h> pulls funcs into global namespace.
...
2016-01-22 Edward Smith-Rowland <3dw4rd@verizon.net>
TR29124 C++ Special Math - <math.h> pulls funcs into global namespace.
* include/c_compatibility/math.h: Import the TR29124 functions
into the global namespace.
* testsuite/special_functions/01_assoc_laguerre/compile_2.cc: Remove
xfail and make compile-only.
* testsuite/special_functions/02_assoc_legendre/compile_2.cc: Ditto.
* testsuite/special_functions/03_beta/compile_2.cc: Ditto.
* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: Ditto.
* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: Ditto.
* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: Ditto.
* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: Ditto.
* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: Ditto.
* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: Ditto.
* testsuite/special_functions/10_cyl_neumann/compile_2.cc: Ditto.
* testsuite/special_functions/11_ellint_1/compile_2.cc: Ditto.
* testsuite/special_functions/12_ellint_2/compile_2.cc: Ditto.
* testsuite/special_functions/13_ellint_3/compile_2.cc: Ditto.
* testsuite/special_functions/14_expint/compile_2.cc: Ditto.
* testsuite/special_functions/15_hermite/compile_2.cc: Ditto.
* testsuite/special_functions/16_laguerre/compile_2.cc: Ditto.
* testsuite/special_functions/17_legendre/compile_2.cc: Ditto.
* testsuite/special_functions/18_riemann_zeta/compile_2.cc: Ditto.
* testsuite/special_functions/19_sph_bessel/compile_2.cc: Ditto.
* testsuite/special_functions/20_sph_legendre/compile_2.cc: Ditto.
* testsuite/special_functions/21_sph_neumann/compile_2.cc: Ditto.
From-SVN: r232755
2016-01-22 23:17:10 +00:00
Jonathan Wakely
d1fb377c68
Constrain std::valarray functions and operators
...
PR libstdc++/69116
* include/bits/valarray_before.h (__fun, __fun_with_valarray): Only
define result_type for types which can be safely used with valarrays.
* testsuite/26_numerics/valarray/69116.cc: New.
From-SVN: r232748
2016-01-22 21:15:41 +00:00
Jonathan Wakely
ab56cbed60
libstdc++/69406 Fix test to check for supported headers
...
PR libstdc++/69406
* include/bits/cpp_type_traits.h: Ensure C++ language linkage.
* include/ext/type_traits.h: Likewise.
* testsuite/17_intro/headers/c++2011/linkage.cc: Check autoconf macros
for presence of C headers.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Adjust
dg-error line number.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Likewise.
From-SVN: r232672
2016-01-21 13:33:27 +00:00
Jonathan Wakely
3f93466af4
Add C++11 <cmath> overloads to the global namespace
...
PR libstdc++/60401
* include/c_compatibility/math.h (acosh, asinh, atanh, acbrt,
copysign, erf, erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb,
lgamma, llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln, scalbn,
tgamma, trunc) [__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1]:
Add using declarations.
* testsuite/26_numerics/headers/cmath/60401.cc: New.
From-SVN: r232627
2016-01-20 17:44:58 +00:00