aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:34 +0000
commit733153a0fb52facba02c550ec849f0c734dfa412 (patch)
tree8f249e8b8f6a7803a81bb0fed33213b9249b7ac1
parent2fa809d9eabddd820af54059faa8362dd50b51de (diff)
downloadsrc-733153a0fb52facba02c550ec849f0c734dfa412.tar.gz
src-733153a0fb52facba02c550ec849f0c734dfa412.zip
Vendor import of libc++ trunk r302418:vendor/libc++/libc++-trunk-r302418
Notes
Notes: svn path=/vendor/libc++/dist/; revision=317955 svn path=/vendor/libc++/libc++-trunk-r302418/; revision=317956; tag=vendor/libc++/libc++-trunk-r302418
-rw-r--r--CMakeLists.txt13
-rw-r--r--appveyor.yml65
-rw-r--r--docs/DesignDocs/AvailabilityMarkup.rst114
-rw-r--r--docs/index.rst3
-rw-r--r--include/__config82
-rw-r--r--include/__locale1
-rw-r--r--include/__threading_support5
-rw-r--r--include/exception59
-rw-r--r--include/experimental/dynarray2
-rw-r--r--include/experimental/optional9
-rw-r--r--include/functional6
-rw-r--r--include/future50
-rw-r--r--include/istream2
-rw-r--r--include/locale22
-rw-r--r--include/memory15
-rw-r--r--include/new16
-rw-r--r--include/ostream2
-rw-r--r--include/random22
-rw-r--r--include/shared_mutex8
-rw-r--r--include/streambuf2
-rw-r--r--include/support/win32/locale_win32.h7
-rw-r--r--include/typeinfo1
-rw-r--r--install-appveyor-reqs.cmd47
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--src/exception.cpp2
-rw-r--r--src/experimental/filesystem/operations.cpp4
-rw-r--r--src/locale.cpp12
-rw-r--r--src/memory.cpp6
-rw-r--r--src/support/runtime/exception_pointer_msvc.ipp94
-rw-r--r--test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp2
-rw-r--r--test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp2
-rw-r--r--test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp3
-rw-r--r--test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp3
-rw-r--r--test/libcxx/debug/containers/db_associative_container_tests.pass.cpp3
-rw-r--r--test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp3
-rw-r--r--test/libcxx/debug/containers/db_string.pass.cpp3
-rw-r--r--test/libcxx/debug/containers/db_unord_container_tests.pass.cpp3
-rw-r--r--test/libcxx/debug/debug_abort.pass.cpp3
-rw-r--r--test/libcxx/debug/debug_throw.pass.cpp3
-rw-r--r--test/libcxx/debug/debug_throw_register.pass.cpp3
-rw-r--r--test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp6
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp6
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp1
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp1
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp2
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp2
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp2
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp2
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp1
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp8
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp1
-rw-r--r--test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg3
-rw-r--r--test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp9
-rw-r--r--test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp7
-rw-r--r--test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp4
-rw-r--r--test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp3
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp2
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp2
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp2
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp2
-rw-r--r--test/std/containers/sequences/vector.bool/emplace_back.pass.cpp4
-rw-r--r--test/std/containers/sequences/vector.bool/vector_bool.pass.cpp2
-rw-r--r--test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp4
-rw-r--r--test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp9
-rw-r--r--test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp9
-rw-r--r--test/std/experimental/any/any.class/any.assign/copy.pass.cpp7
-rw-r--r--test/std/experimental/any/any.class/any.assign/move.pass.cpp7
-rw-r--r--test/std/experimental/any/any.class/any.assign/value.pass.cpp9
-rw-r--r--test/std/experimental/any/any.class/any.cons/copy.pass.cpp7
-rw-r--r--test/std/experimental/any/any.class/any.cons/move.pass.cpp7
-rw-r--r--test/std/experimental/any/any.class/any.cons/value.pass.cpp9
-rw-r--r--test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp7
-rw-r--r--test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp7
-rw-r--r--test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp2
-rw-r--r--test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp2
-rw-r--r--test/std/experimental/any/any.nonmembers/swap.pass.cpp5
-rw-r--r--test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp6
-rw-r--r--test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp6
-rw-r--r--test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp7
-rw-r--r--test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp7
-rw-r--r--test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp24
-rw-r--r--test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp25
-rw-r--r--test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp24
-rw-r--r--test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp24
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp4
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp3
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp3
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp3
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp7
-rw-r--r--test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp97
-rw-r--r--test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp2
-rw-r--r--test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp18
-rw-r--r--test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp18
-rw-r--r--test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp18
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp14
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp17
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp12
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp12
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp6
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp14
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp12
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp12
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp12
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp5
-rw-r--r--test/std/language.support/support.exception/except.nested/assign.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp5
-rw-r--r--test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/propagation/current_exception.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp3
-rw-r--r--test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp9
-rw-r--r--test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp9
-rw-r--r--test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp8
-rw-r--r--test/std/language.support/support.types/byte.pass.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/lshift.assign.fail.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/lshift.assign.pass.cpp4
-rw-r--r--test/std/language.support/support.types/byteops/lshift.fail.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/lshift.pass.cpp6
-rw-r--r--test/std/language.support/support.types/byteops/rshift.assign.fail.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/rshift.assign.pass.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/rshift.fail.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/rshift.pass.cpp6
-rw-r--r--test/std/language.support/support.types/byteops/to_integer.fail.cpp2
-rw-r--r--test/std/language.support/support.types/byteops/to_integer.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp3
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp6
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp15
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp15
-rw-r--r--test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp4
-rw-r--r--test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp4
-rw-r--r--test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp4
-rw-r--r--test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp4
-rw-r--r--test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp2
-rw-r--r--test/std/numerics/rand/rand.device/ctor.pass.cpp8
-rw-r--r--test/std/numerics/rand/rand.device/eval.pass.cpp8
-rw-r--r--test/std/re/re.alg/re.alg.match/awk.pass.cpp2
-rw-r--r--test/std/re/re.traits/translate_nocase.pass.cpp4
-rw-r--r--test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp6
-rw-r--r--test/std/strings/string.conversions/stof.pass.cpp5
-rw-r--r--test/std/strings/string.conversions/stol.pass.cpp5
-rw-r--r--test/std/strings/string.conversions/stoll.pass.cpp5
-rw-r--r--test/std/strings/string.conversions/stoul.pass.cpp5
-rw-r--r--test/std/strings/string.conversions/stoull.pass.cpp5
-rw-r--r--test/std/thread/futures/futures.future_error/what.pass.cpp8
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp2
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp2
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg2
-rw-r--r--test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg2
-rw-r--r--test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg2
-rw-r--r--test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp13
-rw-r--r--test/std/utilities/any/any.class/any.assign/copy.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.assign/move.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.assign/value.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.cons/copy.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.cons/move.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.cons/value.pass.cpp9
-rw-r--r--test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp7
-rw-r--r--test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp7
-rw-r--r--test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp7
-rw-r--r--test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp7
-rw-r--r--test/std/utilities/any/any.nonmembers/make_any.pass.cpp7
-rw-r--r--test/std/utilities/any/any.nonmembers/swap.pass.cpp7
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp2
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp15
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp21
-rw-r--r--test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp7
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp7
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp7
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp4
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp4
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp8
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp7
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp8
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp8
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp8
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp7
-rw-r--r--test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.cons/default.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp2
-rw-r--r--test/std/utilities/template.bitset/bitset.members/count.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/index.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/test.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp6
-rw-r--r--test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp10
-rw-r--r--test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp9
-rw-r--r--test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp10
-rw-r--r--test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.get/get_index.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.get/get_type.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp21
-rw-r--r--test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp18
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.visit/visit.pass.cpp7
-rw-r--r--test/support/msvc_stdlib_force_include.hpp16
-rw-r--r--test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp35
-rw-r--r--test/support/test_macros.h3
-rw-r--r--test/support/test_workarounds.h1
-rw-r--r--utils/libcxx/test/config.py50
-rw-r--r--utils/libcxx/test/target_info.py26
266 files changed, 1930 insertions, 343 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef1726b78d9c..8c25a0a0e40a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -344,7 +344,11 @@ set(LIBCXX_COMPILER ${CMAKE_CXX_COMPILER})
set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
-set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+if (LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+else()
+ set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+endif()
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
@@ -627,7 +631,12 @@ endif()
# Create the lit.site.cfg file even when LIBCXX_INCLUDE_TESTS is OFF or
# LLVM_FOUND is OFF. This allows users to run the tests manually using
# LIT without requiring a full LLVM checkout.
-add_subdirectory(test)
+#
+# However, since some submission systems strip test/ subdirectories, check for
+# it before adding it.
+if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
+ add_subdirectory(test)
+endif()
if (LIBCXX_INCLUDE_TESTS)
add_subdirectory(lib/abi)
endif()
diff --git a/appveyor.yml b/appveyor.yml
index 3cb2ce6f6bab..1d9e88a87b15 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,65 +2,34 @@ version: '{build}'
shallow_clone: true
-os:
- - Visual Studio 2015
-
build:
verbosity: detailed
-branches:
- only:
- - master
-
configuration:
- Debug
environment:
matrix:
- - COMPILER: Clang-CL 4.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ CLANG_VERSION: ToT
+ MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
+ MSVC_SETUP_ARG: x86
+ APPVEYOR_SAVE_CACHE_ON_ERROR: true
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ CLANG_VERSION: 4
+ MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
+ MSVC_SETUP_ARG: x86_amd64
+ APPVEYOR_SAVE_CACHE_ON_ERROR: true
install:
############################################################################
# All external dependencies are installed in C:\projects\deps
############################################################################
- - mkdir C:\projects\deps
- - cd C:\projects\deps
-
- ############################################################################
- # Install Ninja
- ############################################################################
- - set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip"
- - appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- - 7z x ninja.zip -oC:\projects\deps\ninja > nul
- - set PATH=C:\projects\deps\ninja;%PATH%
- - ninja --version
-
- ############################################################################
- # Install a recent CMake
- ############################################################################
- - set CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.zip"
- - appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
- - 7z x cmake.zip -oC:\projects\deps > nul
- - move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory
- - set PATH=C:\projects\deps\cmake\bin;%PATH%
- - cmake --version
-
- ############################################################################
- # Setup the path to Clang-cl
- ############################################################################
- - set PATH="C:\Program Files\LLVM\bin";%PATH%
- - clang-cl -v
-
- ############################################################################
- # Setup the cached copy of LLVM
- ############################################################################
- - if exist llvm (git -C llvm pull --rebase=true --ff-only)
- - if not exist llvm (git clone --depth=1 http://llvm.org/git/llvm.git)
-
+ - call "%APPVEYOR_BUILD_FOLDER%\\install-appveyor-reqs.cmd"
before_build:
- - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- - cd C:\projects\libcxx
+ - call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
+ - cd %APPVEYOR_BUILD_FOLDER%
build_script:
- md C:\projects\build-libcxx
@@ -74,8 +43,8 @@ build_script:
-DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
"-DCMAKE_BUILD_TYPE=%configuration%"
"-DLLVM_PATH=C:\projects\deps\llvm" -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLLVM_LIT_ARGS="-sv --no-progress-bar --show-xfail --show-unsupported"
- C:\projects\libcxx
+ -DLLVM_LIT_ARGS="-sv --show-xfail --show-unsupported"
+ %APPVEYOR_BUILD_FOLDER%
#############################################################################
# Build Step
@@ -94,4 +63,6 @@ artifacts:
name: logs
cache:
- - C:\projects\deps\llvm
+ - C:\projects\deps\ninja
+ - C:\projects\deps\cmake
+ - C:\projects\deps\llvm-installer.exe
diff --git a/docs/DesignDocs/AvailabilityMarkup.rst b/docs/DesignDocs/AvailabilityMarkup.rst
new file mode 100644
index 000000000000..4a85c698f232
--- /dev/null
+++ b/docs/DesignDocs/AvailabilityMarkup.rst
@@ -0,0 +1,114 @@
+===================
+Availability Markup
+===================
+
+.. contents::
+ :local:
+
+Overview
+========
+
+Libc++ is used as a system library on macOS and iOS (amongst others). In order
+for users to be able to compile a binary that is intended to be deployed to an
+older version of the platform, clang provides the
+`availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>`_
+that can be placed on declarations to describe the lifecycle of a symbol in the
+library.
+
+Design
+======
+
+When a new feature is introduced that requires dylib support, a macro should be
+created in include/__config to mark this feature as unavailable for all the
+systems. For example::
+
+ // Define availability macros.
+ #if defined(_LIBCPP_USE_AVAILABILITY_APPLE)
+ #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
+ #else if defined(_LIBCPP_USE_AVAILABILITY_SOME_OTHER_VENDOR)
+ #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
+ #else
+ #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+ #endif
+
+When the library is updated by the platform vendor, the markup can be updated.
+For example::
+
+ #define _LIBCPP_AVAILABILITY_SHARED_MUTEX \
+ __attribute__((availability(macosx,strict,introduced=10.12))) \
+ __attribute__((availability(ios,strict,introduced=10.0))) \
+ __attribute__((availability(tvos,strict,introduced=10.0))) \
+ __attribute__((availability(watchos,strict,introduced=3.0)))
+
+In the source code, the macro can be added on a class if the full class requires
+type info from the library for example::
+
+ _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
+ class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+ : public std::logic_error {
+
+or on a particular symbol:
+
+ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
+
+
+Testing
+=======
+
+Some parameters can be passed to lit to run the test-suite and exercising the
+availability.
+
+* The `platform` parameter controls the deployement target. For example lit can
+ be invoked with `--param=platform=macosx10.8`. Default is the current host.
+* The `use_system_cxx_lib` parameter indicates to use another library than the
+ just built one. Invoking lit with `--param=use_system_cxx_lib=true` will run
+ the test-suite against the host system library. Alternatively a path to the
+ directory containing a specific prebuilt libc++ can be used, for example:
+ `--param=use_system_cxx_lib=/path/to/macOS/10.8/`.
+* The `with_availability` boolean parameter enables the availability markup.
+
+Tests can be marked as XFAIL based on multiple features made available by lit:
+
+
+* if either `use_system_cxx_lib` or `with_availability` is passed to lit,
+ assuming `--param=platform=macosx10.8` is passed as well the following
+ features will be available:
+
+ - availability
+ - availability=x86_64
+ - availability=macosx
+ - availability=x86_64-macosx
+ - availability=x86_64-apple-macosx10.8
+ - availability=macosx10.8
+
+ This feature is used to XFAIL a test that *is* using a class of a method marked
+ as unavailable *and* that is expected to *fail* if deployed on an older system.
+
+* if `use_system_cxx_lib` is passed to lit, the following features will also
+ be available:
+
+ - with_system_cxx_lib
+ - with_system_cxx_lib=x86_64
+ - with_system_cxx_lib=macosx
+ - with_system_cxx_lib=x86_64-macosx
+ - with_system_cxx_lib=x86_64-apple-macosx10.8
+ - with_system_cxx_lib=macosx10.8
+
+ This feature is used to XFAIL a test that is *not* using a class of a method
+ marked as unavailable *but* that is expected to fail if deployed on an older
+ system. For example if we know that it exhibits a but in the libc on a
+ particular system version.
+
+* if `with_availability` is passed to lit, the following features will also
+ be available:
+
+ - availability_markup
+ - availability_markup=x86_64
+ - availability_markup=macosx
+ - availability_markup=x86_64-macosx
+ - availability_markup=x86_64-apple-macosx10.8
+ - availability_markup=macosx10.8
+
+ This feature is used to XFAIL a test that *is* using a class of a method
+ marked as unavailable *but* that is expected to *pass* if deployed on an older
+ system. For example if it is using a symbol in a statically evaluated context.
diff --git a/docs/index.rst b/docs/index.rst
index 58043f5a49aa..3526b47210f0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -128,6 +128,7 @@ Design Documents
.. toctree::
:maxdepth: 1
+ DesignDocs/AvailabilityMarkup
DesignDocs/DebugMode
DesignDocs/CapturingConfigInfo
DesignDocs/ABIVersioning
@@ -145,7 +146,7 @@ Build Bots and Test Coverage
* `LLVM Buildbot Builders <http://lab.llvm.org:8011/console>`_
* `Apple Jenkins Builders <http://lab.llvm.org:8080/green/view/Libcxx/>`_
-* `EricWF's Nightly Builders <http://ds2.efcs.ca:8080/console>`_
+* `Windows Appveyor Builders <https://ci.appveyor.com/project/llvm-mirror/libcxx>`_
* `Code Coverage Results <http://efcs.ca/libcxx-coverage>`_
Getting Involved
diff --git a/include/__config b/include/__config
index ee46860495ae..2a2907494b2b 100644
--- a/include/__config
+++ b/include/__config
@@ -314,7 +314,7 @@ typedef __char32_t char32_t;
#define _LIBCPP_NO_EXCEPTIONS
#endif
-#if !(__has_feature(cxx_rtti))
+#if !(__has_feature(cxx_rtti)) && !defined(_LIBCPP_NO_RTTI)
#define _LIBCPP_NO_RTTI
#endif
@@ -1089,6 +1089,13 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
# define _LIBCPP_DIAGNOSE_ERROR(...)
#endif
+#if __has_attribute(fallthough) || _GNUC_VER >= 700
+// Use a function like macro to imply that it must be followed by a semicolon
+#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__))
+#else
+#define _LIBCPP_FALLTHROUGH() ((void)0)
+#endif
+
#if defined(_LIBCPP_ABI_MICROSOFT) && \
(defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
@@ -1113,4 +1120,77 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif // __cplusplus
+// Decide whether to use availability macros.
+#if !defined(_LIBCPP_BUILDING_LIBRARY) && \
+ !defined(_LIBCPP_DISABLE_AVAILABILITY) && \
+ __has_feature(attribute_availability_with_strict) && \
+ __has_feature(attribute_availability_in_templates)
+#ifdef __APPLE__
+#define _LIBCPP_USE_AVAILABILITY_APPLE
+#endif
+#endif
+
+// Define availability macros.
+#if defined(_LIBCPP_USE_AVAILABILITY_APPLE)
+#define _LIBCPP_AVAILABILITY_SHARED_MUTEX \
+ __attribute__((availability(macosx,strict,introduced=10.12))) \
+ __attribute__((availability(ios,strict,introduced=10.0))) \
+ __attribute__((availability(tvos,strict,introduced=10.0))) \
+ __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_UNCAUGHT_EXCEPTIONS \
+ __attribute__((availability(macosx,strict,introduced=10.12))) \
+ __attribute__((availability(ios,strict,introduced=10.0))) \
+ __attribute__((availability(tvos,strict,introduced=10.0))) \
+ __attribute__((availability(watchos,strict,introduced=3.0)))
+#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \
+ __attribute__((availability(macosx,strict,introduced=10.12))) \
+ __attribute__((availability(ios,strict,introduced=10.0))) \
+ __attribute__((availability(tvos,strict,introduced=10.0))) \
+ __attribute__((availability(watchos,strict,introduced=3.0)))
+#define _LIBCPP_AVAILABILITY_FUTURE_ERROR \
+ __attribute__((availability(ios,strict,introduced=6.0)))
+#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \
+ __attribute__((availability(macosx,strict,introduced=10.9))) \
+ __attribute__((availability(ios,strict,introduced=7.0)))
+#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \
+ __attribute__((availability(macosx,strict,introduced=10.9))) \
+ __attribute__((availability(ios,strict,introduced=7.0)))
+#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \
+ __attribute__((availability(macosx,strict,introduced=10.9))) \
+ __attribute__((availability(ios,strict,introduced=7.0)))
+#else
+#define _LIBCPP_AVAILABILITY_SHARED_MUTEX
+#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
+#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
+#endif
+
+// Define availability that depends on _LIBCPP_NO_EXCEPTIONS.
+#ifdef _LIBCPP_NO_EXCEPTIONS
+#define _LIBCPP_AVAILABILITY_DYNARRAY
+#define _LIBCPP_AVAILABILITY_FUTURE
+#else
+#define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
+#define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR
+#endif
+
+// Availability of stream API in the dylib got dropped and re-added. The
+// extern template should effectively be available at:
+// availability(macosx,introduced=10.9)
+// 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) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
+ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000))
+#define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE
+#endif
+
#endif // _LIBCPP_CONFIG
diff --git a/include/__locale b/include/__locale
index 918cd1df5c6b..4184e7e03489 100644
--- a/include/__locale
+++ b/include/__locale
@@ -69,6 +69,7 @@ public:
class _LIBCPP_TYPE_VIS id;
typedef int category;
+ _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
static const category // values assigned here are for exposition only
none = 0,
collate = LC_COLLATE_MASK,
diff --git a/include/__threading_support b/include/__threading_support
index aa947139a4e9..080ebd256b8f 100644
--- a/include/__threading_support
+++ b/include/__threading_support
@@ -474,7 +474,10 @@ int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
timeout_ms.count() > 0 ? timeout_ms.count()
: 0,
0))
- return GetLastError();
+ {
+ auto __ec = GetLastError();
+ return __ec == ERROR_TIMEOUT ? ETIMEDOUT : __ec;
+ }
return 0;
}
diff --git a/include/exception b/include/exception
index f12ae42093aa..ca2eaf5c6a04 100644
--- a/include/exception
+++ b/include/exception
@@ -127,30 +127,33 @@ _LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
-_LIBCPP_FUNC_VIS int uncaught_exceptions() _NOEXCEPT;
+_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
class _LIBCPP_TYPE_VIS exception_ptr;
_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+#ifndef _LIBCPP_ABI_MICROSOFT
+
class _LIBCPP_TYPE_VIS exception_ptr
{
void* __ptr_;
public:
_LIBCPP_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {}
_LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
+
exception_ptr(const exception_ptr&) _NOEXCEPT;
exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
~exception_ptr() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_EXPLICIT
- operator bool() const _NOEXCEPT {return __ptr_ != nullptr;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT
+ {return __ptr_ != nullptr;}
friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
{return __x.__ptr_ == __y.__ptr_;}
+
friend _LIBCPP_INLINE_VISIBILITY
bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
{return !(__x == __y);}
@@ -178,6 +181,54 @@ make_exception_ptr(_Ep __e) _NOEXCEPT
#endif
}
+#else // _LIBCPP_ABI_MICROSOFT
+
+class _LIBCPP_TYPE_VIS exception_ptr
+{
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-private-field"
+#endif
+ void* __ptr1_;
+ void* __ptr2_;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+public:
+ exception_ptr() _NOEXCEPT;
+ exception_ptr(nullptr_t) _NOEXCEPT;
+ exception_ptr(const exception_ptr& __other) _NOEXCEPT;
+ exception_ptr& operator=(const exception_ptr& __other) _NOEXCEPT;
+ exception_ptr& operator=(nullptr_t) _NOEXCEPT;
+ ~exception_ptr() _NOEXCEPT;
+ _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT;
+};
+
+_LIBCPP_FUNC_VIS
+bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT;
+
+inline _LIBCPP_INLINE_VISIBILITY
+bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
+ {return !(__x == __y);}
+
+_LIBCPP_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT;
+
+_LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr);
+_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr p);
+
+// This is a built-in template function which automagically extracts the required
+// information.
+template <class _E> void *__GetExceptionInfo(_E);
+
+template<class _Ep>
+exception_ptr
+make_exception_ptr(_Ep __e) _NOEXCEPT
+{
+ return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e));
+}
+
+#endif // _LIBCPP_ABI_MICROSOFT
// nested_exception
class _LIBCPP_EXCEPTION_ABI nested_exception
diff --git a/include/experimental/dynarray b/include/experimental/dynarray
index 8c9733770c3b..f96a0e5fed38 100644
--- a/include/experimental/dynarray
+++ b/include/experimental/dynarray
@@ -110,7 +110,7 @@ public:
namespace std { namespace experimental { inline namespace __array_extensions_v1 {
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS dynarray
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_DYNARRAY dynarray
{
public:
// types:
diff --git a/include/experimental/optional b/include/experimental/optional
index f32941b1a8e7..48adfbae5167 100644
--- a/include/experimental/optional
+++ b/include/experimental/optional
@@ -145,7 +145,7 @@ namespace std { namespace experimental { inline namespace fundamentals_v1 {
#include <stdexcept>
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
-class _LIBCPP_EXCEPTION_ABI bad_optional_access
+class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
: public std::logic_error
{
public:
@@ -523,6 +523,9 @@ public:
constexpr explicit operator bool() const noexcept {return this->__engaged_;}
_LIBCPP_NORETURN _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCPP_NO_EXCEPTIONS
+_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#endif
constexpr void __throw_bad_optional_access() const
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -532,7 +535,7 @@ public:
#endif
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
constexpr value_type const& value() const
{
if (!this->__engaged_)
@@ -540,7 +543,7 @@ public:
return this->__val_;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
value_type& value()
{
if (!this->__engaged_)
diff --git a/include/functional b/include/functional
index 386fe678bff3..ea35697d3bbf 100644
--- a/include/functional
+++ b/include/functional
@@ -2224,7 +2224,7 @@ typename __bind_return<_Fp, _BoundArgs, _Args>::type
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
_Args&& __args)
{
- return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...);
+ return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...);
}
template<class _Fp, class ..._BoundArgs>
@@ -2257,7 +2257,7 @@ public:
typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
operator()(_Args&& ...__args)
{
- return __apply_functor(__f_, __bound_args_, __indices(),
+ return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
}
@@ -2266,7 +2266,7 @@ public:
typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
operator()(_Args&& ...__args) const
{
- return __apply_functor(__f_, __bound_args_, __indices(),
+ return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
}
};
diff --git a/include/future b/include/future
index 1ceedf91e9cd..e38876758e13 100644
--- a/include/future
+++ b/include/future
@@ -499,7 +499,7 @@ make_error_condition(future_errc __e) _NOEXCEPT
return error_condition(static_cast<int>(__e), future_category());
}
-class _LIBCPP_EXCEPTION_ABI future_error
+class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
: public logic_error
{
error_code __ec_;
@@ -515,6 +515,9 @@ public:
};
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
+#ifndef _LIBCPP_NO_EXCEPTIONS
+_LIBCPP_AVAILABILITY_FUTURE_ERROR
+#endif
void __throw_future_error(future_errc _Ev)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -525,7 +528,7 @@ void __throw_future_error(future_errc _Ev)
#endif
}
-class _LIBCPP_TYPE_VIS __assoc_sub_state
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state
: public __shared_count
{
protected:
@@ -612,7 +615,7 @@ __assoc_sub_state::wait_for(const chrono::duration<_Rep, _Period>& __rel_time) c
}
template <class _Rp>
-class __assoc_state
+class _LIBCPP_AVAILABILITY_FUTURE __assoc_state
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -652,6 +655,7 @@ __assoc_state<_Rp>::__on_zero_shared() _NOEXCEPT
template <class _Rp>
template <class _Arg>
+_LIBCPP_AVAILABILITY_FUTURE
void
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__assoc_state<_Rp>::set_value(_Arg&& __arg)
@@ -707,7 +711,7 @@ __assoc_state<_Rp>::copy()
}
template <class _Rp>
-class __assoc_state<_Rp&>
+class _LIBCPP_AVAILABILITY_FUTURE __assoc_state<_Rp&>
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -767,7 +771,7 @@ __assoc_state<_Rp&>::copy()
}
template <class _Rp, class _Alloc>
-class __assoc_state_alloc
+class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc
: public __assoc_state<_Rp>
{
typedef __assoc_state<_Rp> base;
@@ -795,7 +799,7 @@ __assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
}
template <class _Rp, class _Alloc>
-class __assoc_state_alloc<_Rp&, _Alloc>
+class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc<_Rp&, _Alloc>
: public __assoc_state<_Rp&>
{
typedef __assoc_state<_Rp&> base;
@@ -821,7 +825,7 @@ __assoc_state_alloc<_Rp&, _Alloc>::__on_zero_shared() _NOEXCEPT
}
template <class _Alloc>
-class __assoc_sub_state_alloc
+class _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state_alloc
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -847,7 +851,7 @@ __assoc_sub_state_alloc<_Alloc>::__on_zero_shared() _NOEXCEPT
}
template <class _Rp, class _Fp>
-class __deferred_assoc_state
+class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state
: public __assoc_state<_Rp>
{
typedef __assoc_state<_Rp> base;
@@ -894,7 +898,7 @@ __deferred_assoc_state<_Rp, _Fp>::__execute()
}
template <class _Fp>
-class __deferred_assoc_state<void, _Fp>
+class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state<void, _Fp>
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -942,7 +946,7 @@ __deferred_assoc_state<void, _Fp>::__execute()
}
template <class _Rp, class _Fp>
-class __async_assoc_state
+class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state
: public __assoc_state<_Rp>
{
typedef __assoc_state<_Rp> base;
@@ -997,7 +1001,7 @@ __async_assoc_state<_Rp, _Fp>::__on_zero_shared() _NOEXCEPT
}
template <class _Fp>
-class __async_assoc_state<void, _Fp>
+class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp>
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -1076,7 +1080,7 @@ __make_async_assoc_state(_Fp __f);
#endif
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS future
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future
{
__assoc_state<_Rp>* __state_;
@@ -1179,7 +1183,7 @@ future<_Rp>::get()
}
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS future<_Rp&>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&>
{
__assoc_state<_Rp&>* __state_;
@@ -1277,7 +1281,7 @@ future<_Rp&>::get()
}
template <>
-class _LIBCPP_TYPE_VIS future<void>
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future<void>
{
__assoc_sub_state* __state_;
@@ -1360,7 +1364,7 @@ swap(future<_Rp>& __x, future<_Rp>& __y) _NOEXCEPT
template <class _Callable> class packaged_task;
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS promise
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise
{
__assoc_state<_Rp>* __state_;
@@ -1527,7 +1531,7 @@ promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
// promise<R&>
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS promise<_Rp&>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<_Rp&>
{
__assoc_state<_Rp&>* __state_;
@@ -1663,7 +1667,7 @@ promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
// promise<void>
template <>
-class _LIBCPP_TYPE_VIS promise<void>
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<void>
{
__assoc_sub_state* __state_;
@@ -1749,7 +1753,7 @@ template <class _Rp, class _Alloc>
template<class _Fp> class __packaged_task_base;
template<class _Rp, class ..._ArgTypes>
-class __packaged_task_base<_Rp(_ArgTypes...)>
+class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_base<_Rp(_ArgTypes...)>
{
__packaged_task_base(const __packaged_task_base&);
__packaged_task_base& operator=(const __packaged_task_base&);
@@ -1767,7 +1771,7 @@ public:
template<class _FD, class _Alloc, class _FB> class __packaged_task_func;
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
-class __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>
+class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>
: public __packaged_task_base<_Rp(_ArgTypes...)>
{
__compressed_pair<_Fp, _Alloc> __f_;
@@ -1825,7 +1829,7 @@ __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ...
template <class _Callable> class __packaged_task_function;
template<class _Rp, class ..._ArgTypes>
-class __packaged_task_function<_Rp(_ArgTypes...)>
+class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_function<_Rp(_ArgTypes...)>
{
typedef __packaged_task_base<_Rp(_ArgTypes...)> __base;
typename aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -2000,7 +2004,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) cons
}
template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_TEMPLATE_VIS packaged_task<_Rp(_ArgTypes...)>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)>
{
public:
typedef _Rp result_type; // extension
@@ -2129,7 +2133,7 @@ packaged_task<_Rp(_ArgTypes...)>::reset()
}
template<class ..._ArgTypes>
-class _LIBCPP_TEMPLATE_VIS packaged_task<void(_ArgTypes...)>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<void(_ArgTypes...)>
{
public:
typedef void result_type; // extension
@@ -2517,7 +2521,7 @@ shared_future<_Rp&>::operator=(const shared_future& __rhs)
}
template <>
-class _LIBCPP_TYPE_VIS shared_future<void>
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future<void>
{
__assoc_sub_state* __state_;
diff --git a/include/istream b/include/istream
index 9a8bb44ef3ec..530f204cfad9 100644
--- a/include/istream
+++ b/include/istream
@@ -1675,9 +1675,11 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
return __is;
}
+#ifndef _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>)
+#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/locale b/include/locale
index 6bce16e64884..ad1c1f0083ec 100644
--- a/include/locale
+++ b/include/locale
@@ -1402,6 +1402,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
this->__format_int(__fmt+1, __len, true, __iob.flags());
const unsigned __nbuf = (numeric_limits<long>::digits / 3)
+ ((numeric_limits<long>::digits % 3) != 0)
+ + ((__iob.flags() & ios_base::showbase) != 0)
+ 2;
char __nar[__nbuf];
int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
@@ -1428,6 +1429,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
this->__format_int(__fmt+1, __len, true, __iob.flags());
const unsigned __nbuf = (numeric_limits<long long>::digits / 3)
+ ((numeric_limits<long long>::digits % 3) != 0)
+ + ((__iob.flags() & ios_base::showbase) != 0)
+ 2;
char __nar[__nbuf];
int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
@@ -1454,6 +1456,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
this->__format_int(__fmt+1, __len, false, __iob.flags());
const unsigned __nbuf = (numeric_limits<unsigned long>::digits / 3)
+ ((numeric_limits<unsigned long>::digits % 3) != 0)
+ + ((__iob.flags() & ios_base::showbase) != 0)
+ 1;
char __nar[__nbuf];
int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
@@ -1480,6 +1483,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
this->__format_int(__fmt+1, __len, false, __iob.flags());
const unsigned __nbuf = (numeric_limits<unsigned long long>::digits / 3)
+ ((numeric_limits<unsigned long long>::digits % 3) != 0)
+ + ((__iob.flags() & ios_base::showbase) != 0)
+ 1;
char __nar[__nbuf];
int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
@@ -1685,6 +1689,22 @@ protected:
~__time_get_c_storage() {}
};
+template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__weeks() const;
+template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__months() const;
+template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__am_pm() const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__c() const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__r() const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__x() const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__X() const;
+
+template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
+template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__months() const;
+template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
+template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__c() const;
+template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__r() const;
+template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__x() const;
+template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__X() const;
+
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS time_get
: public locale::facet,
@@ -2825,7 +2845,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
return false;
}
}
- // drop through
+ _LIBCPP_FALLTHROUGH();
case money_base::none:
if (__p != 3)
{
diff --git a/include/memory b/include/memory
index 3fc0e5a1bf12..41ab01b46f7e 100644
--- a/include/memory
+++ b/include/memory
@@ -3559,7 +3559,7 @@ template <class _Tp, class _Dp, class _Alloc>
const void*
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
{
- return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : 0;
+ return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr;
}
#endif // _LIBCPP_NO_RTTI
@@ -5293,7 +5293,8 @@ private:
friend _LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*);
};
-_LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*);
+_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+__sp_mut& __get_sp_mut(const void*);
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
@@ -5304,6 +5305,7 @@ atomic_is_lock_free(const shared_ptr<_Tp>*)
}
template <class _Tp>
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_load(const shared_ptr<_Tp>* __p)
{
@@ -5316,6 +5318,7 @@ atomic_load(const shared_ptr<_Tp>* __p)
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
{
@@ -5323,6 +5326,7 @@ atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
}
template <class _Tp>
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
void
atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
@@ -5334,6 +5338,7 @@ atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
void
atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
{
@@ -5341,6 +5346,7 @@ atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
}
template <class _Tp>
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
@@ -5353,6 +5359,7 @@ atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
{
@@ -5360,6 +5367,7 @@ atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order
}
template <class _Tp>
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
@@ -5381,6 +5389,7 @@ atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, share
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
@@ -5389,6 +5398,7 @@ atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
shared_ptr<_Tp> __w, memory_order, memory_order)
@@ -5398,6 +5408,7 @@ atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* _
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
shared_ptr<_Tp> __w, memory_order, memory_order)
diff --git a/include/new b/include/new
index c0e7b2dafe5b..34df2efee09e 100644
--- a/include/new
+++ b/include/new
@@ -146,9 +146,8 @@ _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
#if defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11)
-class _LIBCPP_EXCEPTION_ABI bad_array_length
- : public bad_alloc
-{
+class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
+ bad_array_length : public bad_alloc {
public:
bad_array_length() _NOEXCEPT;
virtual ~bad_array_length() _NOEXCEPT;
@@ -182,7 +181,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::not
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
#endif
_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
@@ -190,7 +189,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::n
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
#endif
#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
@@ -199,7 +198,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val
_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;
#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE 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;
@@ -207,7 +206,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_v
_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;
#ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
#endif
#endif
@@ -238,6 +237,9 @@ inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate(void *__ptr) {
#ifdef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
+#ifndef _LIBCPP_NO_EXCEPTIONS
+_LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
+#endif
void __throw_bad_array_length()
{
#ifndef _LIBCPP_NO_EXCEPTIONS
diff --git a/include/ostream b/include/ostream
index ca2c83f74a3f..9bf8d3cdcfb5 100644
--- a/include/ostream
+++ b/include/ostream
@@ -1080,8 +1080,10 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
use_facet<ctype<_CharT> >(__os.getloc()).widen('1'));
}
+#ifndef _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>)
+#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/random b/include/random
index 83fff90a4178..6c36e8c01ae2 100644
--- a/include/random
+++ b/include/random
@@ -3997,16 +3997,30 @@ public:
{return !(__x == __y);}
};
+#ifndef _LIBCPP_MSVCRT
+extern "C" double lgamma_r(double, int *);
+#endif
+
+inline _LIBCPP_INLINE_VISIBILITY double __libcpp_lgamma(double __d) {
+#if defined(_LIBCPP_MSVCRT)
+ return lgamma(__d);
+#else
+ int __sign;
+ return lgamma_r(__d, &__sign);
+#endif
+}
+
template<class _IntType>
-binomial_distribution<_IntType>::param_type::param_type(result_type __t, double __p)
+binomial_distribution<_IntType>::param_type::param_type(const result_type __t, const double __p)
: __t_(__t), __p_(__p)
{
if (0 < __p_ && __p_ < 1)
{
__r0_ = static_cast<result_type>((__t_ + 1) * __p_);
- __pr_ = _VSTD::exp(_VSTD::lgamma(__t_ + 1.) - _VSTD::lgamma(__r0_ + 1.) -
- _VSTD::lgamma(__t_ - __r0_ + 1.) + __r0_ * _VSTD::log(__p_) +
- (__t_ - __r0_) * _VSTD::log(1 - __p_));
+ __pr_ = _VSTD::exp(__libcpp_lgamma(__t_ + 1.) -
+ __libcpp_lgamma(__r0_ + 1.) -
+ __libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * _VSTD::log(__p_) +
+ (__t_ - __r0_) * _VSTD::log(1 - __p_));
__odds_ratio_ = __p_ / (1 - __p_);
}
}
diff --git a/include/shared_mutex b/include/shared_mutex
index f2fd667b5c67..ff36ee6ac67d 100644
--- a/include/shared_mutex
+++ b/include/shared_mutex
@@ -141,7 +141,7 @@ template <class Mutex>
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TYPE_VIS __shared_mutex_base
+struct _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX __shared_mutex_base
{
mutex __mut_;
condition_variable __gate1_;
@@ -173,11 +173,11 @@ struct _LIBCPP_TYPE_VIS __shared_mutex_base
#if _LIBCPP_STD_VER > 14
-class _LIBCPP_TYPE_VIS shared_mutex
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
{
__shared_mutex_base __base;
public:
- shared_mutex() : __base() {}
+ _LIBCPP_INLINE_VISIBILITY shared_mutex() : __base() {}
_LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
shared_mutex(const shared_mutex&) = delete;
@@ -199,7 +199,7 @@ public:
#endif
-class _LIBCPP_TYPE_VIS shared_timed_mutex
+class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
{
__shared_mutex_base __base;
public:
diff --git a/include/streambuf b/include/streambuf
index 86070659a4b4..12eded5c4d31 100644
--- a/include/streambuf
+++ b/include/streambuf
@@ -476,11 +476,13 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type)
return traits_type::eof();
}
+#ifndef _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>)
+#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/support/win32/locale_win32.h b/include/support/win32/locale_win32.h
index 2f4f90f52af5..bc717d97990a 100644
--- a/include/support/win32/locale_win32.h
+++ b/include/support/win32/locale_win32.h
@@ -11,6 +11,7 @@
#ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
+#include <__config>
#include "support/win32/support.h"
#include "support/win32/locale_mgmt_win32.h"
#include <stdio.h>
@@ -83,9 +84,9 @@ isupper_l(int c, _locale_t loc)
#define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ )
#define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ )
#define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ )
-int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...);
-int asprintf_l( char **ret, locale_t loc, const char *format, ... );
-int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
+_LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...);
+_LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... );
+_LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
// not-so-pressing FIXME: use locale to determine blank characters
diff --git a/include/typeinfo b/include/typeinfo
index 4145ac1a3737..8624b349764a 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -108,6 +108,7 @@ protected:
#endif
public:
+ _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
virtual ~type_info();
#if defined(_LIBCPP_HAS_NONUNIQUE_TYPEINFO)
diff --git a/install-appveyor-reqs.cmd b/install-appveyor-reqs.cmd
new file mode 100644
index 000000000000..ebd72ca0a2da
--- /dev/null
+++ b/install-appveyor-reqs.cmd
@@ -0,0 +1,47 @@
+@echo on
+if NOT EXIST C:\projects\deps (
+ mkdir C:\projects\deps
+)
+cd C:\projects\deps
+
+::###########################################################################
+:: Setup the path to Clang-cl
+::###########################################################################
+if NOT EXIST llvm-installer.exe (
+ appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r301646-win32.exe -FileName llvm-installer.exe
+)
+if "%CLANG_VERSION%"=="ToT" (
+ START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
+)
+@set PATH="C:\Program Files\LLVM\bin";%PATH%
+clang-cl -v
+
+::###########################################################################
+:: Install a recent CMake
+::###########################################################################
+if NOT EXIST cmake (
+ appveyor DownloadFile https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.zip -FileName cmake.zip
+ 7z x cmake.zip -oC:\projects\deps > nul
+ move C:\projects\deps\cmake-* C:\projects\deps\cmake
+ rm cmake.zip
+)
+@set PATH=C:\projects\deps\cmake\bin;%PATH%
+cmake --version
+
+::###########################################################################
+:: Install Ninja
+::###########################################################################
+if NOT EXIST ninja (
+ appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip -FileName ninja.zip
+ 7z x ninja.zip -oC:\projects\deps\ninja > nul
+ rm ninja.zip
+)
+@set PATH=C:\projects\deps\ninja;%PATH%
+ninja --version
+
+::###########################################################################
+:: Setup the cached copy of LLVM
+::###########################################################################
+git clone --depth=1 http://llvm.org/git/llvm.git
+
+@echo off
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 15dc05c761c2..6161838d0dfd 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -121,6 +121,7 @@ if (LIBCXX_TARGETING_MSVC)
add_library_flags(ucrt${LIB_SUFFIX}) # Universal C runtime
add_library_flags(vcruntime${LIB_SUFFIX}) # C++ runtime
add_library_flags(msvcrt${LIB_SUFFIX}) # C runtime startup files
+ add_library_flags(msvcprt${LIB_SUFFIX}) # C++ standard library. Required for exception_ptr internals.
# Required for standards-complaint wide character formatting functions
# (e.g. `printfw`/`scanfw`)
add_library_flags(iso_stdio_wide_specifiers)
diff --git a/src/exception.cpp b/src/exception.cpp
index 0b502cd134c0..4359d126173a 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -20,7 +20,7 @@
#if defined(_LIBCPP_ABI_MICROSOFT)
#include "support/runtime/exception_msvc.ipp"
-#include "support/runtime/exception_pointer_unimplemented.ipp"
+#include "support/runtime/exception_pointer_msvc.ipp"
#elif defined(_LIBCPPABI_VERSION)
#include "support/runtime/exception_libcxxabi.ipp"
#include "support/runtime/exception_pointer_cxxabi.ipp"
diff --git a/src/experimental/filesystem/operations.cpp b/src/experimental/filesystem/operations.cpp
index bd7685819eca..2856ae453a6b 100644
--- a/src/experimental/filesystem/operations.cpp
+++ b/src/experimental/filesystem/operations.cpp
@@ -513,8 +513,8 @@ bool checked_set(CType* out, ChronoType time) {
return true;
}
-using TimeSpec = struct ::timespec;
-using StatT = struct ::stat;
+using TimeSpec = struct timespec;
+using StatT = struct stat;
#if defined(__APPLE__)
TimeSpec extract_mtime(StatT const& st) { return st.st_mtimespec; }
diff --git a/src/locale.cpp b/src/locale.cpp
index 1460f9662e35..1ed9b41fd4ad 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -68,8 +68,8 @@ T&
make(A0 a0)
{
static typename aligned_storage<sizeof(T)>::type buf;
- ::new (&buf) T(a0);
- return *reinterpret_cast<T*>(&buf);
+ auto *obj = ::new (&buf) T(a0);
+ return *obj;
}
template <class T, class A0, class A1>
@@ -88,8 +88,8 @@ T&
make(A0 a0, A1 a1, A2 a2)
{
static typename aligned_storage<sizeof(T)>::type buf;
- ::new (&buf) T(a0, a1, a2);
- return *reinterpret_cast<T*>(&buf);
+ auto *obj = ::new (&buf) T(a0, a1, a2);
+ return *obj;
}
template <typename T, size_t N>
@@ -480,8 +480,8 @@ locale::__imp::make_global()
{
// only one thread can get in here and it only gets in once
static aligned_storage<sizeof(locale)>::type buf;
- ::new (&buf) locale(locale::classic());
- return *reinterpret_cast<locale*>(&buf);
+ auto *obj = ::new (&buf) locale(locale::classic());
+ return *obj;
}
locale&
diff --git a/src/memory.cpp b/src/memory.cpp
index f6f6fe8da628..4e0d3af9167e 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -120,7 +120,7 @@ __shared_weak_count::lock() _NOEXCEPT
object_owners+1))
return this;
}
- return 0;
+ return nullptr;
}
#if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC)
@@ -128,7 +128,7 @@ __shared_weak_count::lock() _NOEXCEPT
const void*
__shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT
{
- return 0;
+ return nullptr;
}
#endif // _LIBCPP_NO_RTTI
@@ -154,7 +154,7 @@ __sp_mut::lock() _NOEXCEPT
{
auto m = static_cast<__libcpp_mutex_t*>(__lx);
unsigned count = 0;
- while (__libcpp_mutex_trylock(m) != 0)
+ while (!__libcpp_mutex_trylock(m))
{
if (++count > 16)
{
diff --git a/src/support/runtime/exception_pointer_msvc.ipp b/src/support/runtime/exception_pointer_msvc.ipp
new file mode 100644
index 000000000000..a8cd0e8d304d
--- /dev/null
+++ b/src/support/runtime/exception_pointer_msvc.ipp
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+#include <stdlib.h>
+
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrCreate(_Out_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrDestroy(_Inout_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrCopy(_Out_ void*,
+ _In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrAssign(_Inout_ void*, _In_ const void*);
+_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCompare(_In_ const void*, _In_ const void*);
+_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrToBool(_In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrSwap(_Inout_ void*,
+ _Inout_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCurrentException(_Out_ void*);
+[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrRethrow(_In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCopyException(_Inout_ void*, _In_ const void*, _In_ const void*);
+
+namespace std {
+
+exception_ptr::exception_ptr() _NOEXCEPT { __ExceptionPtrCreate(this); }
+exception_ptr::exception_ptr(nullptr_t) _NOEXCEPT { __ExceptionPtrCreate(this); }
+
+exception_ptr::exception_ptr(const exception_ptr& __other) _NOEXCEPT {
+ __ExceptionPtrCopy(this, &__other);
+}
+exception_ptr& exception_ptr::operator=(const exception_ptr& __other) _NOEXCEPT {
+ __ExceptionPtrAssign(this, &__other);
+ return *this;
+}
+
+exception_ptr& exception_ptr::operator=(nullptr_t) _NOEXCEPT {
+ exception_ptr dummy;
+ __ExceptionPtrAssign(this, &dummy);
+ return *this;
+}
+
+exception_ptr::~exception_ptr() _NOEXCEPT { __ExceptionPtrDestroy(this); }
+
+exception_ptr::operator bool() const _NOEXCEPT {
+ return __ExceptionPtrToBool(this);
+}
+
+bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT {
+ return __ExceptionPtrCompare(&__x, &__y);
+}
+
+
+void swap(exception_ptr& lhs, exception_ptr& rhs) _NOEXCEPT {
+ __ExceptionPtrSwap(&rhs, &lhs);
+}
+
+exception_ptr __copy_exception_ptr(void* __except, const void* __ptr) {
+ exception_ptr __ret = nullptr;
+ if (__ptr)
+ __ExceptionPtrCopyException(&__ret, __except, __ptr);
+ return __ret;
+}
+
+exception_ptr current_exception() _NOEXCEPT {
+ exception_ptr __ret;
+ __ExceptionPtrCurrentException(&__ret);
+ return __ret;
+}
+
+_LIBCPP_NORETURN
+void rethrow_exception(exception_ptr p) { __ExceptionPtrRethrow(&p); }
+
+nested_exception::nested_exception() _NOEXCEPT : __ptr_(current_exception()) {}
+
+nested_exception::~nested_exception() _NOEXCEPT {}
+
+_LIBCPP_NORETURN
+void nested_exception::rethrow_nested() const {
+ if (__ptr_ == nullptr)
+ terminate();
+ rethrow_exception(__ptr_);
+}
+
+} // namespace std
diff --git a/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp b/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
index 8214e1e20686..ef3ef7519d69 100644
--- a/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
+++ b/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
@@ -12,7 +12,7 @@
// template <class RandomAccessIterator>
// void
// random_shuffle(RandomAccessIterator first, RandomAccessIterator last);
-//
+//
// template <class RandomAccessIterator, class RandomNumberGenerator>
// void
// random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
diff --git a/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp b/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp
index c84960f37686..a0b35f3351e9 100644
--- a/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp
@@ -8,6 +8,8 @@
//===----------------------------------------------------------------------===//
// <list>
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
// list(list&& c);
diff --git a/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp b/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp
index dd424e89e756..570e5a0b33c6 100644
--- a/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp
@@ -9,6 +9,9 @@
// UNSUPPORTED: c++98, c++03
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// list(list&& c);
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp
index 1d64f9bd9e27..67146bc7c1a5 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp
@@ -9,6 +9,9 @@
// UNSUPPORTED: c++98, c++03
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// template <class... Args> void emplace(const_iterator p, Args&&... args);
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp
index ec5de0264cb4..24cadbe01d66 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator position) with end()
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp
index 833e2b54dfaf..6d3e7617b964 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator position) with iterator from another container
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp
index eef7a98e739a..dd592f90ca70 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator first, const_iterator last); with first iterator from another container
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp
index 0dd03dc50da1..d5e8fd9d863e 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator first, const_iterator last); with second iterator from another container
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp
index 22273a89f1e5..3ae20cdc5e70 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator first, const_iterator last); with both iterators from another container
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp
index d1e03c8ac710..6d6e29e4728a 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// Call erase(const_iterator first, const_iterator last); with a bad range
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp
index 7fadb14affdd..03b9667cf329 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// template <InputIterator Iter>
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
index 0d0fd100fc91..589af7cc453b 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// iterator insert(const_iterator position, value_type&& x);
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp
index 4fdfbfa50cbb..6999c4053162 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// iterator insert(const_iterator position, size_type n, const value_type& x);
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp
index 9a13520b98eb..66983f01edbd 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// iterator insert(const_iterator position, const value_type& x);
diff --git a/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp b/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp
index 795e66d9702a..9151fc1ddb15 100644
--- a/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// void pop_back();
diff --git a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp
index 7a1180a9b585..541dd056b474 100644
--- a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// void splice(const_iterator position, list& x);
diff --git a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp
index fa5243e322bf..64ef78ed018f 100644
--- a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// void splice(const_iterator position, list<T,Allocator>& x, iterator i);
diff --git a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp
index a385b4cf7afa..9fed4b577678 100644
--- a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp
+++ b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// <list>
// void splice(const_iterator position, list& x, iterator first, iterator last);
diff --git a/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp b/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
index 91cdf85b1586..a727b31e41ef 100644
--- a/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
+++ b/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
@@ -12,6 +12,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=1
// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// test container debugging
#define _LIBCPP_DEBUG 1
diff --git a/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp b/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
index 6e2fb7bf3d0c..3ae009a8e96c 100644
--- a/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
+++ b/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
@@ -12,6 +12,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=1
// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// test container debugging
#define _LIBCPP_DEBUG 1
diff --git a/test/libcxx/debug/containers/db_string.pass.cpp b/test/libcxx/debug/containers/db_string.pass.cpp
index 8d1a622b4ffe..f6434d5c7f14 100644
--- a/test/libcxx/debug/containers/db_string.pass.cpp
+++ b/test/libcxx/debug/containers/db_string.pass.cpp
@@ -12,6 +12,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=1
// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// test container debugging
#define _LIBCPP_DEBUG 1
diff --git a/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp b/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
index 5618607fbc25..d6a31e36618e 100644
--- a/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
+++ b/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
@@ -12,6 +12,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=1
// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// test container debugging
#define _LIBCPP_DEBUG 1
diff --git a/test/libcxx/debug/debug_abort.pass.cpp b/test/libcxx/debug/debug_abort.pass.cpp
index b6e7b0bd805b..9a1b4753f186 100644
--- a/test/libcxx/debug/debug_abort.pass.cpp
+++ b/test/libcxx/debug/debug_abort.pass.cpp
@@ -10,6 +10,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=0
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// Test that the default debug handler aborts the program.
#define _LIBCPP_DEBUG 0
diff --git a/test/libcxx/debug/debug_throw.pass.cpp b/test/libcxx/debug/debug_throw.pass.cpp
index 716750c7859a..d1c88400b02a 100644
--- a/test/libcxx/debug/debug_throw.pass.cpp
+++ b/test/libcxx/debug/debug_throw.pass.cpp
@@ -11,6 +11,9 @@
// UNSUPPORTED: libcpp-no-exceptions
// MODULES_DEFINES: _LIBCPP_DEBUG=0
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// Test that the default debug handler can be overridden and test the
// throwing debug handler.
diff --git a/test/libcxx/debug/debug_throw_register.pass.cpp b/test/libcxx/debug/debug_throw_register.pass.cpp
index ec4be700e190..0d2586bf3461 100644
--- a/test/libcxx/debug/debug_throw_register.pass.cpp
+++ b/test/libcxx/debug/debug_throw_register.pass.cpp
@@ -12,6 +12,9 @@
// MODULES_DEFINES: _LIBCPP_DEBUG=1
// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
+// Can't test the system lib because this test enables debug mode
+// UNSUPPORTED: with_system_cxx_lib
+
// Test that defining _LIBCPP_DEBUG_USE_EXCEPTIONS causes _LIBCPP_ASSERT
// to throw on failure.
diff --git a/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
index 424fe52b3119..9b846939313b 100644
--- a/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
+++ b/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
@@ -34,14 +34,14 @@ int main()
typedef std::pointer_to_binary_function<int, int, int> PBF;
assert((std::ptr_fun<int, int>(identity)(4) == 4));
assert((std::ptr_fun<int, int, int>(sum)(4, 5) == 9));
-
+
Foo f;
assert((std::mem_fn(&Foo::identity)(f, 5) == 5));
assert((std::mem_fn(&Foo::sum)(f, 5, 6) == 11));
-
+
typedef std::mem_fun_ref_t<int, Foo> MFR;
typedef std::const_mem_fun_ref_t<int, Foo> CMFR;
-
+
assert((std::mem_fun_ref(&Foo::zero)(f) == 0));
assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5));
}
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
index 14f5c4ed8596..db7484d468da 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
@@ -8,6 +8,12 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
// dynarray.cons
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp
index 8d7d28b8395f..9c6cad8ee2d3 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-no-exceptions
+// XFAIL: availability
// dynarray.cons
// explicit dynarray(size_type c);
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp
index 84c602925cb4..5c745e0d1eaf 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
// dynarray.data
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp
index 376c94a6bcd8..1ed51538f6fa 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp
@@ -8,6 +8,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
+
// dynarray.data
// void fill(const T& v);
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
index ef9be4532dd7..473313f39fc4 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++98, c++03, c++11
// UNSUPPORTED: libcpp-no-exceptions
+// XFAIL: availability
+
// dynarray.overview
// const_reference at(size_type n) const;
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp
index 38aefdfbaf47..f0aa1e3ff691 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp
@@ -8,6 +8,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
+
// dynarray.overview
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp
index 95262aab1bdc..a5484296fa21 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp
@@ -8,6 +8,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
+
// dynarray.overview
// size_type size() const noexcept;
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp
index 4f1d0978dd11..0ba27cf925f7 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
// dynarray.overview
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp
index 4bcb229ebce0..4306d1e9c1b6 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
+
// dynarray.overview
// const_reference at(size_type n) const;
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp
index c0e0180930e9..ab4960035060 100644
--- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp
+++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
// dynarray.zero
// dynarray shall provide support for the special case of construction with a size of zero.
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg b/test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg
new file mode 100644
index 000000000000..93553b5130e3
--- /dev/null
+++ b/test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg
@@ -0,0 +1,3 @@
+if ('availability' in config.available_features
+ and not 'libcpp-no-exceptions' in config.available_features):
+ config.unsupported = True
diff --git a/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp
index cc99b83aca4e..c37d23433148 100644
--- a/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp
+++ b/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp
@@ -8,6 +8,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability
+
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
+
// test bad_array_length
#include <new>
diff --git a/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp b/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
index 8c17aabd640a..388fbebbd7b0 100644
--- a/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
+++ b/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
@@ -16,6 +16,13 @@
// REQUIRES: -faligned-allocation
+// 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
+
// RUN: %build -faligned-allocation
// RUN: %run
diff --git a/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp b/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp
index 12c0a3d5ef41..9efa597d73e1 100644
--- a/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp
+++ b/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp
@@ -6,10 +6,6 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-//
-
-// This test depends on std::exception_ptr which has not yet been implemented.
-// XFAIL: LIBCXX-WINDOWS-FIXME
// UNSUPPORTED: libcpp-no-exceptions
// UNSUPPORTED: libcpp-has-no-threads
diff --git a/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
index 713f4716c764..dca493382ba2 100644
--- a/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
+++ b/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// This test depends on std::exception_ptr which has not yet been implemented.
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// UNSUPPORTED: libcpp-no-exceptions
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: c++98, c++03
diff --git a/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp
index 1cf2d9e84562..8532998eb08d 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp
@@ -30,7 +30,7 @@ test()
int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
int ib[sa];
- OutIter r = std::remove_copy_if(InIter(ia), InIter(ia+sa),
+ OutIter r = std::remove_copy_if(InIter(ia), InIter(ia+sa),
OutIter(ib), equalToTwo);
assert(base(r) == ib + sa-3);
assert(ib[0] == 0);
diff --git a/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp b/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp
index 0a05c6f659ca..ec0526c2dc5c 100644
--- a/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp
+++ b/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp
@@ -25,7 +25,7 @@ struct eq {
bool operator () (int v2) const { return v == v2; }
int v;
};
-
+
int main()
{
diff --git a/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp b/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
index c942d2e38a58..761d71bbf287 100644
--- a/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
+++ b/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
@@ -25,7 +25,7 @@ struct eq {
bool operator () (int v2) const { return v == v2; }
int v;
};
-
+
int main()
{
int ia[] = {0, 1, 2, 3, 4, 5};
diff --git a/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp b/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp
index e68344b4b259..2e52e260336d 100644
--- a/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp
+++ b/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp
@@ -25,7 +25,7 @@ struct ne {
bool operator () (int v2) const { return v != v2; }
int v;
};
-
+
int main()
{
diff --git a/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp b/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp
index 81a8ae475168..c737f05fdc2e 100644
--- a/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp
@@ -48,7 +48,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
#endif
- c.emplace_back(1 == 1);
+ c.emplace_back(true);
assert(c.size() == 3);
assert(c.front() == false);
assert(c[1] == true);
@@ -82,7 +82,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
#endif
- c.emplace_back(1 == 1);
+ c.emplace_back(true);
assert(c.size() == 3);
assert(c.front() == false);
assert(c[1] == true);
diff --git a/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp b/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
index 64104a40ec74..89f5a6645d05 100644
--- a/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
@@ -32,7 +32,7 @@ int main()
static_assert((std::is_same<H::argument_type, T>::value), "" );
static_assert((std::is_same<H::result_type, std::size_t>::value), "" );
ASSERT_NOEXCEPT(H()(T()));
-
+
bool ba[] = {true, false, true, true, false};
T vb(std::begin(ba), std::end(ba));
H h;
diff --git a/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp b/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp
index dda19a9517fb..c829a97b4228 100644
--- a/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp
+++ b/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp
@@ -9,6 +9,10 @@
// <strstream>
+// There was an overflow in the dylib on older macOS versions
+// UNSUPPORTED: availability=macosx10.8
+// UNSUPPORTED: availability=macosx10.7
+
// class strstreambuf
// int overflow(int c);
diff --git a/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp b/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
index 65ecc4921212..0783de85c5ff 100644
--- a/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ b/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -7,6 +7,13 @@
//
//===----------------------------------------------------------------------===//
+// 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
+
// <system_error>
// class error_category
@@ -24,7 +31,7 @@ void test_message_for_bad_value() {
errno = E2BIG; // something that message will never generate
const std::error_category& e_cat1 = std::generic_category();
const std::string msg = e_cat1.message(-1);
- LIBCPP_ASSERT(msg == "Unknown error -1");
+ LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
assert(errno == E2BIG);
}
diff --git a/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
index d1a94883f925..8cccb025538d 100644
--- a/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ b/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -13,6 +13,13 @@
// const error_category& system_category();
+// 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
+
#include <system_error>
#include <cassert>
#include <string>
@@ -24,7 +31,7 @@ void test_message_for_bad_value() {
errno = E2BIG; // something that message will never generate
const std::error_category& e_cat1 = std::system_category();
const std::string msg = e_cat1.message(-1);
- LIBCPP_ASSERT(msg == "Unknown error -1");
+ LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
assert(errno == E2BIG);
}
diff --git a/test/std/experimental/any/any.class/any.assign/copy.pass.cpp b/test/std/experimental/any/any.class/any.assign/copy.pass.cpp
index 17b01fe630bf..7140fab88feb 100644
--- a/test/std/experimental/any/any.class/any.assign/copy.pass.cpp
+++ b/test/std/experimental/any/any.class/any.assign/copy.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any& operator=(any const &);
diff --git a/test/std/experimental/any/any.class/any.assign/move.pass.cpp b/test/std/experimental/any/any.class/any.assign/move.pass.cpp
index 49508febd941..35fc56c24d3f 100644
--- a/test/std/experimental/any/any.class/any.assign/move.pass.cpp
+++ b/test/std/experimental/any/any.class/any.assign/move.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any& operator=(any &&);
diff --git a/test/std/experimental/any/any.class/any.assign/value.pass.cpp b/test/std/experimental/any/any.class/any.assign/value.pass.cpp
index b42a4ba2b050..8ff4ad594151 100644
--- a/test/std/experimental/any/any.class/any.assign/value.pass.cpp
+++ b/test/std/experimental/any/any.class/any.assign/value.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any& operator=(any const &);
@@ -174,4 +181,4 @@ int main() {
test_assign_throws<small_throws_on_copy>();
test_assign_throws<large_throws_on_copy>();
test_assign_throws<throws_on_move, /* Move = */ true>();
-} \ No newline at end of file
+}
diff --git a/test/std/experimental/any/any.class/any.cons/copy.pass.cpp b/test/std/experimental/any/any.class/any.cons/copy.pass.cpp
index 69341ca6b801..47f12d739236 100644
--- a/test/std/experimental/any/any.class/any.cons/copy.pass.cpp
+++ b/test/std/experimental/any/any.class/any.cons/copy.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any(any const &);
diff --git a/test/std/experimental/any/any.class/any.cons/move.pass.cpp b/test/std/experimental/any/any.class/any.cons/move.pass.cpp
index 2a050946afab..c5395daa3da6 100644
--- a/test/std/experimental/any/any.class/any.cons/move.pass.cpp
+++ b/test/std/experimental/any/any.class/any.cons/move.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any(any &&) noexcept;
diff --git a/test/std/experimental/any/any.class/any.cons/value.pass.cpp b/test/std/experimental/any/any.class/any.cons/value.pass.cpp
index a3ab0edc8b6b..fcace5028eca 100644
--- a/test/std/experimental/any/any.class/any.cons/value.pass.cpp
+++ b/test/std/experimental/any/any.class/any.cons/value.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// template <class Value> any(Value &&)
@@ -113,4 +120,4 @@ int main() {
test_copy_value_throws<small_throws_on_copy>();
test_copy_value_throws<large_throws_on_copy>();
test_move_value_throws();
-} \ No newline at end of file
+}
diff --git a/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp b/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp
index 781ed73f2b33..1b0b75d61fee 100644
--- a/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp
+++ b/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any::clear() noexcept
diff --git a/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp b/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp
index b1d315468968..9f499b4a1fb3 100644
--- a/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp
+++ b/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp
@@ -9,6 +9,13 @@
// 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
+
// <experimental/any>
// any::swap(any &) noexcept
diff --git a/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
index 47fe52f7b1dd..ca6d1de116ee 100644
--- a/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+++ b/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability=macosx
+
// <experimental/any>
// template <class ValueType>
diff --git a/test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp b/test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
index c6cc68d72706..1c52a64fce62 100644
--- a/test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
+++ b/test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
@@ -42,4 +42,4 @@ int main() {
any_cast<no_copy>(static_cast<any &&>(a));
// expected-error@experimental/any:* 3 {{static_assert failed "_ValueType is required to be a reference or a CopyConstructible type."}}
// expected-error@experimental/any:* 3 {{calling a private constructor of class 'no_copy'}}
-} \ No newline at end of file
+}
diff --git a/test/std/experimental/any/any.nonmembers/swap.pass.cpp b/test/std/experimental/any/any.nonmembers/swap.pass.cpp
index a3fbd43d9247..e79bc9ef099c 100644
--- a/test/std/experimental/any/any.nonmembers/swap.pass.cpp
+++ b/test/std/experimental/any/any.nonmembers/swap.pass.cpp
@@ -34,7 +34,8 @@ int main()
swap(a1, a2);
- assert(any_cast<int>(a1) == 2);
- assert(any_cast<int>(a2) == 1);
+ // Support testing against system dylibs that don't have bad_any_cast.
+ assert(*any_cast<int>(&a1) == 2);
+ assert(*any_cast<int>(&a2) == 1);
}
}
diff --git a/test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp b/test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp
index c166bb72a837..f269149829d2 100644
--- a/test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp
+++ b/test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp
@@ -8,6 +8,12 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
// <optional>
diff --git a/test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp b/test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp
index 4630165f0708..a4af713a3910 100644
--- a/test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp
+++ b/test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp
@@ -8,6 +8,12 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability_markup=macosx10.12
+// XFAIL: availability_markup=macosx10.11
+// XFAIL: availability_markup=macosx10.10
+// XFAIL: availability_markup=macosx10.9
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
// <optional>
diff --git a/test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp b/test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp
index c8f07111c23d..72d7790590d8 100644
--- a/test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp
+++ b/test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp
@@ -8,6 +8,13 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
+
// <optional>
// T& optional<T>::value();
diff --git a/test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp b/test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp
index 98ff16e4d13b..b3d6dfda4fb5 100644
--- a/test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp
+++ b/test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp
@@ -8,6 +8,13 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
+
// <optional>
// constexpr const T& optional<T>::value() const;
diff --git a/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
index fcc86a13ffa1..949ea50d08a2 100644
--- a/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
@@ -15,13 +15,33 @@
// void swap(basic_fstream& rhs);
#include <fstream>
+#include <utility>
#include <cassert>
#include "platform_support.h"
+std::pair<std::string, std::string> get_temp_file_names() {
+ std::pair<std::string, std::string> names;
+ names.first = get_temp_file_name();
+
+ // Create the file so the next call to `get_temp_file_name()` doesn't
+ // return the same file.
+ std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+ names.second = get_temp_file_name();
+ assert(names.first != names.second);
+
+ std::fclose(fd1);
+ std::remove(names.first.c_str());
+
+ return names;
+}
+
int main()
{
- std::string temp1 = get_temp_file_name();
- std::string temp2 = get_temp_file_name();
+ std::pair<std::string, std::string> temp_files = get_temp_file_names();
+ std::string& temp1 = temp_files.first;
+ std::string& temp2 = temp_files.second;
+ assert(temp1 != temp2);
{
std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
diff --git a/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
index 0a4f7240daa1..4ff84f26cfa4 100644
--- a/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
@@ -16,13 +16,34 @@
// void swap(basic_fstream<charT, traits>& x, basic_fstream<charT, traits>& y);
#include <fstream>
+#include <utility>
#include <cassert>
#include "platform_support.h"
+
+std::pair<std::string, std::string> get_temp_file_names() {
+ std::pair<std::string, std::string> names;
+ names.first = get_temp_file_name();
+
+ // Create the file so the next call to `get_temp_file_name()` doesn't
+ // return the same file.
+ std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+ names.second = get_temp_file_name();
+ assert(names.first != names.second);
+
+ std::fclose(fd1);
+ std::remove(names.first.c_str());
+
+ return names;
+}
+
int main()
{
- std::string temp1 = get_temp_file_name();
- std::string temp2 = get_temp_file_name();
+ std::pair<std::string, std::string> temp_files = get_temp_file_names();
+ std::string& temp1 = temp_files.first;
+ std::string& temp2 = temp_files.second;
+ assert(temp1 != temp2);
{
std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
diff --git a/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
index 519b84fb1abe..95224774c67e 100644
--- a/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
@@ -15,13 +15,33 @@
// void swap(basic_ofstream& rhs);
#include <fstream>
+#include <utility>
#include <cassert>
#include "platform_support.h"
+std::pair<std::string, std::string> get_temp_file_names() {
+ std::pair<std::string, std::string> names;
+ names.first = get_temp_file_name();
+
+ // Create the file so the next call to `get_temp_file_name()` doesn't
+ // return the same file.
+ std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+ names.second = get_temp_file_name();
+ assert(names.first != names.second);
+
+ std::fclose(fd1);
+ std::remove(names.first.c_str());
+
+ return names;
+}
+
int main()
{
- std::string temp1 = get_temp_file_name();
- std::string temp2 = get_temp_file_name();
+ std::pair<std::string, std::string> temp_files = get_temp_file_names();
+ std::string& temp1 = temp_files.first;
+ std::string& temp2 = temp_files.second;
+ assert(temp1 != temp2);
{
std::ofstream fs1(temp1.c_str());
std::ofstream fs2(temp2.c_str());
diff --git a/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp
index d58f5f256004..31f2153ebd4c 100644
--- a/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp
@@ -16,13 +16,33 @@
// void swap(basic_ofstream<charT, traits>& x, basic_ofstream<charT, traits>& y);
#include <fstream>
+#include <utility>
#include <cassert>
#include "platform_support.h"
+std::pair<std::string, std::string> get_temp_file_names() {
+ std::pair<std::string, std::string> names;
+ names.first = get_temp_file_name();
+
+ // Create the file so the next call to `get_temp_file_name()` doesn't
+ // return the same file.
+ std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+ names.second = get_temp_file_name();
+ assert(names.first != names.second);
+
+ std::fclose(fd1);
+ std::remove(names.first.c_str());
+
+ return names;
+}
+
int main()
{
- std::string temp1 = get_temp_file_name();
- std::string temp2 = get_temp_file_name();
+ std::pair<std::string, std::string> temp_files = get_temp_file_names();
+ std::string& temp1 = temp_files.first;
+ std::string& temp2 = temp_files.second;
+ assert(temp1 != temp2);
{
std::ofstream fs1(temp1.c_str());
std::ofstream fs2(temp2.c_str());
diff --git a/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
index 52b35666424a..eda490f8df4a 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.11
+// XFAIL: with_system_cxx_lib=macosx10.10
+// XFAIL: with_system_cxx_lib=macosx10.9
+
// <istream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
index 0f356e26d237..c7f16ca7e385 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <istream>
// int_type get();
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
index cf06e343bcc2..b3d3c69b43d3 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <istream>
// basic_istream<charT,traits>& get(char_type& c);
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
index 3095712b9dbc..3a37cffce3af 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
+
// <istream>
// basic_istream<charT,traits>&
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
index 20e70cfbd5cd..ceef0d28fc6b 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <istream>
// basic_istream<charT,traits>& read(char_type* s, streamsize n);
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
index 01eecb5d824b..a0a8e2f1b3b3 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
+
// <istream>
// streamsize readsome(char_type* s, streamsize n);
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp
index dc4e0ba0de20..e370b4bfb009 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
+
// <istream>
// basic_istream<charT,traits>& seekg(pos_type pos);
diff --git a/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
index 818d42c26212..cac1e39554ed 100644
--- a/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
+++ b/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
@@ -7,6 +7,13 @@
//
//===----------------------------------------------------------------------===//
+// 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
+
// <istream>
// basic_istream<charT,traits>& seekg(off_type off, ios_base::seekdir dir);
diff --git a/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
new file mode 100644
index 000000000000..956cd171a1de
--- /dev/null
+++ b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp
@@ -0,0 +1,97 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ostream>
+
+// template <class charT, class traits = char_traits<charT> >
+// class basic_ostream;
+
+// operator<<(short n);
+// operator<<(unsigned short n);
+// operator<<(int n);
+// operator<<(unsigned int n);
+// operator<<(long n);
+// operator<<(unsigned long n);
+// operator<<(long long n);
+// operator<<(unsigned long long n);
+
+// Testing to make sure that the max length values are correctly inserted when
+// using std::showbase
+
+#include <cassert>
+#include <cstdint>
+#include <ios>
+#include <limits>
+#include <sstream>
+#include <type_traits>
+
+template <typename T>
+static void test(std::ios_base::fmtflags fmt, const char *expected)
+{
+ std::stringstream ss;
+ ss.setf(fmt, std::ios_base::basefield);
+ ss << std::showbase << (std::is_signed<T>::value ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max());
+ assert(ss.str() == expected);
+}
+
+int main(void)
+{
+ const std::ios_base::fmtflags o = std::ios_base::oct;
+ const std::ios_base::fmtflags d = std::ios_base::dec;
+ const std::ios_base::fmtflags x = std::ios_base::hex;
+
+ test<short>(o, "0100000");
+ test<short>(d, "-32768");
+ test<short>(x, "0x8000");
+
+ test<unsigned short>(o, "0177777");
+ test<unsigned short>(d, "65535");
+ test<unsigned short>(x, "0xffff");
+
+ test<int>(o, "020000000000");
+ test<int>(d, "-2147483648");
+ test<int>(x, "0x80000000");
+
+ test<unsigned int>(o, "037777777777");
+ test<unsigned int>(d, "4294967295");
+ test<unsigned int>(x, "0xffffffff");
+
+ const bool long_is_32 = std::integral_constant<bool, sizeof(long) == sizeof(int32_t)>::value; // avoid compiler warnings
+ const bool long_is_64 = std::integral_constant<bool, sizeof(long) == sizeof(int64_t)>::value; // avoid compiler warnings
+ const bool long_long_is_64 = std::integral_constant<bool, sizeof(long long) == sizeof(int64_t)>::value; // avoid compiler warnings
+
+ if (long_is_32) {
+ test<long>(o, "020000000000");
+ test<long>(d, "-2147483648");
+ test<long>(x, "0x80000000");
+
+ test<unsigned long>(o, "037777777777");
+ test<unsigned long>(d, "4294967295");
+ test<unsigned long>(x, "0xffffffff");
+ } else if (long_is_64) {
+ test<long>(o, "01000000000000000000000");
+ test<long>(d, "-9223372036854775808");
+ test<long>(x, "0x8000000000000000");
+
+ test<unsigned long>(o, "01777777777777777777777");
+ test<unsigned long>(d, "18446744073709551615");
+ test<unsigned long>(x, "0xffffffffffffffff");
+ }
+ if (long_long_is_64) {
+ test<long long>(o, "01000000000000000000000");
+ test<long long>(d, "-9223372036854775808");
+ test<long long>(x, "0x8000000000000000");
+
+ test<unsigned long long>(o, "01777777777777777777777");
+ test<unsigned long long>(d, "18446744073709551615");
+ test<unsigned long long>(x, "0xffffffffffffffff");
+ }
+
+ return 0;
+}
diff --git a/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
index e09c0ed20461..54c8a283815e 100644
--- a/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
+++ b/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.12
+
// <ostream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
index a680aa3f499b..3046ced75a70 100644
--- a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
@@ -40,12 +40,22 @@
#include <type_traits>
#include <string>
+#include "test_macros.h"
+
int main()
{
typedef std::istream_iterator<double> I1; // double is trivially destructible
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I1,
std::iterator<std::input_iterator_tag, double, std::ptrdiff_t,
const double*, const double&> >::value), "");
+#else
+ static_assert((std::is_same<I1::iterator_category, std::input_iterator_tag>::value), "");
+ static_assert((std::is_same<I1::value_type, double>::value), "");
+ static_assert((std::is_same<I1::difference_type, std::ptrdiff_t>::value), "");
+ static_assert((std::is_same<I1::pointer, const double*>::value), "");
+ static_assert((std::is_same<I1::reference, const double&>::value), "");
+#endif
static_assert((std::is_same<I1::char_type, char>::value), "");
static_assert((std::is_same<I1::traits_type, std::char_traits<char> >::value), "");
static_assert((std::is_same<I1::istream_type, std::istream>::value), "");
@@ -53,9 +63,17 @@ int main()
static_assert( std::is_trivially_destructible<I1>::value, "");
typedef std::istream_iterator<unsigned, wchar_t> I2; // unsigned is trivially destructible
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I2,
std::iterator<std::input_iterator_tag, unsigned, std::ptrdiff_t,
const unsigned*, const unsigned&> >::value), "");
+#else
+ static_assert((std::is_same<I2::iterator_category, std::input_iterator_tag>::value), "");
+ static_assert((std::is_same<I2::value_type, unsigned>::value), "");
+ static_assert((std::is_same<I2::difference_type, std::ptrdiff_t>::value), "");
+ static_assert((std::is_same<I2::pointer, const unsigned*>::value), "");
+ static_assert((std::is_same<I2::reference, const unsigned&>::value), "");
+#endif
static_assert((std::is_same<I2::char_type, wchar_t>::value), "");
static_assert((std::is_same<I2::traits_type, std::char_traits<wchar_t> >::value), "");
static_assert((std::is_same<I2::istream_type, std::wistream>::value), "");
diff --git a/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp
index 460da642bc6e..8d043e1e6347 100644
--- a/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp
@@ -23,17 +23,35 @@
#include <iterator>
#include <type_traits>
+#include "test_macros.h"
+
int main()
{
typedef std::ostream_iterator<double> I1;
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I1,
std::iterator<std::output_iterator_tag, void, void, void, void> >::value), "");
+#else
+ static_assert((std::is_same<I1::iterator_category, std::output_iterator_tag>::value), "");
+ static_assert((std::is_same<I1::value_type, void>::value), "");
+ static_assert((std::is_same<I1::difference_type, void>::value), "");
+ static_assert((std::is_same<I1::pointer, void>::value), "");
+ static_assert((std::is_same<I1::reference, void>::value), "");
+#endif
static_assert((std::is_same<I1::char_type, char>::value), "");
static_assert((std::is_same<I1::traits_type, std::char_traits<char> >::value), "");
static_assert((std::is_same<I1::ostream_type, std::ostream>::value), "");
typedef std::ostream_iterator<unsigned, wchar_t> I2;
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I2,
std::iterator<std::output_iterator_tag, void, void, void, void> >::value), "");
+#else
+ static_assert((std::is_same<I2::iterator_category, std::output_iterator_tag>::value), "");
+ static_assert((std::is_same<I2::value_type, void>::value), "");
+ static_assert((std::is_same<I2::difference_type, void>::value), "");
+ static_assert((std::is_same<I2::pointer, void>::value), "");
+ static_assert((std::is_same<I2::reference, void>::value), "");
+#endif
static_assert((std::is_same<I2::char_type, wchar_t>::value), "");
static_assert((std::is_same<I2::traits_type, std::char_traits<wchar_t> >::value), "");
static_assert((std::is_same<I2::ostream_type, std::wostream>::value), "");
diff --git a/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp
index a699b2419830..cdf74846547d 100644
--- a/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp
@@ -24,19 +24,37 @@
#include <string>
#include <type_traits>
+#include "test_macros.h"
+
int main()
{
typedef std::ostreambuf_iterator<char> I1;
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I1,
std::iterator<std::output_iterator_tag, void, void, void, void> >::value), "");
+#else
+ static_assert((std::is_same<I1::iterator_category, std::output_iterator_tag>::value), "");
+ static_assert((std::is_same<I1::value_type, void>::value), "");
+ static_assert((std::is_same<I1::difference_type, void>::value), "");
+ static_assert((std::is_same<I1::pointer, void>::value), "");
+ static_assert((std::is_same<I1::reference, void>::value), "");
+#endif
static_assert((std::is_same<I1::char_type, char>::value), "");
static_assert((std::is_same<I1::traits_type, std::char_traits<char> >::value), "");
static_assert((std::is_same<I1::streambuf_type, std::streambuf>::value), "");
static_assert((std::is_same<I1::ostream_type, std::ostream>::value), "");
typedef std::ostreambuf_iterator<wchar_t> I2;
+#if TEST_STD_VER <= 14
static_assert((std::is_convertible<I2,
std::iterator<std::output_iterator_tag, void, void, void, void> >::value), "");
+#else
+ static_assert((std::is_same<I2::iterator_category, std::output_iterator_tag>::value), "");
+ static_assert((std::is_same<I2::value_type, void>::value), "");
+ static_assert((std::is_same<I2::difference_type, void>::value), "");
+ static_assert((std::is_same<I2::pointer, void>::value), "");
+ static_assert((std::is_same<I2::reference, void>::value), "");
+#endif
static_assert((std::is_same<I2::char_type, wchar_t>::value), "");
static_assert((std::is_same<I2::traits_type, std::char_traits<wchar_t> >::value), "");
static_assert((std::is_same<I2::streambuf_type, std::wstreambuf>::value), "");
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
index c88e5b06e675..41b14a6e5bf3 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
@@ -12,11 +12,23 @@
// UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14
// Older Clang versions do not support this
-// XFAIL: clang-3, apple-clang
+// XFAIL: clang-3, apple-clang-7, apple-clang-8
// None of the current GCC compilers support this.
// XFAIL: gcc
+// 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
+
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
#include <new>
#include <cstddef>
#include <cstdlib>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
index 55c26fa5c4a7..4c9da471294d 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
@@ -15,6 +15,19 @@
// FIXME change this to XFAIL.
// UNSUPPORTED: no-aligned-allocation
+// 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
+
+
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new
#include <new>
@@ -29,7 +42,7 @@ constexpr auto OverAligned = alignof(std::max_align_t) * 2;
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -45,7 +58,7 @@ struct alignas(OverAligned) A
void test_throw_max_size() {
#ifndef TEST_HAS_NO_EXCEPTIONS
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
try
{
void* vp = operator new[] (std::numeric_limits<std::size_t>::max(),
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
index ec5d0a445baa..8e9eff9e206e 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
@@ -15,6 +15,18 @@
// FIXME turn this into an XFAIL
// UNSUPPORTED: no-aligned-allocation
+// 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
+
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new (nothrow)
#include <new>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
index 03e490e8ed85..46f411d15684 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
@@ -10,8 +10,20 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: sanitizer-new-delete
+// 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: no-aligned-allocation
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new nothrow by replacing only operator new
#include <new>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
index 5b93540eac57..f71cf19cc80b 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
@@ -13,6 +13,12 @@
// when sized deallocation is not supported, e.g., prior to C++14.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: availability_markup=macosx10.11
+// XFAIL: availability_markup=macosx10.10
+// XFAIL: availability_markup=macosx10.9
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
+
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
// REQUIRES: fsized-deallocation
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
index a5d4df34a85d..514e5e1044a0 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
@@ -10,13 +10,23 @@
// test aligned operator delete replacement.
// UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14
-
// Older Clang versions do not support this
-// XFAIL: clang-3, apple-clang
+// XFAIL: clang-3, apple-clang-7, apple-clang-8
// None of the current GCC compilers support this.
// XFAIL: gcc
+// 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
+
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
#include <new>
#include <cstddef>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
index 5ebbc8a1a2d9..2dcb2dc2c578 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
@@ -9,12 +9,24 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
// FIXME turn this into an XFAIL
// UNSUPPORTED: no-aligned-allocation
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new
#include <new>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
index 6e2eca314771..e77b41336174 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
@@ -9,12 +9,24 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
// FIXME turn this into an XFAIL
// UNSUPPORTED: no-aligned-allocation
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new (nothrow)
#include <new>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
index 9f64c9730166..862ec1ba66a4 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
@@ -10,8 +10,20 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: sanitizer-new-delete
+// 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: no-aligned-allocation
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
// test operator new nothrow by replacing only operator new
#include <new>
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
index 61fca5f125bf..40de3a09800c 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
@@ -13,6 +13,11 @@
// when sized deallocation is not supported, e.g., prior to C++14.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: availability_markup=macosx10.11
+// XFAIL: availability_markup=macosx10.10
+// XFAIL: availability_markup=macosx10.9
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
// REQUIRES: fsized-deallocation
diff --git a/test/std/language.support/support.exception/except.nested/assign.pass.cpp b/test/std/language.support/support.exception/except.nested/assign.pass.cpp
index ec5575d072ce..6338c8aaa26e 100644
--- a/test/std/language.support/support.exception/except.nested/assign.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/assign.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <exception>
// class nested_exception;
diff --git a/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp b/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
index 92134c993af3..4cbdbb2ec892 100644
--- a/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <exception>
// class nested_exception;
diff --git a/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp b/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp
index 8f8503b254d3..18ca9968ff56 100644
--- a/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <exception>
// class nested_exception;
diff --git a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
index fe9cd6042ba8..88e2253d08c7 100644
--- a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
@@ -7,10 +7,11 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
+// UNSUPPORTED: libcpp-no-exceptions
+
+// This test fails due to a stack overflow
// XFAIL: LIBCXX-WINDOWS-FIXME
-// UNSUPPORTED: libcpp-no-exceptions
// <exception>
// class nested_exception;
diff --git a/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
index 73d02da39333..d511a72f9f57 100644
--- a/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// UNSUPPORTED: libcpp-no-exceptions
// <exception>
diff --git a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
index 6353afcb239b..6a9f25cd0855 100644
--- a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// UNSUPPORTED: libcpp-no-exceptions
// <exception>
diff --git a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
index 2046997774a8..c33d64d06f0d 100644
--- a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
+++ b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
+// This test needs to be rewritten for the Windows exception_ptr semantics
+// which copy the exception each time the exception_ptr is copied.
// XFAIL: LIBCXX-WINDOWS-FIXME
// UNSUPPORTED: libcpp-no-exceptions
diff --git a/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp b/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
index 9621a7360364..3aa8dcf55bbc 100644
--- a/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
+++ b/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <exception>
// typedef unspecified exception_ptr;
diff --git a/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp b/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
index 4980c656b2b5..35821d9bd1b6 100644
--- a/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
+++ b/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// UNSUPPORTED: libcpp-no-exceptions
// <exception>
@@ -41,7 +38,12 @@ int main()
}
catch (const A& a)
{
+#ifndef _LIBCPP_ABI_MICROSOFT
assert(A::constructed == 1);
+#else
+ // On Windows exception_ptr copies the exception
+ assert(A::constructed == 2);
+#endif
assert(p != nullptr);
p = nullptr;
assert(p == nullptr);
@@ -50,4 +52,5 @@ int main()
}
assert(A::constructed == 0);
}
+ assert(A::constructed == 0);
}
diff --git a/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp b/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
index 7d27eee6689a..37ffb5be506a 100644
--- a/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
+++ b/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
@@ -7,9 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// UNSUPPORTED: libcpp-no-exceptions
// <exception>
@@ -49,7 +46,12 @@ int main()
}
catch (const A& a)
{
+#ifndef _LIBCPP_ABI_MICROSOFT
assert(A::constructed == 1);
+#else
+ // On Windows the exception_ptr copies the exception
+ assert(A::constructed == 2);
+#endif
assert(p != nullptr);
p = nullptr;
assert(p == nullptr);
@@ -58,4 +60,5 @@ int main()
}
assert(A::constructed == 0);
}
+ assert(A::constructed == 0);
}
diff --git a/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp b/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
index b92671588027..e35e7afa322a 100644
--- a/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
+++ b/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-no-exceptions
+// XFAIL: libcpp-no-exceptions
+
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.11
+
// test uncaught_exceptions
#include <exception>
diff --git a/test/std/language.support/support.types/byte.pass.cpp b/test/std/language.support/support.types/byte.pass.cpp
index aed44f91218f..66b2a553186d 100644
--- a/test/std/language.support/support.types/byte.pass.cpp
+++ b/test/std/language.support/support.types/byte.pass.cpp
@@ -13,7 +13,7 @@
// XFAIL: c++98, c++03, c++11, c++14
-// std::byte is not an integer type, nor a character type.
+// std::byte is not an integer type, nor a character type.
// It is a distinct type for accessing the bits that ultimately make up object storage.
static_assert( std::is_pod<std::byte>::value, "" );
diff --git a/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp b/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp
index 298edb22d249..8f6822932ac2 100644
--- a/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp
+++ b/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte& operator<<=(byte& b, IntegerType shift) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
diff --git a/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp b/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
index f7e0dee9c6bb..dad692e14a6b 100644
--- a/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
+++ b/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte& operator<<=(byte& b, IntegerType shift) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
@@ -32,7 +32,7 @@ int main () {
constexpr std::byte b3{3};
static_assert(noexcept(b <<= 2), "" );
-
+
static_assert(std::to_integer<int>(test(b2)) == 8, "" );
static_assert(std::to_integer<int>(test(b3)) == 12, "" );
diff --git a/test/std/language.support/support.types/byteops/lshift.fail.cpp b/test/std/language.support/support.types/byteops/lshift.fail.cpp
index c950329334be..6b1a68f83d25 100644
--- a/test/std/language.support/support.types/byteops/lshift.fail.cpp
+++ b/test/std/language.support/support.types/byteops/lshift.fail.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
-// These functions shall not participate in overload resolution unless
+// These functions shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
int main () {
diff --git a/test/std/language.support/support.types/byteops/lshift.pass.cpp b/test/std/language.support/support.types/byteops/lshift.pass.cpp
index b4a8325199ff..39d659023ad8 100644
--- a/test/std/language.support/support.types/byteops/lshift.pass.cpp
+++ b/test/std/language.support/support.types/byteops/lshift.pass.cpp
@@ -17,17 +17,17 @@
// template <class IntegerType>
// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
-// These functions shall not participate in overload resolution unless
+// These functions shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
int main () {
constexpr std::byte b1{1};
constexpr std::byte b3{3};
-
+
static_assert(noexcept(b3 << 2), "" );
static_assert(std::to_integer<int>(b1 << 1) == 2, "");
static_assert(std::to_integer<int>(b1 << 2) == 4, "");
static_assert(std::to_integer<int>(b3 << 4) == 48, "");
- static_assert(std::to_integer<int>(b3 << 6) == 192, "");
+ static_assert(std::to_integer<int>(b3 << 6) == 192, "");
}
diff --git a/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp b/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp
index 3a0c218aff82..44992fa98c33 100644
--- a/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp
+++ b/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte operator>>(byte& b, IntegerType shift) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
diff --git a/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp b/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
index 5b970258f5e0..b7e9a24f20a1 100644
--- a/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
+++ b/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte& operator>>=(byte& b, IntegerType shift) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
diff --git a/test/std/language.support/support.types/byteops/rshift.fail.cpp b/test/std/language.support/support.types/byteops/rshift.fail.cpp
index 14e2fcfa1301..a0309539a7a6 100644
--- a/test/std/language.support/support.types/byteops/rshift.fail.cpp
+++ b/test/std/language.support/support.types/byteops/rshift.fail.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte operator >>(byte b, IntegerType shift) noexcept;
-// These functions shall not participate in overload resolution unless
+// These functions shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
int main () {
diff --git a/test/std/language.support/support.types/byteops/rshift.pass.cpp b/test/std/language.support/support.types/byteops/rshift.pass.cpp
index 5ff986a70ade..876732545ac8 100644
--- a/test/std/language.support/support.types/byteops/rshift.pass.cpp
+++ b/test/std/language.support/support.types/byteops/rshift.pass.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
-// These functions shall not participate in overload resolution unless
+// These functions shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
@@ -29,12 +29,12 @@ constexpr std::byte test(std::byte b) {
int main () {
constexpr std::byte b100{100};
constexpr std::byte b115{115};
-
+
static_assert(noexcept(b100 << 2), "" );
static_assert(std::to_integer<int>(b100 >> 1) == 50, "");
static_assert(std::to_integer<int>(b100 >> 2) == 25, "");
static_assert(std::to_integer<int>(b115 >> 3) == 14, "");
- static_assert(std::to_integer<int>(b115 >> 6) == 1, "");
+ static_assert(std::to_integer<int>(b115 >> 6) == 1, "");
}
diff --git a/test/std/language.support/support.types/byteops/to_integer.fail.cpp b/test/std/language.support/support.types/byteops/to_integer.fail.cpp
index 8832e506a118..426ceb7a67de 100644
--- a/test/std/language.support/support.types/byteops/to_integer.fail.cpp
+++ b/test/std/language.support/support.types/byteops/to_integer.fail.cpp
@@ -17,7 +17,7 @@
// template <class IntegerType>
// constexpr IntegerType to_integer(byte b) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
int main () {
diff --git a/test/std/language.support/support.types/byteops/to_integer.pass.cpp b/test/std/language.support/support.types/byteops/to_integer.pass.cpp
index 4aca0be82deb..21dff0196a43 100644
--- a/test/std/language.support/support.types/byteops/to_integer.pass.cpp
+++ b/test/std/language.support/support.types/byteops/to_integer.pass.cpp
@@ -17,13 +17,13 @@
// template <class IntegerType>
// constexpr IntegerType to_integer(byte b) noexcept;
-// This function shall not participate in overload resolution unless
+// This function shall not participate in overload resolution unless
// is_integral_v<IntegerType> is true.
int main () {
constexpr std::byte b1{1};
constexpr std::byte b3{3};
-
+
static_assert(noexcept(std::to_integer<int>(b1)), "" );
static_assert(std::is_same<int, decltype(std::to_integer<int>(b1))>::value, "" );
static_assert(std::is_same<long, decltype(std::to_integer<long>(b1))>::value, "" );
diff --git a/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp b/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
index 2e2e97361994..06c171f56da6 100644
--- a/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
+++ b/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
@@ -9,8 +9,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <locale>
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
index 94e45302f10b..a9a8720146a4 100644
--- a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
@@ -15,9 +15,6 @@
// charT tolower(charT) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
#include <locale>
#include <cassert>
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
index d97dc5747e54..67fe44931342 100644
--- a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
@@ -15,9 +15,6 @@
// const charT* tolower(charT* low, const charT* high) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
#include <locale>
#include <string>
#include <cassert>
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
index d2ad328268f1..271ae2c0319d 100644
--- a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
@@ -15,9 +15,6 @@
// charT toupper(charT) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
#include <locale>
#include <cassert>
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
index 9ed3d138112a..650713570153 100644
--- a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
@@ -15,9 +15,6 @@
// const charT* toupper(charT* low, const charT* high) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
#include <locale>
#include <string>
#include <cassert>
diff --git a/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
index ec563fe4c7bc..7776c67a6be2 100644
--- a/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: apple-darwin
+// This test is passing in an uncontrolled manner in some Apple environment.
+// UNSUPPORTED: apple-darwin
// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
// and U002E as mon_decimal_point.
diff --git a/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
index 54bfcfb5c88d..4d805b0f7adf 100644
--- a/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: apple-darwin
+// This test is passing in an uncontrolled manner in some Apple environment.
+// UNSUPPORTED: apple-darwin
// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
// and U002E as mon_decimal_point.
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp
index 72e351f580b4..323d856a3923 100644
--- a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp
@@ -9,8 +9,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <locale>
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
index 272199b0e0d9..e3367b26fa9e 100644
--- a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
@@ -7,8 +7,10 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR11871
+// XFAIL: with_system_cxx_lib=macosx10.7
+// PR15445
+// XFAIL: with_system_cxx_lib=macosx10.8
// <locale>
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
index d01f63d5920d..174312d09c94 100644
--- a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
@@ -6,6 +6,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+//
+// PR11871
+// XFAIL: with_system_cxx_lib=macosx10.7
// <locale>
@@ -194,4 +197,16 @@ int main()
assert(v == -HUGE_VALF);
}
+ {
+ v = -1;
+ const char str[] = "2-";
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+1);
+ assert(err == ios.goodbit);
+ assert(v == 2);
+ }
}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
index b79650b0199b..cf671b000c9c 100644
--- a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
@@ -6,6 +6,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+//
+// PR11871
+// XFAIL: with_system_cxx_lib=macosx10.7
// <locale>
@@ -253,4 +256,16 @@ int main()
assert(err == ios.failbit);
assert(v == -HUGE_VALL);
}
+ {
+ v = -1;
+ const char str[] = "2-";
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+1);
+ assert(err == ios.goodbit);
+ assert(v == 2);
+ }
}
diff --git a/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
index eb381f9a580d..e25fe389392d 100644
--- a/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
+++ b/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
@@ -9,6 +9,10 @@
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.ru_RU.UTF-8
+// UNSUPPORTED: sanitizer-new-delete
+
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
// <locale>
diff --git a/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
index f1afff66580e..72d47a3914f3 100644
--- a/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
+++ b/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
@@ -9,6 +9,10 @@
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.ru_RU.UTF-8
+// UNSUPPORTED: sanitizer-new-delete
+
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
// <locale>
diff --git a/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
index eb63cd03b663..26ddfa600ea5 100644
--- a/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
+++ b/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
@@ -9,6 +9,10 @@
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.ru_RU.UTF-8
+// UNSUPPORTED: sanitizer-new-delete
+
+// XFAIL: availability_markup=macosx10.8
+// XFAIL: availability_markup=macosx10.7
// <locale>
diff --git a/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp b/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp
index 11346fb402d2..8fc311a5bd80 100644
--- a/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp
+++ b/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp
@@ -9,8 +9,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <locale>
diff --git a/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp b/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp
index 24644e307799..4d866acb8f43 100644
--- a/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp
+++ b/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <complex>
// template<class T, class charT, class traits>
diff --git a/test/std/numerics/rand/rand.device/ctor.pass.cpp b/test/std/numerics/rand/rand.device/ctor.pass.cpp
index 730576844a0b..5d72e474ed89 100644
--- a/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -7,6 +7,14 @@
//
//===----------------------------------------------------------------------===//
+// See bugs.llvm.org/PR20183
+//
+// 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.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <random>
// class random_device;
diff --git a/test/std/numerics/rand/rand.device/eval.pass.cpp b/test/std/numerics/rand/rand.device/eval.pass.cpp
index 890f4caa31a7..b34e40c75273 100644
--- a/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -7,6 +7,14 @@
//
//===----------------------------------------------------------------------===//
+// See bugs.llvm.org/PR20183
+//
+// 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.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <random>
// class random_device;
diff --git a/test/std/re/re.alg/re.alg.match/awk.pass.cpp b/test/std/re/re.alg/re.alg.match/awk.pass.cpp
index 9bd213f96746..4fc1ea7fe959 100644
--- a/test/std/re/re.alg/re.alg.match/awk.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/awk.pass.cpp
@@ -620,7 +620,7 @@ int main()
{
std::cmatch m;
const char s[] = "m";
- assert(std::regex_match(s, m,
+ assert(std::regex_match(s, m,
std::regex("[a[=M=]z]", std::regex_constants::awk)));
assert(m.size() == 1);
assert(!m.prefix().matched);
diff --git a/test/std/re/re.traits/translate_nocase.pass.cpp b/test/std/re/re.traits/translate_nocase.pass.cpp
index ab73db79d97f..33d365a9ede3 100644
--- a/test/std/re/re.traits/translate_nocase.pass.cpp
+++ b/test/std/re/re.traits/translate_nocase.pass.cpp
@@ -16,8 +16,8 @@
// REQUIRES: locale.en_US.UTF-8
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// TODO: investigation needed
// XFAIL: linux-gnu
diff --git a/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp b/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
index 59267f245d82..f36f53e656db 100644
--- a/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
+++ b/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp
@@ -8,6 +8,12 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-no-exceptions
+// 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.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <string>
// size_type max_size() const;
diff --git a/test/std/strings/string.conversions/stof.pass.cpp b/test/std/strings/string.conversions/stof.pass.cpp
index aeef0ddfbc78..a5e587236e27 100644
--- a/test/std/strings/string.conversions/stof.pass.cpp
+++ b/test/std/strings/string.conversions/stof.pass.cpp
@@ -7,8 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR14919 was fixed in r172447, out_of_range wasn't thrown before.
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stol.pass.cpp b/test/std/strings/string.conversions/stol.pass.cpp
index f01bbf8ce29e..5e16735dcc8f 100644
--- a/test/std/strings/string.conversions/stol.pass.cpp
+++ b/test/std/strings/string.conversions/stol.pass.cpp
@@ -7,8 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR14919 was fixed in r172447, out_of_range wasn't thrown before.
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoll.pass.cpp b/test/std/strings/string.conversions/stoll.pass.cpp
index b823ab742626..c33f9ee5e86f 100644
--- a/test/std/strings/string.conversions/stoll.pass.cpp
+++ b/test/std/strings/string.conversions/stoll.pass.cpp
@@ -7,8 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR14919 was fixed in r172447, out_of_range wasn't thrown before.
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoul.pass.cpp b/test/std/strings/string.conversions/stoul.pass.cpp
index 5e1f696cb6b7..523c49a29de4 100644
--- a/test/std/strings/string.conversions/stoul.pass.cpp
+++ b/test/std/strings/string.conversions/stoul.pass.cpp
@@ -7,8 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR14919 was fixed in r172447, out_of_range wasn't thrown before.
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoull.pass.cpp b/test/std/strings/string.conversions/stoull.pass.cpp
index 70563d9be51f..549c8da9a358 100644
--- a/test/std/strings/string.conversions/stoull.pass.cpp
+++ b/test/std/strings/string.conversions/stoull.pass.cpp
@@ -7,8 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// PR14919 was fixed in r172447, out_of_range wasn't thrown before.
+// XFAIL: with_system_cxx_lib=macosx10.7
+// XFAIL: with_system_cxx_lib=macosx10.8
// <string>
diff --git a/test/std/thread/futures/futures.future_error/what.pass.cpp b/test/std/thread/futures/futures.future_error/what.pass.cpp
index cc2d978d2c2b..957d530ab2ac 100644
--- a/test/std/thread/futures/futures.future_error/what.pass.cpp
+++ b/test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -12,9 +12,11 @@
// LWG 2056 changed the values of future_errc, so if we're using new headers
// with an old library we'll get incorrect messages.
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin13
+// 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
// <future>
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
index fffd087ee877..97f9d07c1512 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
@@ -52,7 +52,7 @@ int main()
std::this_thread::sleep_for(ms(250));
m.unlock();
t.join();
-
+
#ifdef __cpp_deduction_guides
std::lock_guard lg(m);
static_assert((std::is_same<decltype(lg), std::lock_guard<decltype(m)>>::value), "" );
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp
index ef39bbcc5e88..cdf3ceeb615c 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp
@@ -150,6 +150,6 @@ int main()
std::scoped_lock sl{m1, m2, m3};
static_assert((std::is_same<decltype(sl), std::scoped_lock<decltype(m1), decltype(m2), decltype(m3)>>::value), "" );
}
- }
+ }
#endif
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg
new file mode 100644
index 000000000000..fd3dc778c8ce
--- /dev/null
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg
@@ -0,0 +1,2 @@
+if 'availability' in config.available_features:
+ config.unsupported = True
diff --git a/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg b/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg
new file mode 100644
index 000000000000..fd3dc778c8ce
--- /dev/null
+++ b/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg
@@ -0,0 +1,2 @@
+if 'availability' in config.available_features:
+ config.unsupported = True
diff --git a/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg b/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg
new file mode 100644
index 000000000000..fd3dc778c8ce
--- /dev/null
+++ b/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg
@@ -0,0 +1,2 @@
+if 'availability' in config.available_features:
+ config.unsupported = True
diff --git a/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp b/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
index 27e1d2a1d42f..891b084dd32e 100644
--- a/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
@@ -9,6 +9,18 @@
//
// UNSUPPORTED: libcpp-has-no-threads
+// This test uses the POSIX header <sys/time.h> which Windows doesn't provide
+// UNSUPPORTED: windows
+
+// This test depends on signal behaviour until r210210, so some system libs
+// don't pass.
+//
+// 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.8
+// XFAIL: with_system_cxx_lib=macosx10.7
+
// <thread>
// template <class Rep, class Period>
@@ -23,6 +35,7 @@
void sig_action(int) {}
+#include <iostream>
int main()
{
int ec;
diff --git a/test/std/utilities/any/any.class/any.assign/copy.pass.cpp b/test/std/utilities/any/any.class/any.assign/copy.pass.cpp
index eba9bc6d5feb..37618f7aafc7 100644
--- a/test/std/utilities/any/any.class/any.assign/copy.pass.cpp
+++ b/test/std/utilities/any/any.class/any.assign/copy.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any& operator=(any const &);
diff --git a/test/std/utilities/any/any.class/any.assign/move.pass.cpp b/test/std/utilities/any/any.class/any.assign/move.pass.cpp
index 2063e4f1e9f1..418f200beb7a 100644
--- a/test/std/utilities/any/any.class/any.assign/move.pass.cpp
+++ b/test/std/utilities/any/any.class/any.assign/move.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any& operator=(any &&);
diff --git a/test/std/utilities/any/any.class/any.assign/value.pass.cpp b/test/std/utilities/any/any.class/any.assign/value.pass.cpp
index 6af481714922..ddedb886cc04 100644
--- a/test/std/utilities/any/any.class/any.assign/value.pass.cpp
+++ b/test/std/utilities/any/any.class/any.assign/value.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class ValueType>
diff --git a/test/std/utilities/any/any.class/any.cons/copy.pass.cpp b/test/std/utilities/any/any.class/any.cons/copy.pass.cpp
index 021c9e452841..aceb9e6cf3d5 100644
--- a/test/std/utilities/any/any.class/any.cons/copy.pass.cpp
+++ b/test/std/utilities/any/any.class/any.cons/copy.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any(any const &);
diff --git a/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp b/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp
index 4cf5d914f31d..d01a88da5dfc 100644
--- a/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp
+++ b/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class T, class ...Args> any(in_place_type_t<T>, Args&&...);
diff --git a/test/std/utilities/any/any.class/any.cons/move.pass.cpp b/test/std/utilities/any/any.class/any.cons/move.pass.cpp
index fb7dda886fe7..09e9288e0ab3 100644
--- a/test/std/utilities/any/any.class/any.cons/move.pass.cpp
+++ b/test/std/utilities/any/any.class/any.cons/move.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any(any &&) noexcept;
diff --git a/test/std/utilities/any/any.class/any.cons/value.pass.cpp b/test/std/utilities/any/any.class/any.cons/value.pass.cpp
index a164fbeb52fe..d18de0664c77 100644
--- a/test/std/utilities/any/any.class/any.cons/value.pass.cpp
+++ b/test/std/utilities/any/any.class/any.cons/value.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class Value> any(Value &&)
@@ -151,4 +158,4 @@ int main() {
test_copy_value_throws<large_throws_on_copy>();
test_move_value_throws();
test_sfinae_constraints();
-} \ No newline at end of file
+}
diff --git a/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp b/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp
index 7ed6121e5301..789a861ee3d6 100644
--- a/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp
+++ b/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class T, class ...Args> T& emplace(Args&&...);
diff --git a/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp b/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp
index 45bc70f7a795..2e781d954e68 100644
--- a/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp
+++ b/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any::reset() noexcept
diff --git a/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp b/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
index 6fc100943d0f..f56a2565622f 100644
--- a/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
+++ b/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// any::swap(any &) noexcept
diff --git a/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp b/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp
index 1a5a85482b8f..a5fa93218c65 100644
--- a/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp
+++ b/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class ValueType>
diff --git a/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
index af081ecceefd..ed04a91ca406 100644
--- a/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+++ b/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class ValueType>
diff --git a/test/std/utilities/any/any.nonmembers/make_any.pass.cpp b/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
index 59c06be6aad3..5a4a3c3c189f 100644
--- a/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
+++ b/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// template <class T, class ...Args> any make_any(Args&&...);
diff --git a/test/std/utilities/any/any.nonmembers/swap.pass.cpp b/test/std/utilities/any/any.nonmembers/swap.pass.cpp
index 1b3785bb1c66..c723b6e08149 100644
--- a/test/std/utilities/any/any.nonmembers/swap.pass.cpp
+++ b/test/std/utilities/any/any.nonmembers/swap.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <any>
// void swap(any &, any &) noexcept
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp
index d1e13139bce3..4b56a8fb6c7b 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp
index 08e31e8d7d70..065a7e90af82 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp
index f8f550deb051..2351e9741780 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp
index 1ea11ceed43d..e36c8a5a9240 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp
index 9a5792f519d5..f1fe28cc1774 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp
index aac9af082d74..45cbc5099d0a 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp
index fa79e7cdd9ad..b51c6cf08cba 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp
index c650899f764a..9f3617a2cadb 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp
index cbcc4ddbbc2c..5ae26809fac2 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp
index eb5e246833c2..ecba90b71783 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp
@@ -11,8 +11,8 @@
//
// This test uses new symbols that were not defined in the libc++ shipped on
// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
+// XFAIL: availability=macosx10.7
+// XFAIL: availability=macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index 7ab60da77c7d..501844a1d6ce 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -69,7 +69,7 @@ int main()
static_assert((std::is_same<std::shared_ptr<int>, CS::first_argument_type>::value), "" );
static_assert((std::is_same<std::shared_ptr<int>, CS::second_argument_type>::value), "" );
static_assert((std::is_same<bool, CS::result_type>::value), "" );
-
+
assert(!cs(p1, p2));
assert(!cs(p2, p1));
assert(cs(p1 ,p3) || cs(p3, p1));
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
index c340ba69cda3..4e875fa94520 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
@@ -16,9 +16,13 @@
#include "test_macros.h"
+// NOTE: On Windows the function `test_is_function<void()>` and
+// `test_is_function<void() noexcept> has the same mangled despite being
+// a distinct instantiation. This causes Clang to emit an error. However
+// structs do not have this problem.
+
template <class T>
-void test_is_function()
-{
+struct test_is_function {
static_assert( std::is_function<T>::value, "");
static_assert( std::is_function<const T>::value, "");
static_assert( std::is_function<volatile T>::value, "");
@@ -29,11 +33,10 @@ void test_is_function()
static_assert( std::is_function_v<volatile T>, "");
static_assert( std::is_function_v<const volatile T>, "");
#endif
-}
+};
template <class T>
-void test_is_not_function()
-{
+struct test_is_not_function {
static_assert(!std::is_function<T>::value, "");
static_assert(!std::is_function<const T>::value, "");
static_assert(!std::is_function<volatile T>::value, "");
@@ -44,7 +47,7 @@ void test_is_not_function()
static_assert(!std::is_function_v<volatile T>, "");
static_assert(!std::is_function_v<const volatile T>, "");
#endif
-}
+};
class Empty
{
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
index 691c549b5e78..f685d71eebd2 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
@@ -14,9 +14,12 @@
#include <type_traits>
#include "test_macros.h"
+// NOTE: On Windows the function `test_is_member_function<void()>` and
+// `test_is_member_function<void() noexcept> has the same mangled despite being
+// a distinct instantiation. This causes Clang to emit an error. However
+// structs do not have this problem.
template <class T>
-void test_member_function_pointer_imp()
-{
+struct test_member_function_pointer_imp {
static_assert(!std::is_void<T>::value, "");
#if TEST_STD_VER > 11
static_assert(!std::is_null_pointer<T>::value, "");
@@ -33,16 +36,16 @@ void test_member_function_pointer_imp()
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
-}
+};
template <class T>
-void test_member_function_pointer()
+struct test_member_function_pointer :
+ test_member_function_pointer_imp<T>,
+ test_member_function_pointer_imp<const T>,
+ test_member_function_pointer_imp<volatile T>,
+ test_member_function_pointer_imp<const volatile T>
{
- test_member_function_pointer_imp<T>();
- test_member_function_pointer_imp<const T>();
- test_member_function_pointer_imp<volatile T>();
- test_member_function_pointer_imp<const volatile T>();
-}
+};
class Class
{
diff --git a/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp b/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp
index e3c7bb5ad27b..198eee62bbba 100644
--- a/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp
+++ b/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp
@@ -9,6 +9,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <optional>
// class bad_optional_access is default constructible
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp
index d068fbc2db7e..e4e4a979ed02 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp
@@ -9,6 +9,13 @@
//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <optional>
// template <class U>
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp
index 34a12b8ad1c3..e9e98c0bdac6 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp
@@ -9,6 +9,13 @@
//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <optional>
// constexpr optional(const T& v);
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp
index d9e5ca821e85..3224c1bac756 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp
@@ -11,7 +11,7 @@
// <optional>
// constexpr optional(const optional<T>& rhs);
-// If is_trivially_copy_constructible_v<T> is true,
+// If is_trivially_copy_constructible_v<T> is true,
// this constructor shall be a constexpr constructor.
#include <optional>
@@ -26,7 +26,7 @@ struct S {
S(const S &rhs) : v_(rhs.v_) {} // make it not trivially copyable
int v_;
};
-
+
int main()
{
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp
index c7458d95abfd..fb2e139ad591 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp
@@ -11,7 +11,7 @@
// <optional>
// constexpr optional(const optional<T>&& rhs);
-// If is_trivially_move_constructible_v<T> is true,
+// If is_trivially_move_constructible_v<T> is true,
// this constructor shall be a constexpr constructor.
#include <optional>
@@ -27,7 +27,7 @@ struct S {
constexpr S(const S &&rhs) : v_(rhs.v_) {} // not trivially moveable
int v_;
};
-
+
int main()
{
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
index bff6f5bf8f6f..9f23e9b4381b 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// 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
+
// <optional>
// optional(optional<T>&& rhs);
diff --git a/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
index eee749d01707..761cbee4b895 100644
--- a/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
@@ -9,6 +9,13 @@
//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <optional>
// constexpr optional(T&& v);
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
index 516a79db5f64..44e6e7305901 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// 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
+
// <optional>
// constexpr T& optional<T>::value() &;
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
index d4038e4efa6b..e2d48ec99302 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// 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
+
// <optional>
// constexpr const T& optional<T>::value() const &;
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
index e189d3af6886..874a5441a4c2 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
@@ -8,6 +8,14 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// 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
+
// <optional>
// constexpr const T& optional<T>::value() const &&;
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
index 2ef485b7fe50..60cab7d27c64 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// <optional>
+// 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
+
// constexpr T& optional<T>::value() &&;
#include <optional>
diff --git a/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
index ab623bb01f78..8830bf932924 100644
--- a/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
@@ -19,6 +19,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
void test_char_pointer_ctor()
{
diff --git a/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp b/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
index f4f8d390de08..0ebf9b0b6264 100644
--- a/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
@@ -14,6 +14,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
void test_default_ctor()
{
diff --git a/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp b/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
index 0e4793027c98..91e9441fe3cb 100644
--- a/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
@@ -16,6 +16,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
void test_string_ctor()
{
diff --git a/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp b/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
index 3ba88ee2db53..be9d54716c51 100644
--- a/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
@@ -16,6 +16,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
void test_val_ctor()
{
diff --git a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
index 8eab082cf676..97ab0c44ccff 100644
--- a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
@@ -31,7 +31,7 @@ test()
static_assert((std::is_same<typename H::argument_type, T>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
ASSERT_NOEXCEPT(H()(T()));
-
+
H h;
T bs(static_cast<unsigned long long>(N));
const std::size_t result = h(bs);
diff --git a/test/std/utilities/template.bitset/bitset.members/count.pass.cpp b/test/std/utilities/template.bitset/bitset.members/count.pass.cpp
index c8a14c9b6049..f6730a4fc449 100644
--- a/test/std/utilities/template.bitset/bitset.members/count.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/count.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp b/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp
index a25e5bd9da22..6d6bcd711622 100644
--- a/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp b/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp
index 18a64a214a45..9908811cf3d2 100644
--- a/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp
@@ -15,6 +15,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
std::bitset<N>
make_bitset()
diff --git a/test/std/utilities/template.bitset/bitset.members/index.pass.cpp b/test/std/utilities/template.bitset/bitset.members/index.pass.cpp
index f352475fc199..c29ba312af7b 100644
--- a/test/std/utilities/template.bitset/bitset.members/index.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/index.pass.cpp
@@ -14,8 +14,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp b/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
index fbde54859f19..1ac0495da777 100644
--- a/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
@@ -14,8 +14,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp b/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp
index 57b77d2570d5..9d630b9721ac 100644
--- a/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp
index 3adab77b4131..bbbddb9a2289 100644
--- a/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp b/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp
index d9fbb3e11dad..4f152e3f9147 100644
--- a/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp
index 64ca15fda137..eaac19124224 100644
--- a/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp
index 5b7e10d677ee..52157696e22f 100644
--- a/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp
@@ -17,8 +17,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
index f2880f67ab6e..98c7ce509173 100644
--- a/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
index 420996759d0d..a707a7f4d112 100644
--- a/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp b/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp
index eed25e27448d..69de45e0396e 100644
--- a/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp
@@ -12,8 +12,12 @@
#include <bitset>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp b/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp
index 180fa84f4488..554abde32bba 100644
--- a/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp b/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
index 47494fc459a5..8e5edbe38a03 100644
--- a/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp b/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp
index e5c3e25352cc..45bc2b9ca37e 100644
--- a/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp
@@ -12,8 +12,12 @@
#include <bitset>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.members/test.pass.cpp b/test/std/utilities/template.bitset/bitset.members/test.pass.cpp
index 1a2d70613e1f..084dc9f8d46f 100644
--- a/test/std/utilities/template.bitset/bitset.members/test.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/test.pass.cpp
@@ -15,6 +15,10 @@
#include "test_macros.h"
+#if defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
+#endif
+
template <std::size_t N>
std::bitset<N>
make_bitset()
diff --git a/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp b/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp
index 5b2958cca523..37824d81b5a7 100644
--- a/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp
@@ -26,8 +26,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp b/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp
index d86a10c6df13..e58c72016eee 100644
--- a/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp b/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp
index 0a8024d5eb9b..244a2ba541d2 100644
--- a/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp b/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp
index 449115edd757..e601b26cf4c1 100644
--- a/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp
@@ -13,8 +13,12 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
#pragma clang diagnostic ignored "-Wtautological-compare"
+#elif defined(TEST_COMPILER_C1XX)
+#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#endif
template <std::size_t N>
diff --git a/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp b/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp
index bf2a2e589137..24847dd70f86 100644
--- a/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp
+++ b/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp
@@ -7,15 +7,15 @@
//
//===----------------------------------------------------------------------===//
//
-// This test uses new symbols that were not defined in the libc++ shipped on
-// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
// Due to C++17 inline variables ASAN flags this test as containing an ODR
// violation because Clock::is_steady is defined in both the dylib and this TU.
// UNSUPPORTED: asan
+// Starting with C++17, Clock::is_steady is inlined (but not before LLVM-3.9!),
+// but before C++17 it requires the symbol to be present in the dylib.
+// XFAIL: availability=macosx10.7 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+// XFAIL: availability=macosx10.8 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+
// <chrono>
// high_resolution_clock
diff --git a/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp b/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
index b836c0dc00e6..cdb38dfce3f5 100644
--- a/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
+++ b/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
@@ -7,16 +7,17 @@
//
//===----------------------------------------------------------------------===//
//
-// This test uses new symbols that were not defined in the libc++ shipped on
-// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// UNSUPPORTED: libcpp-has-no-monotonic-clock
// Due to C++17 inline variables ASAN flags this test as containing an ODR
// violation because Clock::is_steady is defined in both the dylib and this TU.
// UNSUPPORTED: asan
+// Starting with C++17, Clock::is_steady is inlined (but not before LLVM-3.9!),
+// but before C++17 it requires the symbol to be present in the dylib.
+// XFAIL: availability=macosx10.7 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+// XFAIL: availability=macosx10.8 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+
// <chrono>
// steady_clock
diff --git a/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp b/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp
index a4058e5ab97b..dfc08a3bca69 100644
--- a/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp
+++ b/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp
@@ -7,15 +7,15 @@
//
//===----------------------------------------------------------------------===//
//
-// This test uses new symbols that were not defined in the libc++ shipped on
-// darwin11 and darwin12:
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
-// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
-
// Due to C++17 inline variables ASAN flags this test as containing an ODR
// violation because Clock::is_steady is defined in both the dylib and this TU.
// UNSUPPORTED: asan
+// Starting with C++17, Clock::is_steady is inlined (but not before LLVM-3.9!),
+// but before C++17 it requires the symbol to be present in the dylib.
+// XFAIL: availability=macosx10.7 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+// XFAIL: availability=macosx10.8 && (c++98 || c++03 || c++11 || c++14 || apple-clang-7 || apple-clang-8.0)
+
// <chrono>
// system_clock
diff --git a/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp b/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp
index 77fd1719ff33..5b0f15ecbb12 100644
--- a/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp
+++ b/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
/*
diff --git a/test/std/utilities/variant/variant.get/get_index.pass.cpp b/test/std/utilities/variant/variant.get/get_index.pass.cpp
index bc7a566040eb..4f04f4a399d7 100644
--- a/test/std/utilities/variant/variant.get/get_index.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_index.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <size_t I, class... Types>
diff --git a/test/std/utilities/variant/variant.get/get_type.pass.cpp b/test/std/utilities/variant/variant.get/get_type.pass.cpp
index 013a081f5c77..63221f69c8f8 100644
--- a/test/std/utilities/variant/variant.get/get_type.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_type.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class T, class... Types> constexpr T& get(variant<Types...>& v);
diff --git a/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp b/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
index 10022b14aa06..dd5880ea6635 100644
--- a/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
index d92f16fd6418..4f0009d9d620 100644
--- a/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp
index 232d77c882eb..c1ba87be76d1 100644
--- a/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp b/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
index 18216c6da923..a695df14ef62 100644
--- a/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
@@ -21,6 +28,7 @@
#include <variant>
#include "test_macros.h"
+#include "test_workarounds.h"
struct NonT {
NonT(int v) : value(v) {}
@@ -137,14 +145,21 @@ constexpr bool test_constexpr_copy_ctor_extension_imp(
auto v2 = v;
return v2.index() == v.index() &&
v2.index() == Idx &&
- std::get<Idx>(v2) == std::get<Idx>(v);
+ std::get<Idx>(v2) == std::get<Idx>(v);
}
void test_constexpr_copy_ctor_extension() {
-#ifdef _LIBCPP_VERSION
+#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
using V = std::variant<long, void*, const int>;
- static_assert(std::is_trivially_copyable<V>::value, "");
+#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
+ static_assert(std::is_trivially_destructible<V>::value, "");
static_assert(std::is_trivially_copy_constructible<V>::value, "");
+ static_assert(std::is_trivially_move_constructible<V>::value, "");
+ static_assert(!std::is_copy_assignable<V>::value, "");
+ static_assert(!std::is_move_assignable<V>::value, "");
+#else
+ static_assert(std::is_trivially_copyable<V>::value, "");
+#endif
static_assert(test_constexpr_copy_ctor_extension_imp<0>(V(42l)), "");
static_assert(test_constexpr_copy_ctor_extension_imp<1>(V(nullptr)), "");
static_assert(test_constexpr_copy_ctor_extension_imp<2>(V(101)), "");
diff --git a/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp b/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp
index a4a86ff6c1ca..05a09db45bdf 100644
--- a/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp
index 18115722f8d1..af6c66213039 100644
--- a/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp
index a023f02bad6e..ec2730e8740c 100644
--- a/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
index 66f67fe8d3f2..b8ca6f9ef27a 100644
--- a/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
@@ -22,6 +29,7 @@
#include <variant>
#include "test_macros.h"
+#include "test_workarounds.h"
struct ThrowsMove {
ThrowsMove(ThrowsMove &&) noexcept(false) {}
@@ -178,9 +186,17 @@ constexpr bool test_constexpr_ctor_extension_imp(
}
void test_constexpr_move_ctor_extension() {
-#ifdef _LIBCPP_VERSION
+#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
using V = std::variant<long, void*, const int>;
+#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
+ static_assert(std::is_trivially_destructible<V>::value, "");
+ static_assert(std::is_trivially_copy_constructible<V>::value, "");
+ static_assert(std::is_trivially_move_constructible<V>::value, "");
+ static_assert(!std::is_copy_assignable<V>::value, "");
+ static_assert(!std::is_move_assignable<V>::value, "");
+#else
static_assert(std::is_trivially_copyable<V>::value, "");
+#endif
static_assert(std::is_trivially_move_constructible<V>::value, "");
static_assert(test_constexpr_ctor_extension_imp<0>(V(42l)), "");
static_assert(test_constexpr_ctor_extension_imp<1>(V(nullptr)), "");
diff --git a/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp
index 0d0b978e3959..20848db0fc70 100644
--- a/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp
index e69988a08e96..28a0c582853b 100644
--- a/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp
index 8e329024b9df..923ffd33a75c 100644
--- a/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp b/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp
index da1658cb88f6..c01d333441a9 100644
--- a/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
index 48cda222083f..b81b3ff6a967 100644
--- a/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class ...Types> class variant;
diff --git a/test/std/utilities/variant/variant.visit/visit.pass.cpp b/test/std/utilities/variant/variant.visit/visit.pass.cpp
index 408a65c0903f..05b58c16f3d8 100644
--- a/test/std/utilities/variant/variant.visit/visit.pass.cpp
+++ b/test/std/utilities/variant/variant.visit/visit.pass.cpp
@@ -10,6 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// 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
+
// <variant>
// template <class Visitor, class... Variants>
// constexpr see below visit(Visitor&& vis, Variants&&... vars);
diff --git a/test/support/msvc_stdlib_force_include.hpp b/test/support/msvc_stdlib_force_include.hpp
index 660645646d33..2b78e507a327 100644
--- a/test/support/msvc_stdlib_force_include.hpp
+++ b/test/support/msvc_stdlib_force_include.hpp
@@ -26,6 +26,11 @@
#error This header may not be used when targeting libc++
#endif
+// Indicates that we are using the MSVC standard library.
+#ifndef _MSVC_STL_VER
+ #define _MSVC_STL_VER 42
+#endif
+
struct AssertionDialogAvoider {
AssertionDialogAvoider() {
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
@@ -40,8 +45,6 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
// MSVC frontend only configurations
#if !defined(__clang__)
- #define TEST_STD_VER 17
-
// Simulate feature-test macros.
#define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
#define _MSVC_HAS_FEATURE_cxx_exceptions 1
@@ -54,7 +57,6 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
#pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
#pragma warning(disable: 4521) // multiple copy constructors specified
#pragma warning(disable: 4702) // unreachable code
- #pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed.
#pragma warning(disable: 28251) // Inconsistent annotation for 'new': this instance has no annotations.
#endif // !defined(__clang__)
@@ -75,4 +77,12 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
// Silence warnings about raw pointers and other unchecked iterators.
#define _SCL_SECURE_NO_WARNINGS
+#include <ciso646>
+
+#if _HAS_CXX17
+ #define TEST_STD_VER 17
+#else // _HAS_CXX17
+ #define TEST_STD_VER 14
+#endif // _HAS_CXX17
+
#endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
diff --git a/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp b/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp
new file mode 100644
index 000000000000..669f175c4531
--- /dev/null
+++ b/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// This workaround option is specific to MSVC's C1XX, so we don't care that
+// it isn't set for older GCC versions.
+// XFAIL: gcc-4.9
+
+// Verify TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE.
+
+#include <type_traits>
+
+#include "test_workarounds.h"
+
+struct S {
+ S(S const&) = default;
+ S(S&&) = default;
+ S& operator=(S const&) = delete;
+ S& operator=(S&&) = delete;
+};
+
+int main() {
+#if defined(TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE)
+ static_assert(!std::is_trivially_copyable<S>::value, "");
+#else
+ static_assert(std::is_trivially_copyable<S>::value, "");
+#endif
+}
diff --git a/test/support/test_macros.h b/test/support/test_macros.h
index cee1419407b9..46fcb66fecfc 100644
--- a/test/support/test_macros.h
+++ b/test/support/test_macros.h
@@ -209,7 +209,8 @@ inline void DoNotOptimize(Tp const& value) {
#include <intrin.h>
template <class Tp>
inline void DoNotOptimize(Tp const& value) {
- const volatile void* volatile = __builtin_addressof(value);
+ const volatile void* volatile unused = __builtin_addressof(value);
+ static_cast<void>(unused);
_ReadWriteBarrier();
}
#endif
diff --git a/test/support/test_workarounds.h b/test/support/test_workarounds.h
index affdd1025943..b24c883902e8 100644
--- a/test/support/test_workarounds.h
+++ b/test/support/test_workarounds.h
@@ -15,6 +15,7 @@
#if defined(TEST_COMPILER_C1XX)
# define TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR
+# define TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
#endif
#endif // SUPPORT_TEST_WORKAROUNDS_H
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index f839a3a0985e..7f1ae851b9ce 100644
--- a/utils/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -123,6 +123,7 @@ class Configuration(object):
self.configure_cxx()
self.configure_triple()
self.configure_deployment()
+ self.configure_availability()
self.configure_src_root()
self.configure_obj_root()
self.configure_cxx_stdlib_under_test()
@@ -285,6 +286,12 @@ class Configuration(object):
self.lit_config.note(
"inferred use_system_cxx_lib as: %r" % self.use_system_cxx_lib)
+ def configure_availability(self):
+ # See http://llvm.org/docs/AvailabilityMarkup.html
+ self.with_availability = self.get_lit_bool('with_availability', False)
+ self.lit_config.note(
+ "inferred with_availability as: %r" % self.with_availability)
+
def configure_cxx_stdlib_under_test(self):
self.cxx_stdlib_under_test = self.get_lit_conf(
'cxx_stdlib_under_test', 'libc++')
@@ -306,6 +313,9 @@ class Configuration(object):
def configure_use_clang_verify(self):
'''If set, run clang with -verify on failing tests.'''
+ if self.with_availability:
+ self.use_clang_verify = False
+ return
self.use_clang_verify = self.get_lit_bool('use_clang_verify')
if self.use_clang_verify is None:
# NOTE: We do not test for the -verify flag directly because
@@ -346,6 +356,12 @@ class Configuration(object):
self.cxx.use_ccache = True
self.lit_config.note('enabling ccache')
+ def add_deployment_feature(self, feature):
+ (arch, name, version) = self.config.deployment
+ self.config.available_features.add('%s=%s-%s' % (feature, arch, name))
+ self.config.available_features.add('%s=%s' % (feature, name))
+ self.config.available_features.add('%s=%s%s' % (feature, name, version))
+
def configure_features(self):
additional_features = self.get_lit_conf('additional_features')
if additional_features:
@@ -364,15 +380,31 @@ class Configuration(object):
self.config.available_features.add(
'with_system_cxx_lib=%s' % self.config.target_triple)
- # Insert the platform name into the available features as a lower case.
- self.config.available_features.add(target_platform)
+ # Add subcomponents individually.
+ target_components = self.config.target_triple.split('-')
+ for component in target_components:
+ self.config.available_features.add(
+ 'with_system_cxx_lib=%s' % component)
- # If we're using deployment, add sub-components of the triple using
- # "darwin" instead of the platform name.
- if self.use_deployment:
- arch, _, _ = self.config.deployment
+ # Add available features for more generic versions of the target
+ # triple attached to with_system_cxx_lib.
+ if self.use_deployment:
+ self.add_deployment_feature('with_system_cxx_lib')
+
+ # Configure the availability markup checks features.
+ if self.with_availability:
+ self.config.available_features.add('availability_markup')
+ self.add_deployment_feature('availability_markup')
+
+ if self.use_system_cxx_lib or self.with_availability:
+ self.config.available_features.add('availability')
+ self.add_deployment_feature('availability')
+
+ if platform.system() == 'Darwin':
self.config.available_features.add('apple-darwin')
- self.config.available_features.add(arch + '-apple-darwin')
+
+ # Insert the platform name into the available features as a lower case.
+ self.config.available_features.add(target_platform)
# Simulator testing can take a really long time for some of these tests
# so add a feature check so we can REQUIRES: long_tests in them
@@ -508,6 +540,10 @@ class Configuration(object):
self.cxx.flags += ['-arch', arch]
self.cxx.flags += ['-m' + name + '-version-min=' + version]
+ # Disable availability unless explicitely requested
+ if not self.with_availability:
+ self.cxx.flags += ['-D_LIBCPP_DISABLE_AVAILABILITY']
+
def configure_compile_flags_header_includes(self):
support_path = os.path.join(self.libcxx_src_root, 'test', 'support')
if self.cxx_stdlib_under_test != 'libstdc++' and \
diff --git a/utils/libcxx/test/target_info.py b/utils/libcxx/test/target_info.py
index 9a7ae05a0285..2104432f03c0 100644
--- a/utils/libcxx/test/target_info.py
+++ b/utils/libcxx/test/target_info.py
@@ -46,25 +46,26 @@ def test_locale(loc):
locale.setlocale(locale.LC_ALL, default_locale)
-def add_common_locales(features, lit_config):
+def add_common_locales(features, lit_config, is_windows=False):
# A list of locales needed by the test-suite.
# The list uses the canonical name for the locale used in the test-suite
# TODO: On Linux ISO8859 *may* needs to hyphenated.
locales = [
- 'en_US.UTF-8',
- 'fr_FR.UTF-8',
- 'ru_RU.UTF-8',
- 'zh_CN.UTF-8',
- 'fr_CA.ISO8859-1',
- 'cs_CZ.ISO8859-2'
+ ('en_US.UTF-8', 'English_United States.1252'),
+ ('fr_FR.UTF-8', 'French_France.1252'),
+ ('ru_RU.UTF-8', 'Russian_Russia.1251'),
+ ('zh_CN.UTF-8', 'Chinese_China.936'),
+ ('fr_CA.ISO8859-1', 'French_Canada.1252'),
+ ('cs_CZ.ISO8859-2', 'Czech_Czech Republic.1250')
]
- for loc in locales:
- if test_locale(loc):
- features.add('locale.{0}'.format(loc))
+ for loc_id, windows_loc_name in locales:
+ loc_name = windows_loc_name if is_windows else loc_id
+ if test_locale(loc_name):
+ features.add('locale.{0}'.format(loc_id))
else:
lit_config.warning('The locale {0} is not supported by '
'your platform. Some tests will be '
- 'unsupported.'.format(loc))
+ 'unsupported.'.format(loc_name))
class DarwinLocalTI(DefaultTargetInfo):
@@ -251,7 +252,8 @@ class WindowsLocalTI(DefaultTargetInfo):
super(WindowsLocalTI, self).__init__(full_config)
def add_locale_features(self, features):
- add_common_locales(features, self.full_config.lit_config)
+ add_common_locales(features, self.full_config.lit_config,
+ is_windows=True)
def use_lit_shell_default(self):
# Default to the internal shell on Windows, as bash on Windows is