From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:38 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98117D914A2; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 427EC64F5D; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXbAI099041; Mon, 26 Jun 2017 20:33:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXYkv099011; Mon, 26 Jun 2017 20:33:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXYkv099011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320380 - in vendor/libc++/dist: . include include/experimental src/experimental/filesystem test/std/algorithms/alg.nonmodifying/alg.foreach test/std/experimental/any/any.class/any.assi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:38 -0000 Author: dim Date: Mon Jun 26 20:33:34 2017 New Revision: 320380 URL: https://svnweb.freebsd.org/changeset/base/320380 Log: Vendor import of libc++ trunk r306325: https://llvm.org/svn/llvm-project/libcxx/trunk@306325 Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/include/__config vendor/libc++/dist/include/experimental/any vendor/libc++/dist/include/new vendor/libc++/dist/include/numeric vendor/libc++/dist/include/variant vendor/libc++/dist/src/experimental/filesystem/path.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp vendor/libc++/dist/test/support/count_new.hpp vendor/libc++/dist/test/support/experimental_any_helpers.h vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:34 2017 (r320380) @@ -118,6 +118,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default") cxxabi.h PATHS ${LLVM_MAIN_SRC_DIR}/projects/libcxxabi/include ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include + ${LLVM_MAIN_SRC_DIR}/../libcxxabi/include NO_DEFAULT_PATH ) if (LIBCXX_TARGETING_MSVC) Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/__config Mon Jun 26 20:33:34 2017 (r320380) @@ -1154,6 +1154,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ __attribute__((availability(watchos,strict,introduced=3.0))) #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ __attribute__((availability(macosx,strict,introduced=10.12))) \ __attribute__((availability(ios,strict,introduced=10.0))) \ @@ -1175,25 +1176,35 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION \ + __attribute__((availability(macosx,strict,introduced=10.13))) \ + __attribute__((availability(ios,strict,introduced=11.0))) \ + __attribute__((availability(tvos,strict,introduced=11.0))) \ + __attribute__((availability(watchos,strict,introduced=4.0))) #else #define _LIBCPP_AVAILABILITY_SHARED_MUTEX #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS #define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE #define _LIBCPP_AVAILABILITY_FUTURE_ERROR #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION #endif // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. #ifdef _LIBCPP_NO_EXCEPTIONS #define _LIBCPP_AVAILABILITY_DYNARRAY #define _LIBCPP_AVAILABILITY_FUTURE +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST #else #define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH #define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST \ + _LIBCPP_AVAILABILITY_BAD_ANY_CAST #endif // Availability of stream API in the dylib got dropped and re-added. The @@ -1202,9 +1213,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ // availability(ios,introduced=7.0) #if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ <= 1090) || \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) || \ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)) #define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE #endif Modified: vendor/libc++/dist/include/experimental/any ============================================================================== --- vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:34 2017 (r320380) @@ -89,7 +89,7 @@ inline namespace fundamentals_v1 { _LIBCPP_BEGIN_NAMESPACE_LFTS -class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_cast +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast { public: virtual const char* what() const _NOEXCEPT; @@ -98,6 +98,7 @@ class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_ #if _LIBCPP_STD_VER > 11 // C++ > 11 _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST void __throw_bad_any_cast() { #ifndef _LIBCPP_NO_EXCEPTIONS @@ -506,7 +507,7 @@ void swap(any & __lhs, any & __rhs) _NOEXCEPT } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any const & __v) { static_assert( @@ -522,7 +523,7 @@ _ValueType any_cast(any const & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any & __v) { static_assert( @@ -537,7 +538,7 @@ _ValueType any_cast(any & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any && __v) { static_assert( Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/new Mon Jun 26 20:33:34 2017 (r320380) @@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE #endif #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif #endif Modified: vendor/libc++/dist/include/numeric ============================================================================== --- vendor/libc++/dist/include/numeric Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/numeric Mon Jun 26 20:33:34 2017 (r320380) @@ -81,6 +81,20 @@ template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, OutputIterator result); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op, T init); // C++17 + template OutputIterator @@ -88,6 +102,21 @@ template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op); // C++17 + +template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op, + T init); // C++17 + template OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); @@ -295,6 +324,38 @@ exclusive_scan(_InputIterator __first, _InputIterator return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>()); } +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, *__first); + *__result = __init; + } + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = *__first; + *__result++ = __init; + if (++__first != __last) + return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); + } + + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) +{ + return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); +} + template inline _LIBCPP_INLINE_VISIBILITY @@ -314,6 +375,32 @@ transform_exclusive_scan(_InputIterator __first, _Inpu ++__result; } while (++__first != __last); } + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, __u(*__first)); + *__result = __init; + } + + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = __u(*__first); + *__result++ = __init; + if (++__first != __last) + return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); + } + return __result; } #endif Modified: vendor/libc++/dist/include/variant ============================================================================== --- vendor/libc++/dist/include/variant Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/variant Mon Jun 26 20:33:34 2017 (r320380) @@ -1116,6 +1116,8 @@ class _LIBCPP_TEMPLATE_VIS variant (public) template < class _Arg, enable_if_t, variant>, int> = 0, + enable_if_t>::value, int> = 0, + enable_if_t>::value, int> = 0, class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>, size_t _Ip = __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value, Modified: vendor/libc++/dist/src/experimental/filesystem/path.cpp ============================================================================== --- vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -261,7 +261,8 @@ struct PathParser { (private) string_view_pair separate_filename(string_view_t const & s) { if (s == "." || s == ".." || s.empty()) return string_view_pair{s, ""}; auto pos = s.find_last_of('.'); - if (pos == string_view_t::npos) return string_view_pair{s, string_view{}}; + if (pos == string_view_t::npos) + return string_view_pair{s, string_view_t{}}; return string_view_pair{s.substr(0, pos), s.substr(pos)}; } @@ -396,7 +397,7 @@ int path::__compare(string_view_t __s) const { size_t hash_value(const path& __p) noexcept { auto PP = PathParser::CreateBegin(__p.native()); size_t hash_value = 0; - std::hash hasher; + std::hash hasher; while (PP) { hash_value = __hash_combine(hash_value, hasher(*PP)); ++PP; Modified: vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -36,15 +36,15 @@ int main() auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 0, std::ref(f)); assert(it == Iter(ia)); - assert(f.count == 0); + assert(f.count == 0); } { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), s, std::ref(f)); - + assert(it == Iter(ia+s)); - assert(f.count == s); + assert(f.count == s); for (unsigned i = 0; i < s; ++i) assert(ia[i] == static_cast(i+1)); } @@ -52,9 +52,9 @@ int main() { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 1, std::ref(f)); - + assert(it == Iter(ia+1)); - assert(f.count == 1); + assert(f.count == 1); for (unsigned i = 0; i < 1; ++i) assert(ia[i] == static_cast(i+2)); } Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -35,7 +35,7 @@ test(It i, typename std::iterator_traits::differen #if TEST_STD_VER > 14 template -constexpr bool +constexpr bool constepxr_test(It i, typename std::iterator_traits::difference_type n, It x) { std::advance(i, n); Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -71,5 +71,5 @@ int main() static_assert( constexpr_test(s+1, s), "" ); } #endif - + } Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 +// REQUIRES: availability=macosx10.12 + +// test availability of new/delete operators introduced in c++17. + +#include + +int main () { + int *p0 = new ((std::align_val_t)16) int(1); + (void)p0; + int *p1 = new ((std::align_val_t)16) int[1]; + (void)p1; + // expected-error@-4 {{call to unavailable function 'operator new': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + + // expected-error@-9 {{call to unavailable function 'operator new[]': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + return 0; +} Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init); -// +// #include #include @@ -26,7 +26,7 @@ void test(Iter1 first, Iter1 last, T init, Iter2 rFirst, Iter2 rLast) { std::vector::value_type> v; - + // Not in place std::exclusive_scan(first, last, std::back_inserter(v), init); assert(std::equal(v.begin(), v.end(), rFirst, rLast)); @@ -35,7 +35,7 @@ test(Iter1 first, Iter1 last, T init, Iter2 rFirst, It v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator // exclusive_scan(InputIterator first, InputIterator last, -// OutputIterator result, +// OutputIterator result, // T init, BinaryOperation binary_op); // C++17 #include @@ -36,7 +36,7 @@ test(Iter1 first, Iter1 last, T init, Op op, Iter2 rFi v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init, op); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } @@ -84,4 +84,3 @@ int main() } } } - \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,102 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, T init); +// + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) + test(Iter(ia), Iter(ia + i), pRes, pRes + i); +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res)); + assert(res.empty()); + } +} + +int main() +{ + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); +} Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,112 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op); // C++17 + +#include +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>()); + assert(res.empty()); + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories +// test >(); +// test >(); +// test >(); +// test >(); +// test(); +// test< int*>(); + +} + \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,128 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, T init); // C++17 + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, T init, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), 0, pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), 1, mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 50); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 50 + (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 40); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 40 + triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 30); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 30 + triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), 40); + assert(res.empty()); + } + +// Make sure that the calculations are done using the init typedef + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::vector res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), 1); + + assert(res.size() == 10); + int j = 1; + assert(res[0] == 1); + for (size_t i = 1; i < v.size(); ++i) + { + j *= i + 1; + assert(res[i] == j); + } + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); + +} + \ No newline at end of file Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -12,7 +12,7 @@ // template // T reduce(InputIterator first, InputIterator last, T init, BinaryOperation op); - + #include #include Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -10,7 +10,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// template // OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init, @@ -64,11 +64,11 @@ test() { int ia[] = { 1, 3, 5, 7, 9}; const int pResI0[] = { 0, 1, 4, 9, 16}; // with identity - const int mResI0[] = { 0, 0, 0, 0, 0}; + const int mResI0[] = { 0, 0, 0, 0, 0}; const int pResN0[] = { 0, -1, -4, -9, -16}; // with negate const int mResN0[] = { 0, 0, 0, 0, 0}; const int pResI2[] = { 2, 3, 6, 11, 18}; // with identity - const int mResI2[] = { 2, 2, 6, 30, 210}; + const int mResI2[] = { 2, 2, 6, 30, 210}; const int pResN2[] = { 2, 1, -2, -7, -14}; // with negate const int mResN2[] = { 2, -2, 6, -30, 210}; const unsigned sa = sizeof(ia) / sizeof(ia[0]); @@ -149,7 +149,7 @@ void basic_tests() int main() { basic_tests(); - + // All the iterator categories test >(); test >(); Added: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,133 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, +// UnaryOperation unary_op); + + +#include +#include +#include +#include + +#include "test_iterators.h" + +template *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***