aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:03:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:03:23 +0000
commit0dc0969cd0a732760f0aa79942a04e0eaef297c4 (patch)
tree051bdb57b1ac6ee143f61ddbb47bd0da619f6f0c
parent868847c6900e575417c03bced6e562b3af891318 (diff)
downloadsrc-0dc0969cd0a732760f0aa79942a04e0eaef297c4.tar.gz
src-0dc0969cd0a732760f0aa79942a04e0eaef297c4.zip
Vendor import of libc++ trunk r300422:vendor/libc++/libc++-trunk-r300422
Notes
Notes: svn path=/vendor/libc++/dist/; revision=317023 svn path=/vendor/libc++/libc++-trunk-r300422/; revision=317024; tag=vendor/libc++/libc++-trunk-r300422
-rw-r--r--.clang-format6
-rw-r--r--CMakeLists.txt100
-rw-r--r--CREDITS.TXT2
-rw-r--r--TODO.TXT50
-rw-r--r--cmake/Modules/CodeCoverage.cmake18
-rw-r--r--cmake/Modules/HandleCompilerRT.cmake58
-rw-r--r--cmake/Modules/HandleLibCXXABI.cmake22
-rw-r--r--cmake/Modules/HandleLibcxxFlags.cmake4
-rw-r--r--cmake/Modules/HandleOutOfTreeLLVM.cmake10
-rw-r--r--cmake/config-ix.cmake12
-rw-r--r--docs/BuildingLibcxx.rst51
-rw-r--r--docs/DesignDocs/DebugMode.rst2
-rw-r--r--docs/DesignDocs/ThreadingSupportAPI.rst23
-rw-r--r--docs/DesignDocs/VisibilityMacros.rst46
-rw-r--r--docs/UsingLibcxx.rst24
-rw-r--r--docs/conf.py4
-rw-r--r--docs/index.rst7
-rw-r--r--include/__config171
-rw-r--r--include/__debug2
-rw-r--r--include/__functional_base8
-rw-r--r--include/__hash_table58
-rw-r--r--include/__libcpp_version2
-rw-r--r--include/__locale9
-rw-r--r--include/__mutex_base16
-rw-r--r--include/__split_buffer2
-rw-r--r--include/__threading_support113
-rw-r--r--include/__tree37
-rw-r--r--include/__undef_min_max4
-rw-r--r--include/algorithm7
-rw-r--r--include/any28
-rw-r--r--include/array4
-rw-r--r--include/atomic32
-rw-r--r--include/chrono12
-rw-r--r--include/cmath6
-rw-r--r--include/condition_variable2
-rw-r--r--include/cstddef32
-rw-r--r--include/cstdio6
-rw-r--r--include/cstdlib2
-rw-r--r--include/deque180
-rw-r--r--include/exception96
-rw-r--r--include/experimental/filesystem52
-rw-r--r--include/experimental/memory_resource12
-rw-r--r--include/experimental/numeric31
-rw-r--r--include/ext/hash_map2
-rw-r--r--include/ext/hash_set2
-rw-r--r--include/forward_list127
-rw-r--r--include/functional299
-rw-r--r--include/future20
-rw-r--r--include/ios3
-rw-r--r--include/iterator13
-rw-r--r--include/limits2
-rw-r--r--include/list108
-rw-r--r--include/locale11
-rw-r--r--include/map8
-rw-r--r--include/math.h418
-rw-r--r--include/memory1907
-rw-r--r--include/mutex153
-rw-r--r--include/new26
-rw-r--r--include/numeric30
-rw-r--r--include/optional130
-rw-r--r--include/regex1
-rw-r--r--include/shared_mutex6
-rw-r--r--include/stddef.h3
-rw-r--r--include/string170
-rw-r--r--include/string_view14
-rw-r--r--include/support/fuchsia/xlocale.h23
-rw-r--r--include/support/win32/locale_win32.h7
-rw-r--r--include/support/win32/support.h8
-rw-r--r--include/system_error2
-rw-r--r--include/thread19
-rw-r--r--include/tuple12
-rw-r--r--include/type_traits95
-rw-r--r--include/typeinfo7
-rw-r--r--include/unordered_map12
-rw-r--r--include/utility658
-rw-r--r--include/variant62
-rw-r--r--include/vector131
-rw-r--r--lib/CMakeLists.txt57
-rw-r--r--lib/abi/3.9/x86_64-apple-darwin16.abilist (renamed from lib/abi/3.9/x86_64-apple-darwin16.0.abilist)0
-rw-r--r--lib/abi/4.0/x86_64-apple-darwin16.abilist (renamed from lib/abi/4.0/x86_64-apple-darwin16.0.0.abilist)0
-rw-r--r--lib/abi/CHANGELOG.TXT51
-rw-r--r--lib/abi/CMakeLists.txt18
-rw-r--r--lib/abi/x86_64-apple-darwin16.abilist (renamed from lib/abi/x86_64-apple-darwin16.0.0.abilist)0
-rw-r--r--lib/abi/x86_64-unknown-linux-gnu.abilist3788
-rwxr-xr-xlib/buildit179
-rw-r--r--lib/libc++abi-new-delete.exp8
-rw-r--r--lib/libc++abi2.exp8
-rw-r--r--src/condition_variable.cpp1
-rw-r--r--src/exception.cpp327
-rw-r--r--src/experimental/filesystem/directory_iterator.cpp109
-rw-r--r--src/experimental/filesystem/operations.cpp40
-rw-r--r--src/experimental/filesystem/path.cpp22
-rw-r--r--src/functional.cpp26
-rw-r--r--src/include/atomic_support.h2
-rw-r--r--src/locale.cpp8
-rw-r--r--src/memory.cpp41
-rw-r--r--src/mutex.cpp11
-rw-r--r--src/new.cpp163
-rw-r--r--src/support/runtime/exception_fallback.ipp182
-rw-r--r--src/support/runtime/exception_glibcxx.ipp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default01.fail.cpp)35
-rw-r--r--src/support/runtime/exception_libcxxabi.ipp28
-rw-r--r--src/support/runtime/exception_libcxxrt.ipp41
-rw-r--r--src/support/runtime/exception_msvc.ipp89
-rw-r--r--src/support/runtime/exception_pointer_cxxabi.ipp74
-rw-r--r--src/support/runtime/exception_pointer_glibcxx.ipp78
-rw-r--r--src/support/runtime/exception_pointer_unimplemented.ipp80
-rw-r--r--src/support/runtime/new_handler_fallback.ipp27
-rw-r--r--src/support/win32/locale_win32.cpp7
-rw-r--r--src/system_error.cpp6
-rw-r--r--src/thread.cpp44
-rw-r--r--src/typeinfo.cpp68
-rw-r--r--test/CMakeLists.txt24
-rw-r--r--test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp46
-rw-r--r--test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp124
-rw-r--r--test/libcxx/containers/associative/non_const_comparator.fail.cpp47
-rw-r--r--test/libcxx/containers/associative/undef_min_max.pass.cpp2
-rw-r--r--test/libcxx/containers/unord/non_const_comparator.fail.cpp56
-rw-r--r--test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp70
-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.cpp2
-rw-r--r--test/libcxx/debug/containers/db_string.pass.cpp5
-rw-r--r--test/libcxx/debug/containers/db_unord_container_tests.pass.cpp2
-rw-r--r--test/libcxx/debug/debug_abort.pass.cpp3
-rw-r--r--test/libcxx/debug/debug_throw.pass.cpp2
-rw-r--r--test/libcxx/debug/debug_throw_register.pass.cpp3
-rw-r--r--test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/pointer_type.pass.cpp)25
-rw-r--r--test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp47
-rw-r--r--test/libcxx/depr/enable_removed_cpp17_features.pass.cpp26
-rw-r--r--test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp42
-rw-r--r--test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp37
-rw-r--r--test/libcxx/depr/exception.unexpected/unexpected.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/op_arrow.fail.cpp)24
-rw-r--r--test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp23
-rw-r--r--test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp31
-rw-r--r--test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/max_size.pass.cpp65
-rw-r--r--test/libcxx/test/__init__.py0
-rw-r--r--test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp2
-rw-r--r--test/libcxx/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_mangling.pass.cpp36
-rw-r--r--test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp2
-rw-r--r--test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp2
-rw-r--r--test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp2
-rw-r--r--test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp1
-rw-r--r--test/libcxx/type_traits/convert_to_integral.pass.cpp2
-rw-r--r--test/libcxx/util.py55
-rw-r--r--test/libcxx/utilities/function.objects/func.require/invoke_helpers.h6
-rw-r--r--test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp41
-rw-r--r--test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp28
-rw-r--r--test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp7
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp2
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp2
-rw-r--r--test/lit.cfg2
-rw-r--r--test/lit.site.cfg.in2
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp1
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp1
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp6
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp6
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp4
-rw-r--r--test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp6
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp13
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp10
-rw-r--r--test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp11
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp8
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp8
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp7
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp7
-rw-r--r--test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp7
-rw-r--r--test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp7
-rw-r--r--test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp7
-rw-r--r--test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp5
-rw-r--r--test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp5
-rw-r--r--test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp2
-rw-r--r--test/std/containers/associative/map/compare.pass.cpp4
-rw-r--r--test/std/containers/associative/map/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/associative/map/map.access/index_tuple.pass.cpp2
-rw-r--r--test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp2
-rw-r--r--test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/associative/multimap/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp1
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find.pass.cpp1
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp1
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp1
-rw-r--r--test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/associative/multiset/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/associative/set/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp4
-rw-r--r--test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp4
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp4
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp4
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp4
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/array/array.size/size.pass.cpp4
-rw-r--r--test/std/containers/sequences/array/at.pass.cpp2
-rw-r--r--test/std/containers/sequences/array/front_back.pass.cpp4
-rw-r--r--test/std/containers/sequences/array/indexing.pass.cpp2
-rw-r--r--test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/deque/deque.cons/size.pass.cpp1
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp4
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp8
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp8
-rw-r--r--test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp12
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp35
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp5
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp6
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp5
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp5
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/assign_move.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp8
-rw-r--r--test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.cons/size_type.pass.cpp1
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp6
-rw-r--r--test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/assign_move.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/vector.bool/emplace.pass.cpp4
-rw-r--r--test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp28
-rw-r--r--test/std/containers/sequences/vector.bool/find.pass.cpp2
-rw-r--r--test/std/containers/sequences/vector.bool/initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/move.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/move_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp19
-rw-r--r--test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp15
-rw-r--r--test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp19
-rw-r--r--test/std/containers/sequences/vector.bool/vector_bool.pass.cpp4
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp15
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp7
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp40
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp6
-rw-r--r--test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.map/compare.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.map/incomplete_type.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp8
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp8
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp6
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp10
-rw-r--r--test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp13
-rw-r--r--test/std/containers/unord/unord.multimap/bucket_count.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.multimap/incomplete.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.multimap/load_factor.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.multimap/swap_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp5
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp9
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp12
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.multiset/bucket_count.pass.cpp6
-rw-r--r--test/std/containers/unord/unord.multiset/incomplete.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.multiset/load_factor.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.multiset/swap_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp5
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp9
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.set/bucket_count.pass.cpp6
-rw-r--r--test/std/containers/unord/unord.set/incomplete.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.set/load_factor.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.set/max_load_factor.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.set/swap_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp5
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp9
-rw-r--r--test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp3
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp2
-rw-r--r--test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp2
-rw-r--r--test/std/depr/depr.c.headers/stdio_h.pass.cpp4
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp25
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp25
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp28
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp)22
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp35
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp33
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp1
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp)30
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp1
-rw-r--r--test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp1
-rw-r--r--test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp1
-rw-r--r--test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp1
-rw-r--r--test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp1
-rw-r--r--test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp2
-rw-r--r--test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp2
-rw-r--r--test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp2
-rw-r--r--test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp2
-rw-r--r--test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.fail.cpp)23
-rw-r--r--test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp27
-rw-r--r--test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp1
-rw-r--r--test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp1
-rw-r--r--test/std/experimental/algorithms/alg.random.sample/sample.pass.cpp14
-rw-r--r--test/std/experimental/filesystem/class.file_status/file_status.cons.pass.cpp4
-rw-r--r--test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp2
-rw-r--r--test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp)31
-rw-r--r--test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp24
-rw-r--r--test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp2
-rw-r--r--test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp12
-rw-r--r--test/std/experimental/filesystem/class.path/synop.pass.cpp2
-rw-r--r--test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp4
-rw-r--r--test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp4
-rw-r--r--test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp4
-rw-r--r--test/std/experimental/filesystem/fs.op.funcs/fs.op.exists/exists.pass.cpp9
-rw-r--r--test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp2
-rw-r--r--test/std/experimental/filesystem/fs.op.funcs/fs.op.status/status.pass.cpp25
-rw-r--r--test/std/experimental/filesystem/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp8
-rw-r--r--test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp2
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp7
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp25
-rw-r--r--test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp8
-rw-r--r--test/std/experimental/string.view/lit.local.cfg3
-rw-r--r--test/std/experimental/string.view/string.view.access/at.pass.cpp2
-rw-r--r--test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp2
-rw-r--r--test/std/input.output/file.streams/c.files/cstdio.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp17
-rw-r--r--test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp2
-rw-r--r--test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp2
-rw-r--r--test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp3
-rw-r--r--test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp3
-rw-r--r--test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp8
-rw-r--r--test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp9
-rw-r--r--test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp7
-rw-r--r--test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp2
-rw-r--r--test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp6
-rw-r--r--test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp6
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp4
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp2
-rw-r--r--test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp33
-rw-r--r--test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp10
-rw-r--r--test/std/language.support/support.types/byte.pass.cpp30
-rw-r--r--test/std/language.support/support.types/byteops/and.assign.pass.cpp42
-rw-r--r--test/std/language.support/support.types/byteops/and.pass.cpp34
-rw-r--r--test/std/language.support/support.types/byteops/lshift.assign.fail.cpp31
-rw-r--r--test/std/language.support/support.types/byteops/lshift.assign.pass.cpp39
-rw-r--r--test/std/language.support/support.types/byteops/lshift.fail.cpp26
-rw-r--r--test/std/language.support/support.types/byteops/lshift.pass.cpp33
-rw-r--r--test/std/language.support/support.types/byteops/not.pass.cpp30
-rw-r--r--test/std/language.support/support.types/byteops/or.assign.pass.cpp43
-rw-r--r--test/std/language.support/support.types/byteops/or.pass.cpp34
-rw-r--r--test/std/language.support/support.types/byteops/rshift.assign.fail.cpp31
-rw-r--r--test/std/language.support/support.types/byteops/rshift.assign.pass.cpp38
-rw-r--r--test/std/language.support/support.types/byteops/rshift.fail.cpp26
-rw-r--r--test/std/language.support/support.types/byteops/rshift.pass.cpp40
-rw-r--r--test/std/language.support/support.types/byteops/to_integer.fail.cpp26
-rw-r--r--test/std/language.support/support.types/byteops/to_integer.pass.cpp34
-rw-r--r--test/std/language.support/support.types/byteops/xor.assign.pass.cpp42
-rw-r--r--test/std/language.support/support.types/byteops/xor.pass.cpp34
-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.cpp4
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp2
-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.nm.put/facet.num.put.members/put_pointer.pass.cpp8
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp2
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp2
-rw-r--r--test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp40
-rw-r--r--test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp18
-rw-r--r--test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp4
-rw-r--r--test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp1
-rw-r--r--test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp1
-rw-r--r--test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp4
-rw-r--r--test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp4
-rw-r--r--test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp5
-rw-r--r--test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp5
-rw-r--r--test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp8
-rw-r--r--test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp8
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp3
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp3
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp3
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp1
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp3
-rw-r--r--test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp3
-rw-r--r--test/std/re/re.alg/re.alg.match/awk.pass.cpp97
-rw-r--r--test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp2
-rw-r--r--test/std/re/re.alg/re.alg.search/backup.pass.cpp2
-rw-r--r--test/std/re/re.alg/re.alg.search/lookahead.pass.cpp2
-rw-r--r--test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp2
-rw-r--r--test/std/re/re.traits/lookup_classname.pass.cpp2
-rw-r--r--test/std/re/re.traits/translate_nocase.pass.cpp4
-rw-r--r--test/std/strings/basic.string.hash/enabled_hashes.pass.cpp31
-rw-r--r--test/std/strings/basic.string.hash/strings.pass.cpp4
-rw-r--r--test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp81
-rw-r--r--test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp4
-rw-r--r--test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp300
-rw-r--r--test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp2
-rw-r--r--test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp2
-rw-r--r--test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp2
-rw-r--r--test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp6
-rw-r--r--test/std/strings/basic.string/string.cons/substr.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp16
-rw-r--r--test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp33
-rw-r--r--test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp19
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp4
-rw-r--r--test/std/strings/basic.string/traits_mismatch.fail.cpp18
-rw-r--r--test/std/strings/string.classes/typedefs.pass.cpp9
-rw-r--r--test/std/strings/string.conversions/stof.pass.cpp4
-rw-r--r--test/std/strings/string.conversions/stol.pass.cpp4
-rw-r--r--test/std/strings/string.conversions/stoll.pass.cpp4
-rw-r--r--test/std/strings/string.conversions/stoul.pass.cpp4
-rw-r--r--test/std/strings/string.conversions/stoull.pass.cpp4
-rw-r--r--test/std/strings/string.view/string.view.access/at.pass.cpp2
-rw-r--r--test/std/strings/string.view/string.view.cons/assign.pass.cpp50
-rw-r--r--test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp65
-rw-r--r--test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp31
-rw-r--r--test/std/strings/string.view/string.view.hash/string_view.pass.cpp30
-rw-r--r--test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp19
-rw-r--r--test/std/strings/string.view/string.view.iterators/rend.pass.cpp19
-rw-r--r--test/std/strings/string.view/string_view.literals/literal.pass.cpp2
-rw-r--r--test/std/strings/string.view/traits_mismatch.fail.cpp (renamed from test/std/strings/string.view/nothing_to_do.pass.cpp)8
-rw-r--r--test/std/thread/futures/futures.future_error/what.pass.cpp4
-rw-r--r--test/std/thread/futures/futures.promise/set_rvalue.pass.cpp9
-rw-r--r--test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp8
-rw-r--r--test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp2
-rw-r--r--test/std/thread/futures/futures.unique_future/move_assign.pass.cpp4
-rw-r--r--test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp4
-rw-r--r--test/std/thread/futures/futures.unique_future/share.pass.cpp18
-rw-r--r--test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp1
-rw-r--r--test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp6
-rw-r--r--test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp4
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp10
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_cxx03.pass.cpp21
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_adopt_lock.pass.cpp)25
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_assign.fail.cpp)21
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_copy.fail.cpp)20
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.fail.cpp)21
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.pass.cpp)61
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp (renamed from test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_types.pass.cpp)25
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp8
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp4
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp4
-rw-r--r--test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp10
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp4
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp2
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp4
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp27
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp5
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp1
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp1
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp1
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp1
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp6
-rw-r--r--test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp36
-rw-r--r--test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp33
-rw-r--r--test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp9
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp2
-rw-r--r--test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp23
-rw-r--r--test/std/utilities/function.objects/unord.hash/enum.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/unord.hash/floating.pass.cpp3
-rw-r--r--test/std/utilities/function.objects/unord.hash/integral.pass.cpp54
-rw-r--r--test/std/utilities/function.objects/unord.hash/pointer.pass.cpp16
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp2
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp2
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp2
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp2
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp2
-rw-r--r--test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp2
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.pass.cpp79
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move03.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move04.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert01.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert02.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert03.fail.cpp62
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert04.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert05.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert06.fail.cpp62
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert07.fail.cpp56
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert08.fail.cpp60
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert09.fail.cpp62
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_asgn.pass.cpp41
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_ctor.pass.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/nullptr_asgn.pass.cpp41
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp38
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.pass.cpp47
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.pass.cpp87
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.fail.cpp42
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp70
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.fail.cpp42
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp72
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move03.fail.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move04.fail.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert01.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert02.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert03.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert04.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert05.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert06.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert07.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert08.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert09.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert10.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert11.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert12.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert13.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert14.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert15.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert16.fail.cpp57
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert17.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert18.fail.cpp78
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/nullptr.pass.cpp46
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.fail.cpp36
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.pass.cpp63
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.pass.cpp95
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer04.fail.cpp67
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp51
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter02.pass.cpp64
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter03.pass.cpp65
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.fail.cpp33
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.pass.cpp63
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter05.fail.cpp58
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/release.pass.cpp27
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset1.pass.cpp50
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset2.fail.cpp64
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/swap.pass.cpp56
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/dereference.fail.cpp23
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get_deleter.pass.cpp37
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/index.pass.cpp47
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.fail.cpp29
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.pass.cpp75
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move02.fail.cpp33
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move03.fail.cpp33
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move04.fail.cpp36
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert.pass.cpp89
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.fail.cpp42
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.fail.cpp43
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.fail.cpp47
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert04.fail.cpp43
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert05.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert06.fail.cpp62
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert13.fail.cpp36
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp80
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer01.fail.cpp67
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer02.fail.cpp61
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default.pass.cpp86
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02.fail.cpp29
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default03.fail.cpp23
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move.pass.cpp140
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.fail.cpp42
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.fail.cpp42
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move03.fail.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move04.fail.cpp55
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert.pass.cpp171
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.fail.cpp56
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.fail.cpp62
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.fail.cpp79
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.fail.cpp58
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.fail.cpp51
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.fail.cpp79
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.fail.cpp58
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp86
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert09.fail.cpp79
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert10.fail.cpp58
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp86
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert12.fail.cpp79
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/nullptr.pass.cpp46
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer.pass.cpp163
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer01.fail.cpp35
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02.fail.cpp29
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer03.fail.cpp23
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter.pass.cpp123
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/release.pass.cpp27
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset1.pass.cpp50
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/swap.pass.cpp59
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get.pass.cpp24
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get_deleter.pass.cpp37
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp8
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer03.fail.cpp)16
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp14
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp69
-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.shared/test_deleter.h70
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp1
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp1
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp2
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp32
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp5
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp5
-rw-r--r--test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp25
-rw-r--r--test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp6
-rw-r--r--test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp2
-rw-r--r--test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp26
-rw-r--r--test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp2
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp42
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp6
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp235
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp10
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp79
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp1
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp1
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp2
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp61
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp63
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp65
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp65
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp63
-rw-r--r--test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp61
-rw-r--r--test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp26
-rw-r--r--test/std/utilities/optional/optional.hash/hash.pass.cpp28
-rw-r--r--test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp27
-rw-r--r--test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp11
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp1
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp64
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp19
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp36
-rw-r--r--test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp37
-rw-r--r--test/std/utilities/optional/optional.relops/equal.pass.cpp94
-rw-r--r--test/std/utilities/optional/optional.relops/greater_equal.pass.cpp93
-rw-r--r--test/std/utilities/optional/optional.relops/greater_than.pass.cpp91
-rw-r--r--test/std/utilities/optional/optional.relops/less_equal.pass.cpp93
-rw-r--r--test/std/utilities/optional/optional.relops/less_than.pass.cpp91
-rw-r--r--test/std/utilities/optional/optional.relops/not_equal.pass.cpp94
-rw-r--r--test/std/utilities/smartptr/unique.ptr/README.TXT16
-rw-r--r--test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/nothing_to_do.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp61
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp120
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp420
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp124
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp145
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/null.pass.cpp)36
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/nullptr.pass.cpp)33
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp97
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp107
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp174
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp124
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp83
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp248
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp74
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp106
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp171
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter04.fail.cpp)9
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp328
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.dtor/null.pass.cpp)38
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp56
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp117
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/explicit_bool.pass.cpp)31
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset2.pass.cpp)40
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset_self.pass.cpp)14
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp88
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/explicit_bool.pass.cpp)25
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/dereference.pass.cpp)7
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp66
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp51
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp65
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp32
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/op_arrow.pass.cpp)14
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/index.fail.cpp)43
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get.pass.cpp)12
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp)0
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.special/eq.pass.cpp)2
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.special/rel.pass.cpp)2
-rw-r--r--test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.special/swap.pass.cpp)2
-rw-r--r--test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp2
-rw-r--r--test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp29
-rw-r--r--test/std/utilities/template.bitset/bitset.members/all.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/any.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/index.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/none.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp4
-rw-r--r--test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp6
-rw-r--r--test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp6
-rw-r--r--test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp4
-rw-r--r--test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp4
-rw-r--r--test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp4
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp17
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp18
-rw-r--r--test/std/utilities/tuple/tuple.general/ignore.pass.cpp56
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp2
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp6
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp4
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp4
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp21
-rw-r--r--test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.fail.cpp)23
-rw-r--r--test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp12
-rw-r--r--test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp2
-rw-r--r--test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp2
-rw-r--r--test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp4
-rw-r--r--test/std/utilities/variant/variant.get/get_index.pass.cpp4
-rw-r--r--test/std/utilities/variant/variant.get/get_type.pass.cpp4
-rw-r--r--test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp23
-rw-r--r--test/std/utilities/variant/variant.hash/hash.pass.cpp35
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp43
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp14
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp42
-rw-r--r--test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp14
-rw-r--r--test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp7
-rw-r--r--test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp7
-rw-r--r--test/support/MoveOnly.h3
-rw-r--r--test/support/constexpr_char_traits.hpp5
-rw-r--r--test/support/container_test_types.h4
-rw-r--r--test/support/controlled_allocators.hpp2
-rw-r--r--test/support/debug_mode_helper.h10
-rw-r--r--test/support/deleter_types.h (renamed from test/std/utilities/memory/unique.ptr/deleter.h)114
-rw-r--r--test/support/demangle.h6
-rw-r--r--test/support/filesystem_dynamic_test_helper.py2
-rw-r--r--test/support/filesystem_test_helper.hpp2
-rw-r--r--test/support/min_allocator.h56
-rw-r--r--test/support/msvc_stdlib_force_include.hpp78
-rw-r--r--test/support/platform_support.h2
-rw-r--r--test/support/poisoned_hash_helper.hpp247
-rw-r--r--test/support/set_windows_crt_report_mode.h36
-rw-r--r--test/support/test.support/test_demangle.pass.cpp2
-rw-r--r--test/support/test.support/test_poisoned_hash_helper.pass.cpp30
-rw-r--r--test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp29
-rw-r--r--test/support/test_macros.h43
-rw-r--r--test/support/test_memory_resource.hpp2
-rw-r--r--test/support/test_workarounds.h (renamed from test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default03.fail.cpp)19
-rw-r--r--test/support/unique_ptr_test_helper.h158
-rwxr-xr-xtest/testit180
-rwxr-xr-xutils/gen_link_script.py (renamed from utils/gen_link_script/gen_link_script.py)0
-rw-r--r--utils/libcxx/__init__.py17
-rw-r--r--utils/libcxx/compiler.py (renamed from test/libcxx/compiler.py)38
-rw-r--r--utils/libcxx/sym_check/__init__.py (renamed from utils/sym_check/sym_check/__init__.py)0
-rw-r--r--utils/libcxx/sym_check/diff.py (renamed from utils/sym_check/sym_check/diff.py)8
-rw-r--r--utils/libcxx/sym_check/extract.py (renamed from utils/sym_check/sym_check/extract.py)7
-rw-r--r--utils/libcxx/sym_check/match.py (renamed from utils/sym_check/sym_check/match.py)0
-rw-r--r--utils/libcxx/sym_check/util.py (renamed from utils/sym_check/sym_check/util.py)50
-rw-r--r--utils/libcxx/test/__init__.py (renamed from test/libcxx/__init__.py)0
-rw-r--r--utils/libcxx/test/config.py (renamed from test/libcxx/test/config.py)314
-rw-r--r--utils/libcxx/test/executor.py (renamed from test/libcxx/test/executor.py)8
-rw-r--r--utils/libcxx/test/format.py (renamed from test/libcxx/test/format.py)14
-rw-r--r--utils/libcxx/test/target_info.py (renamed from test/libcxx/test/target_info.py)56
-rw-r--r--utils/libcxx/test/tracing.py (renamed from test/libcxx/test/tracing.py)0
-rw-r--r--utils/libcxx/util.py286
-rw-r--r--utils/not.py (renamed from utils/not/not.py)0
-rwxr-xr-xutils/sym_diff.py (renamed from utils/sym_check/sym_diff.py)16
-rwxr-xr-xutils/sym_extract.py (renamed from utils/sym_check/sym_extract.py)2
-rwxr-xr-xutils/sym_match.py (renamed from utils/sym_check/sym_match.py)2
-rw-r--r--utils/symcheck-blacklists/linux_blacklist.txt (renamed from utils/sym_check/linux_blacklist.txt)0
-rw-r--r--utils/symcheck-blacklists/osx_blacklist.txt (renamed from utils/sym_check/osx_blacklist.txt)0
-rw-r--r--www/atomic_design.html2
-rw-r--r--www/atomic_design_a.html2
-rw-r--r--www/atomic_design_b.html2
-rw-r--r--www/atomic_design_c.html2
-rw-r--r--www/cxx1y_status.html2
-rw-r--r--www/cxx1z_status.html116
-rw-r--r--www/index.html2
-rw-r--r--www/ts1z_status.html2
-rw-r--r--www/type_traits_design.html2
-rw-r--r--www/upcoming_meeting.html214
941 files changed, 16822 insertions, 14503 deletions
diff --git a/.clang-format b/.clang-format
index 782e2b8634a5..dd596813fbb9 100644
--- a/.clang-format
+++ b/.clang-format
@@ -2,13 +2,9 @@ BasedOnStyle: LLVM
---
Language: Cpp
+Standard: Cpp03
AlwaysBreakTemplateDeclarations: true
-AllowShortFunctionsOnASingleLine: Inline
-BreakBeforeBraces: Custom
-BraceWrapping:
- AfterClass: true
- AfterFunction: true
PointerAlignment: Left
# Disable formatting options which may break tests.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a692f1b57a28..e2ee1e52d2e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,12 +19,11 @@ set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
)
-
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(libcxx CXX C)
set(PACKAGE_NAME libcxx)
- set(PACKAGE_VERSION 4.0.0)
+ set(PACKAGE_VERSION 5.0.0svn)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org")
@@ -32,6 +31,15 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(HandleOutOfTreeLLVM)
endif()
+if (LIBCXX_STANDALONE_BUILD)
+ include(FindPythonInterp)
+ if( NOT PYTHONINTERP_FOUND )
+ message(WARNING "Failed to find python interpreter. "
+ "The libc++ test suite will be disabled.")
+ set(LLVM_INCLUDE_TESTS OFF)
+ endif()
+endif()
+
# Require out of source build.
include(MacroEnsureOutOfSourceBuild)
MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
@@ -39,13 +47,20 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
)
+if (MSVC)
+ set(LIBCXX_TARGETING_MSVC ON)
+else()
+ set(LIBCXX_TARGETING_MSVC OFF)
+endif()
+
#===============================================================================
# Setup CMake Options
#===============================================================================
include(CMakeDependentOption)
+include(HandleCompilerRT)
# Basic options ---------------------------------------------------------------
-option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
+option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of build mode." OFF)
option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON)
@@ -89,18 +104,9 @@ endif()
# ABI Library options ---------------------------------------------------------
set(LIBCXX_CXX_ABI "default" CACHE STRING
"Specify C++ ABI library to use.")
-set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++)
+set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++ vcruntime)
set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
-# FIXME: This is a temporary hack to force LLVM buildbots to store
-# the fixed cache entry instead of the previous cache entry. This is needed
-# because some LLVM buildbots don't clear their cache. It will be removed
-# once all LLVM bots have been run.
-if (LIBCXX_CXX_ABI STREQUAL "")
- set(LIBCXX_CXX_ABI "default" CACHE STRING
- "Specify the C++ ABI library to use." FORCE)
-endif()
-
# Setup the default options if LIBCXX_CXX_ABI is not specified.
if (LIBCXX_CXX_ABI STREQUAL "default")
find_path(
@@ -110,15 +116,18 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
NO_DEFAULT_PATH
)
- if (NOT DEFINED LIBCXX_STANDALONE_BUILD AND
+ if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND
IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_INTREE 1)
else()
- if (WIN32 AND NOT MINGW)
+ if (LIBCXX_TARGETING_MSVC)
# FIXME: Figure out how to configure the ABI library on Windows.
- set(LIBCXX_CXX_ABI_LIBNAME "none")
+ set(LIBCXX_CXX_ABI_LIBNAME "vcruntime")
+ elseif(APPLE)
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
+ set(LIBCXX_CXX_ABI_SYSTEM 1)
else()
set(LIBCXX_CXX_ABI_LIBNAME "default")
endif()
@@ -133,7 +142,7 @@ option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI library" OFF)
# Generate and install a linker script inplace of libc++.so. The linker script
# will link libc++ to the correct ABI library. This option is on by default
-# On UNIX platforms other than Apple unless 'LIBCXX_ENABLE_STATIC_ABI_LIBRARY'
+# on UNIX platforms other than Apple unless 'LIBCXX_ENABLE_STATIC_ABI_LIBRARY'
# is on. This option is also disabled when the ABI library is not specified
# or is specified to be "none".
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
@@ -149,9 +158,25 @@ option(LIBCXX_ENABLE_ABI_LINKER_SCRIPT
"Use and install a linker script for the given ABI library"
${ENABLE_LINKER_SCRIPT_DEFAULT_VALUE})
+set(ENABLE_NEW_DELETE_DEFAULT ON)
+if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
+# FIXME: This option should default to off. Unfortunatly GCC 4.9 fails to link
+# programs due to undefined references to new/delete in libc++abi so to work
+# around this libc++abi currently defaults LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS
+# to ON. Once the GCC bug has been worked around this option should be changed
+# back to OFF.
+ set(ENABLE_NEW_DELETE_DEFAULT ON)
+endif()
+
+option(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS
+ "Build libc++ with definitions for operator new/delete. This option can
+ be used to disable the definitions when libc++abi is expected to provide
+ them" ${ENABLE_NEW_DELETE_DEFAULT})
+
# Build libc++abi with libunwind. We need this option to determine whether to
# link with libunwind or libgcc_s while running the test cases.
option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF)
+option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF)
# Target options --------------------------------------------------------------
option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS})
@@ -316,10 +341,13 @@ endif()
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})
+file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
# Declare libc++ configuration variables.
# They are intended for use as follows:
@@ -342,9 +370,9 @@ include(HandleLibcxxFlags)
# 'config-ix' use them during feature checks. It also adds them to both
# 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS'
add_target_flags_if(LIBCXX_BUILD_32_BITS "-m32")
-add_target_flags_if(LIBCXX_TARGET_TRIPLE "-target ${LIBCXX_TARGET_TRIPLE}")
+add_target_flags_if(LIBCXX_TARGET_TRIPLE "--target=${LIBCXX_TARGET_TRIPLE}")
add_target_flags_if(LIBCXX_SYSROOT "--sysroot=${LIBCXX_SYSROOT}")
-add_target_flags_if(LIBCXX_GCC_TOOLCHAIN "-gcc-toolchain ${LIBCXX_GCC_TOOLCHAIN}")
+add_target_flags_if(LIBCXX_GCC_TOOLCHAIN "--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
if (LIBCXX_TARGET_TRIPLE)
set(TARGET_TRIPLE "${LIBCXX_TARGET_TRIPLE}")
endif()
@@ -363,6 +391,11 @@ if (LIBCXX_GENERATE_COVERAGE)
endif()
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ set(LIBCXX_DEBUG_BUILD ON)
+else()
+ set(LIBCXX_DEBUG_BUILD OFF)
+endif()
#===============================================================================
# Setup Compiler Flags
@@ -373,13 +406,18 @@ include(HandleLibCXXABI) # Setup the ABI library flags
if (NOT LIBCXX_STANDALONE_BUILD)
# Remove flags that may have snuck in.
remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG
- -lc++abi -m32)
+ -lc++abi)
endif()
remove_flags(-stdlib=libc++ -stdlib=libstdc++)
+# FIXME: Remove all debug flags and flags that change which Windows
+# default libraries are linked. Currently we only support linking the
+# non-debug DLLs
+remove_flags("/D_DEBUG" "/MTd" "/MDd" "/MT" "/Md")
+
# FIXME(EricWF): See the FIXME on LIBCXX_ENABLE_PEDANTIC.
# Remove the -pedantic flag and -Wno-pedantic and -pedantic-errors
-# so they don't get transformed into -Wno and -errors respectivly.
+# so they don't get transformed into -Wno and -errors respectively.
remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
@@ -412,6 +450,10 @@ add_compile_flags_if_supported(-fvisibility-inlines-hidden)
# library.
add_definitions(-D_LIBCPP_BUILDING_LIBRARY)
+if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
+ add_definitions(-D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS)
+endif()
+
# Warning flags ===============================================================
add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
add_compile_flags_if_supported(
@@ -425,7 +467,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
add_compile_flags_if_supported(
-Wno-literal-suffix
- -Wno-c++14-compat)
+ -Wno-c++14-compat
+ -Wno-noexcept-type)
endif()
if (LIBCXX_ENABLE_WERROR)
add_compile_flags_if_supported(-Werror)
@@ -474,9 +517,11 @@ endif()
# Assertion flags =============================================================
define_if(LIBCXX_ENABLE_ASSERTIONS -UNDEBUG)
define_if_not(LIBCXX_ENABLE_ASSERTIONS -DNDEBUG)
-if (LIBCXX_ENABLE_ASSERTIONS)
+define_if(LIBCXX_ENABLE_ASSERTIONS -D_LIBCPP_DEBUG=0)
+define_if(LIBCXX_DEBUG_BUILD -D_DEBUG)
+if (LIBCXX_ENABLE_ASSERTIONS AND NOT LIBCXX_DEBUG_BUILD)
# MSVC doesn't like _DEBUG on release builds. See PR 4379.
- define_if_not(MSVC -D_DEBUG)
+ define_if_not(LIBCXX_TARGETING_MSVC -D_DEBUG)
endif()
# Modules flags ===============================================================
@@ -576,10 +621,15 @@ add_subdirectory(lib)
if (LIBCXX_INCLUDE_BENCHMARKS)
add_subdirectory(benchmarks)
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)
if (LIBCXX_INCLUDE_TESTS)
- add_subdirectory(test)
add_subdirectory(lib/abi)
endif()
+
if (LIBCXX_INCLUDE_DOCS)
add_subdirectory(docs)
endif()
diff --git a/CREDITS.TXT b/CREDITS.TXT
index 1311e05c4298..92123d736bf0 100644
--- a/CREDITS.TXT
+++ b/CREDITS.TXT
@@ -81,7 +81,7 @@ E: andrew.c.morrow@gmail.com
D: Minor patches and Linux fixes.
N: Michael Park
-E: mpark@apache.org
+E: mcypark@gmail.com
D: Implementation of <variant>.
N: Arvid Picciani
diff --git a/TODO.TXT b/TODO.TXT
index 998f81ba6eb8..652a38de75a5 100644
--- a/TODO.TXT
+++ b/TODO.TXT
@@ -17,6 +17,56 @@ Test Suite Tasks
* Improve the quality and portability of the locale test data.
* Convert failure tests to use Clang Verify.
+Filesystem Tasks
+================
+* P0492r2 - Implement National body comments for Filesystem
+ * INCOMPLETE - US 25: has_filename() is equivalent to just !empty()
+ * INCOMPLETE - US 31: Everything is defined in terms of one implicit host system
+ * INCOMPLETE - US 32: Meaning of 27.10.2.1 unclear
+ * INCOMPLETE - US 33: Definition of canonical path problematic
+ * INCOMPLETE - US 34: Are there attributes of a file that are not an aspect of the file system?
+ * INCOMPLETE - US 35: What synchronization is required to avoid a file system race?
+ * INCOMPLETE - US 36: Symbolic links themselves are attached to a directory via (hard) links
+ * INCOMPLETE - US 37: The term “redundant current directory (dot) elements†is not defined
+ * INCOMPLETE - US 38: Duplicates §17.3.16
+ * INCOMPLETE - US 39: Remove note: Dot and dot-dot are not directories
+ * INCOMPLETE - US 40: Not all directories have a parent.
+ * INCOMPLETE - US 41: The term “parent directory†for a (non-directory) file is unusual
+ * INCOMPLETE - US 42: Pathname resolution does not always resolve a symlink
+ * INCOMPLETE - US 43: Concerns about encoded character types
+ * INCOMPLETE - US 44: Definition of path in terms of a string requires leaky abstraction
+ * INCOMPLETE - US 45: Generic format portability compromised by unspecified root-name
+ * INCOMPLETE - US 46: filename can be empty so productions for relative-path are redundant
+ * INCOMPLETE - US 47: “.†and “..†already match the name production
+ * INCOMPLETE - US 48: Multiple separators are often meaningful in a root-name
+ * INCOMPLETE - US 49: What does “method of conversion method†mean?
+ * INCOMPLETE - US 50: 27.10.8.1 ¶ 1.4 largely redundant with ¶ 1.3
+ * INCOMPLETE - US 51: Failing to add / when appending empty string prevents useful apps
+ * INCOMPLETE - US 52: remove_filename() postcondition is not by itself a definition
+ * INCOMPLETE - US 53: remove_filename()'s name does not correspond to its behavior
+ * INCOMPLETE - US 54: remove_filename() is broken
+ * INCOMPLETE - US 55: replace_extension()'s use of path as parameter is inappropriate
+ * INCOMPLETE - US 56: Remove replace_extension()'s conditional addition of period
+ * INCOMPLETE - US 57: On Windows, absolute paths will sort in among relative paths
+ * INCOMPLETE - US 58: parent_path() behavior for root paths is useless
+ * INCOMPLETE - US 59: filename() returning path for single path components is bizarre
+ * INCOMPLETE - US 60: path("/foo/").filename()==path(".") is surprising
+ * INCOMPLETE - US 61: Leading dots in filename() should not begin an extension
+ * INCOMPLETE - US 62: It is important that stem()+extension()==filename()
+ * INCOMPLETE - US 63: lexically_normal() inconsistently treats trailing "/" but not "/.." as directory
+ * INCOMPLETE - US 73, CA 2: root-name is effectively implementation defined
+ * INCOMPLETE - US 74, CA 3: The term “pathname†is ambiguous in some contexts
+ * INCOMPLETE - US 75, CA 4: Extra flag in path constructors is needed
+ * INCOMPLETE - US 76, CA 5: root-name definition is over-specified.
+ * INCOMPLETE - US 77, CA 6: operator/ and other appends not useful if arg has root-name
+ * INCOMPLETE - US 78, CA 7: Member absolute() in 27.10.4.1 is overspecified for non-POSIX-like O/S
+ * INCOMPLETE - US 79, CA 8: Some operation functions are overspecified for implementation-defined file types
+ * INCOMPLETE - US 185: Fold error_code and non-error_code signatures into one signature
+ * INCOMPLETE - FI 14: directory_entry comparisons are members
+ * INCOMPLETE - Late 36: permissions() error_code overload should be noexcept
+ * INCOMPLETE - Late 37: permissions() actions should be separate parameter
+ * INCOMPLETE - Late 42: resize_file() Postcondition missing argument
+
Misc Tasks
==========
* Find all sequences of >2 underscores and eradicate them.
diff --git a/cmake/Modules/CodeCoverage.cmake b/cmake/Modules/CodeCoverage.cmake
index addd10abdfe1..1bd3a786812a 100644
--- a/cmake/Modules/CodeCoverage.cmake
+++ b/cmake/Modules/CodeCoverage.cmake
@@ -3,6 +3,11 @@ if (NOT CODE_COVERAGE_LCOV)
message(FATAL_ERROR "Cannot find lcov...")
endif()
+find_program(CODE_COVERAGE_LLVM_COV llvm-cov)
+if (NOT CODE_COVERAGE_LLVM_COV)
+ message(FATAL_ERROR "Cannot find llvm-cov...")
+endif()
+
find_program(CODE_COVERAGE_GENHTML genhtml)
if (NOT CODE_COVERAGE_GENHTML)
message(FATAL_ERROR "Cannot find genhtml...")
@@ -11,6 +16,14 @@ endif()
set(CMAKE_CXX_FLAGS_COVERAGE "-g -O0 --coverage")
function(setup_lcov_test_target_coverage target_name output_dir capture_dirs source_dirs)
+ if (NOT DEFINED LIBCXX_BINARY_DIR)
+ message(FATAL_ERROR "Variable must be set")
+ endif()
+
+ set(GCOV_TOOL "${LIBCXX_BINARY_DIR}/llvm-cov-wrapper")
+ file(GENERATE OUTPUT ${GCOV_TOOL}
+ CONTENT "#!/usr/bin/env bash\n${CODE_COVERAGE_LLVM_COV} gcov \"$@\"\n")
+
file(MAKE_DIRECTORY ${output_dir})
set(CAPTURE_DIRS "")
@@ -27,8 +40,9 @@ function(setup_lcov_test_target_coverage target_name output_dir capture_dirs sou
message(STATUS "Extract Directories: ${EXTRACT_DIRS}")
add_custom_target(generate-lib${target_name}-coverage
- COMMAND ${CODE_COVERAGE_LCOV} --capture ${CAPTURE_DIRS} -o test_coverage.info
- COMMAND ${CODE_COVERAGE_LCOV} --extract test_coverage.info ${EXTRACT_DIRS} -o test_coverage.info
+ COMMAND chmod +x ${GCOV_TOOL}
+ COMMAND ${CODE_COVERAGE_LCOV} --gcov-tool ${GCOV_TOOL} --capture ${CAPTURE_DIRS} -o test_coverage.info
+ COMMAND ${CODE_COVERAGE_LCOV} --gcov-tool ${GCOV_TOOL} --extract test_coverage.info ${EXTRACT_DIRS} -o test_coverage.info
COMMAND ${CODE_COVERAGE_GENHTML} --demangle-cpp test_coverage.info -o test_coverage
COMMAND ${CMAKE_COMMAND} -E remove test_coverage.info
WORKING_DIRECTORY ${output_dir}
diff --git a/cmake/Modules/HandleCompilerRT.cmake b/cmake/Modules/HandleCompilerRT.cmake
new file mode 100644
index 000000000000..e9da3c43a211
--- /dev/null
+++ b/cmake/Modules/HandleCompilerRT.cmake
@@ -0,0 +1,58 @@
+function(find_compiler_rt_library name dest)
+ if (NOT DEFINED LIBCXX_COMPILE_FLAGS)
+ message(FATAL_ERROR "LIBCXX_COMPILE_FLAGS must be defined when using this function")
+ endif()
+ set(dest "" PARENT_SCOPE)
+ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
+ "--rtlib=compiler-rt" "--print-libgcc-file-name")
+ if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
+ list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}")
+ endif()
+ execute_process(
+ COMMAND ${CLANG_COMMAND}
+ RESULT_VARIABLE HAD_ERROR
+ OUTPUT_VARIABLE LIBRARY_FILE
+ )
+ string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+ string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
+ if (NOT HAD_ERROR AND EXISTS "${LIBRARY_FILE}")
+ message(STATUS "Found compiler-rt library: ${LIBRARY_FILE}")
+ set(${dest} "${LIBRARY_FILE}" PARENT_SCOPE)
+ else()
+ message(STATUS "Failed to find compiler-rt library")
+ endif()
+endfunction()
+
+function(find_compiler_rt_dir dest)
+ if (NOT DEFINED LIBCXX_COMPILE_FLAGS)
+ message(FATAL_ERROR "LIBCXX_COMPILE_FLAGS must be defined when using this function")
+ endif()
+ set(dest "" PARENT_SCOPE)
+ if (APPLE)
+ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
+ "-print-file-name=lib")
+ execute_process(
+ COMMAND ${CLANG_COMMAND}
+ RESULT_VARIABLE HAD_ERROR
+ OUTPUT_VARIABLE LIBRARY_DIR
+ )
+ string(STRIP "${LIBRARY_DIR}" LIBRARY_DIR)
+ set(LIBRARY_DIR "${LIBRARY_DIR}/darwin")
+ else()
+ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
+ "--rtlib=compiler-rt" "--print-libgcc-file-name")
+ execute_process(
+ COMMAND ${CLANG_COMMAND}
+ RESULT_VARIABLE HAD_ERROR
+ OUTPUT_VARIABLE LIBRARY_FILE
+ )
+ string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+ get_filename_component(LIBRARY_DIR "${LIBRARY_FILE}" DIRECTORY)
+ endif()
+ if (NOT HAD_ERROR AND EXISTS "${LIBRARY_DIR}")
+ message(STATUS "Found compiler-rt directory: ${LIBRARY_DIR}")
+ set(${dest} "${LIBRARY_DIR}" PARENT_SCOPE)
+ else()
+ message(STATUS "Failed to find compiler-rt directory")
+ endif()
+endfunction()
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
index 4a6382b136b8..b404e36c1480 100644
--- a/cmake/Modules/HandleLibCXXABI.cmake
+++ b/cmake/Modules/HandleLibCXXABI.cmake
@@ -18,6 +18,7 @@
# abidirs : A list of relative paths to create under an include directory
# in the libc++ build directory.
#
+
macro(setup_abi_lib abidefines abilib abifiles abidirs)
list(APPEND LIBCXX_COMPILE_FLAGS ${abidefines})
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_CXX_ABI_INCLUDE_PATHS}"
@@ -32,11 +33,10 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
set(LIBCXX_ABILIB_FILES ${abifiles})
# The place in the build tree where we store out-of-source headers.
- set(LIBCXX_BUILD_HEADERS_ROOT "${CMAKE_BINARY_DIR}/include/c++-build")
file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1")
foreach(_d ${abidirs})
- file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}/${_d}")
+ file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}/${_d}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}")
endforeach()
@@ -48,19 +48,19 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
get_filename_component(dstdir ${fpath} PATH)
get_filename_component(ifile ${fpath} NAME)
file(COPY "${incpath}/${fpath}"
- DESTINATION "${LIBCXX_BUILD_HEADERS_ROOT}/${dstdir}"
+ DESTINATION "${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}"
)
file(COPY "${incpath}/${fpath}"
DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}"
)
if (LIBCXX_INSTALL_HEADERS)
- install(FILES "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}"
+ install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
DESTINATION include/c++/v1/${dstdir}
COMPONENT libcxx
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endif()
- list(APPEND abilib_headers "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}")
+ list(APPEND abilib_headers "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}")
endif()
endforeach()
if (NOT found)
@@ -68,7 +68,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
endif()
endforeach()
- include_directories("${LIBCXX_BUILD_HEADERS_ROOT}")
+ include_directories("${LIBCXX_BINARY_INCLUDE_DIR}")
endmacro()
@@ -103,13 +103,17 @@ elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
# Assume c++abi is installed in the system, rely on -lc++abi link flag.
set(CXXABI_LIBNAME "c++abi")
endif()
- setup_abi_lib("-DLIBCXX_BUILDING_LIBCXXABI"
- ${CXXABI_LIBNAME} "cxxabi.h;__cxxabi_config.h" ""
- )
+ set(HEADERS "cxxabi.h;__cxxabi_config.h")
+ if (LIBCXX_CXX_ABI_SYSTEM)
+ set(HEADERS "")
+ endif()
+ setup_abi_lib("-DLIBCXX_BUILDING_LIBCXXABI" ${CXXABI_LIBNAME} "${HEADERS}" "")
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt")
setup_abi_lib("-DLIBCXXRT"
"cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
)
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "vcruntime")
+ # Nothing TODO
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
list(APPEND LIBCXX_COMPILE_FLAGS "-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY")
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default")
diff --git a/cmake/Modules/HandleLibcxxFlags.cmake b/cmake/Modules/HandleLibcxxFlags.cmake
index 7077c6e38264..65f7d187f3bd 100644
--- a/cmake/Modules/HandleLibcxxFlags.cmake
+++ b/cmake/Modules/HandleLibcxxFlags.cmake
@@ -26,6 +26,10 @@ endmacro()
# or added in other parts of LLVM's cmake configuration.
macro(remove_flags)
foreach(var ${ARGN})
+ string(REPLACE "${var}" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+ string(REPLACE "${var}" "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
+ string(REPLACE "${var}" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ string(REPLACE "${var}" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REPLACE "${var}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${var}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REPLACE "${var}" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
diff --git a/cmake/Modules/HandleOutOfTreeLLVM.cmake b/cmake/Modules/HandleOutOfTreeLLVM.cmake
index 7fee839d2732..879882dcfea6 100644
--- a/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ b/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -43,7 +43,8 @@ macro(find_llvm_parts)
execute_process(
COMMAND ${LLVM_CONFIG_PATH} --cmakedir
RESULT_VARIABLE HAD_ERROR
- OUTPUT_VARIABLE CONFIG_OUTPUT)
+ OUTPUT_VARIABLE CONFIG_OUTPUT
+ ERROR_QUIET)
if(NOT HAD_ERROR)
string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH)
else()
@@ -95,13 +96,6 @@ macro(configure_out_of_tree_llvm)
endif()
# LLVM Options --------------------------------------------------------------
- include(FindPythonInterp)
- if( NOT PYTHONINTERP_FOUND )
- message(WARNING "Failed to find python interpreter. "
- "The libc++ test suite will be disabled.")
- set(LLVM_INCLUDE_TESTS OFF)
- endif()
-
if (NOT DEFINED LLVM_INCLUDE_TESTS)
set(LLVM_INCLUDE_TESTS ${LLVM_FOUND})
endif()
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 4f13b787ae35..c425c31ea095 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -1,4 +1,5 @@
include(CheckLibraryExists)
+include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
if(WIN32 AND NOT MINGW)
@@ -24,17 +25,24 @@ endif()
# required during compilation (which has the -nodefaultlibs). libc is
# required for the link to go through. We remove sanitizers from the
# configuration checks to avoid spurious link errors.
-check_cxx_compiler_flag(-nodefaultlibs LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
+check_c_compiler_flag(-nodefaultlibs LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs")
if (LIBCXX_HAS_C_LIB)
list(APPEND CMAKE_REQUIRED_LIBRARIES c)
endif ()
if (LIBCXX_USE_COMPILER_RT)
- list(APPEND CMAKE_REQUIRED_LIBRARIES -rtlib=compiler-rt)
+ list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
+ find_compiler_rt_library(builtins LIBCXX_BUILTINS_LIBRARY)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${LIBCXX_BUILTINS_LIBRARY}")
elseif (LIBCXX_HAS_GCC_S_LIB)
list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
endif ()
+ if (MINGW)
+ # Mingw64 requires quite a few "C" runtime libraries in order for basic
+ # programs to link successfully with -nodefaultlibs.
+ list(APPEND CMAKE_REQUIRED_LIBRARIES mingw32 gcc gcc_eh mingwex msvcrt gcc)
+ endif()
if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
endif ()
diff --git a/docs/BuildingLibcxx.rst b/docs/BuildingLibcxx.rst
index b00bbdd78f64..c7b5e96422f0 100644
--- a/docs/BuildingLibcxx.rst
+++ b/docs/BuildingLibcxx.rst
@@ -92,6 +92,57 @@ build would look like this:
$ make check-libcxx # optional
+Experimental Support for Windows
+--------------------------------
+
+The Windows support requires building with clang-cl as cl does not support one
+required extension: `#include_next`. Furthermore, VS 2015 or newer (19.00) is
+required. In the case of clang-cl, we need to specify the "MS Compatibility
+Version" as it defaults to 2014 (18.00).
+
+CMake + Visual Studio
+~~~~~~~~~~~~~~~~~~~~~
+
+Building with Visual Studio currently does not permit running tests. However,
+it is the simplest way to build.
+
+.. code-block:: batch
+
+ > cmake -G "Visual Studio 14 2015" ^
+ -T "LLVM-vs2014" ^
+ -DLIBCXX_ENABLE_SHARED=YES ^
+ -DLIBCXX_ENABLE_STATIC=NO ^
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO ^
+ \path\to\libcxx
+ > cmake --build .
+
+CMake + ninja
+~~~~~~~~~~~~~
+
+Building with ninja is required for development to enable tests.
+Unfortunately, doing so requires additional configuration as we cannot
+just specify a toolset.
+
+.. code-block:: batch
+
+ > cmake -G Ninja ^
+ -DCMAKE_MAKE_PROGRAM=/path/to/ninja ^
+ -DCMAKE_SYSTEM_NAME=Windows ^
+ -DCMAKE_C_COMPILER=clang-cl ^
+ -DCMAKE_C_FLAGS="-fms-compatibility-version=19.00 --target=i686--windows" ^
+ -DCMAKE_CXX_COMPILER=clang-c ^
+ -DCMAKE_CXX_FLAGS="-fms-compatibility-version=19.00 --target=i686--windows" ^
+ -DLLVM_PATH=/path/to/llvm/tree ^
+ -DLIBCXX_ENABLE_SHARED=YES ^
+ -DLIBCXX_ENABLE_STATIC=NO ^
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO ^
+ \path\to\libcxx
+ > /path/to/ninja cxx
+ > /path/to/ninja check-cxx
+
+Note that the paths specified with backward slashes must use the `\\` as the
+directory separator as clang-cl may otherwise parse the path as an argument.
+
.. _`libc++abi`: http://libcxxabi.llvm.org/
diff --git a/docs/DesignDocs/DebugMode.rst b/docs/DesignDocs/DebugMode.rst
index 166c733e6630..3b997d446070 100644
--- a/docs/DesignDocs/DebugMode.rst
+++ b/docs/DesignDocs/DebugMode.rst
@@ -3,7 +3,7 @@ Debug Mode
==========
.. contents::
- :local
+ :local:
.. _using-debug-mode:
diff --git a/docs/DesignDocs/ThreadingSupportAPI.rst b/docs/DesignDocs/ThreadingSupportAPI.rst
index 77ec6bce12ba..556c45b7e1f7 100644
--- a/docs/DesignDocs/ThreadingSupportAPI.rst
+++ b/docs/DesignDocs/ThreadingSupportAPI.rst
@@ -33,13 +33,22 @@ interface normally provided by ``<__threading_support>``.
External Threading Library
==========================
-Normally ``<__threading_support>`` provides inline definitions to each internal
-threading API function it declares. However libc++ also supports using an
-external library to provide the definitions.
-
-When ``_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL`` libc++ does not provide inline
-definitions for the internal API, instead assuming the definitions will be
-provided by an external library.
+libc++ can be compiled with its internal threading API delegating to an external
+library. Such a configuration is useful for library vendors who wish to
+distribute a thread-agnostic libc++ library, where the users of the library are
+expected to provide the implementation of the libc++ internal threading API.
+
+On a production setting, this would be achieved through a custom
+``<__external_threading>`` header, which declares the libc++ internal threading
+API but leaves out the implementation.
+
+The ``-DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY`` option allows building libc++ in
+such a configuration while allowing it to be tested on a platform that supports
+any of the threading systems (e.g. pthread) supported in ``__threading_support``
+header. Therefore, the main purpose of this option is to allow testing of this
+particular configuration of the library without being tied to a vendor-specific
+threading system. This option is only meant to be used by libc++ library
+developers.
Threading Configuration Macros
==============================
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst
index 7c6f39c44b48..694882dd2638 100644
--- a/docs/DesignDocs/VisibilityMacros.rst
+++ b/docs/DesignDocs/VisibilityMacros.rst
@@ -22,6 +22,12 @@ Visibility Macros
Mark a symbol as being exported by the libc++ library. This attribute must
be applied to the declaration of all functions exported by the libc++ dylib.
+**_LIBCPP_EXTERN_VIS**
+ Mark a symbol as being exported by the libc++ library. This attribute may
+ only be applied to objects defined in the libc++ library. On Windows this
+ macro applies `dllimport`/`dllexport` to the symbol. On all other platforms
+ this macro has no effect.
+
**_LIBCPP_OVERRIDABLE_FUNC_VIS**
Mark a symbol as being exported by the libc++ library, but allow it to be
overridden locally. On non-Windows, this is equivalent to `_LIBCPP_FUNC_VIS`.
@@ -41,18 +47,17 @@ Visibility Macros
A synonym for `_LIBCPP_INLINE_VISIBILITY`
**_LIBCPP_TYPE_VIS**
+ Mark a type's typeinfo, vtable and members as having default visibility.
+ This attribute cannot be used on class templates.
+
+**_LIBCPP_TEMPLATE_VIS**
Mark a type's typeinfo and vtable as having default visibility.
- `_LIBCPP_TYPE_VIS`. This macro has no effect on the visibility of the
- type's member functions. This attribute cannot be used on class templates.
+ This macro has no effect on the visibility of the type's member functions.
**GCC Behavior**: GCC does not support Clang's `type_visibility(...)`
attribute. With GCC the `visibility(...)` attribute is used and member
functions are affected.
-**_LIBCPP_TEMPLATE_VIS**
- The same as `_LIBCPP_TYPE_VIS` except that it may be applied to class
- templates.
-
**Windows Behavior**: DLLs do not support dllimport/export on class templates.
The macro has an empty definition on this platform.
@@ -104,6 +109,35 @@ Visibility Macros
the extern template declaration) as exported on Windows, as discussed above.
On all other platforms, this macro has an empty definition.
+**_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS**
+ Mark a symbol as hidden so it will not be exported from shared libraries. This
+ is intended specifically for method templates of either classes marked with
+ `_LIBCPP_TYPE_VIS` or classes with an extern template instantiation
+ declaration marked with `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS`.
+
+ When building libc++ with hidden visibility, we want explicit template
+ instantiations to export members, which is consistent with existing Windows
+ behavior. We also want classes annotated with `_LIBCPP_TYPE_VIS` to export
+ their members, which is again consistent with existing Windows behavior.
+ Both these changes are necessary for clients to be able to link against a
+ libc++ DSO built with hidden visibility without encountering missing symbols.
+
+ An unfortunate side effect, however, is that method templates of classes
+ either marked `_LIBCPP_TYPE_VIS` or with extern template instantiation
+ declarations marked with `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` also get default
+ visibility when instantiated. These methods are often implicitly instantiated
+ inside other libraries which use the libc++ headers, and will therefore end up
+ being exported from those libraries, since those implicit instantiations will
+ receive default visibility. This is not acceptable for libraries that wish to
+ control their visibility, and led to PR30642.
+
+ Consequently, all such problematic method templates are explicitly marked
+ either hidden (via this macro) or inline, so that they don't leak into client
+ libraries. The problematic methods were found by running
+ `bad-visibility-finder <https://github.com/smeenai/bad-visibility-finder>`_
+ against the libc++ headers after making `_LIBCPP_TYPE_VIS` and
+ `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
+
**_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY**
Mark a member function of a class template as visible and always inline. This
macro should only be applied to member functions of class templates that are
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst
index de87c9c159de..183664655aa3 100644
--- a/docs/UsingLibcxx.rst
+++ b/docs/UsingLibcxx.rst
@@ -146,6 +146,11 @@ thread safety annotations.
build of libc++ which does not export any symbols, which can be useful when
building statically for inclusion into another library.
+**_LIBCPP_DISABLE_EXTERN_TEMPLATE**:
+ This macro is used to disable extern template declarations in the libc++
+ headers. The intended use case is for clients who wish to use the libc++
+ headers without taking a dependency on the libc++ library itself.
+
**_LIBCPP_ENABLE_TUPLE_IMPLICIT_REDUCED_ARITY_EXTENSION**:
This macro is used to re-enable an extension in `std::tuple` which allowed
it to be implicitly constructed from fewer initializers than contained
@@ -173,3 +178,22 @@ thread safety annotations.
return Tup{"hello world", 42}; // explicit constructor called. OK.
}
+**_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS**:
+ This macro disables the additional diagnostics generated by libc++ using the
+ `diagnose_if` attribute. These additional diagnostics include checks for:
+
+ * Giving `set`, `map`, `multiset`, `multimap` a comparator which is not
+ const callable.
+
+C++17 Specific Configuration Macros
+-----------------------------------
+**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES**:
+ This macro is used to re-enable all the features removed in C++17. The effect
+ is equivalent to manually defining each macro listed below.
+
+**_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
+ This macro is used to re-enable the `set_unexpected`, `get_unexpected`, and
+ `unexpected` functions, which were removed in C++17.
+
+**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
+ This macro is used to re-enable `std::auto_ptr` in C++17.
diff --git a/docs/conf.py b/docs/conf.py
index 743d0f7edad0..17fb401a8470 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -47,9 +47,9 @@ copyright = u'2011-2017, LLVM Project'
# built documents.
#
# The short X.Y version.
-version = '4'
+version = '5.0'
# The full version, including alpha/beta/rc tags.
-release = '4'
+release = '5.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/index.rst b/docs/index.rst
index 9e72ca9d47a4..58043f5a49aa 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -7,7 +7,8 @@
Overview
========
-libc++ is a new implementation of the C++ standard library, targeting C++11.
+libc++ is a new implementation of the C++ standard library, targeting C++11 and
+above.
* Features and Goals
@@ -119,7 +120,7 @@ This list contains known issues with libc++
A full list of currently open libc++ bugs can be `found here`__.
-.. __: https://llvm.org/bugs/buglist.cgi?component=All%20Bugs&product=libc%2B%2B&query_format=advanced&resolution=---&order=changeddate%20DESC%2Cassigned_to%20DESC%2Cbug_status%2Cpriority%2Cbug_id&list_id=74184
+.. __: https://bugs.llvm.org/buglist.cgi?component=All%20Bugs&product=libc%2B%2B&query_format=advanced&resolution=---&order=changeddate%20DESC%2Cassigned_to%20DESC%2Cbug_status%2Cpriority%2Cbug_id&list_id=74184
Design Documents
----------------
@@ -179,7 +180,7 @@ Quick Links
===========
* `LLVM Homepage <http://llvm.org/>`_
* `libc++abi Homepage <http://libcxxabi.llvm.org/>`_
-* `LLVM Bugzilla <http://llvm.org/bugs/>`_
+* `LLVM Bugzilla <https://bugs.llvm.org/>`_
* `cfe-commits Mailing List`_
* `cfe-dev Mailing List`_
* `Browse libc++ -- SVN <http://llvm.org/svn/llvm-project/libcxx/trunk/>`_
diff --git a/include/__config b/include/__config
index 340c573a2a40..ee46860495ae 100644
--- a/include/__config
+++ b/include/__config
@@ -12,8 +12,10 @@
#define _LIBCPP_CONFIG
#if defined(_MSC_VER) && !defined(__clang__)
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#endif
+#endif
#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#pragma GCC system_header
@@ -23,16 +25,30 @@
#ifdef __GNUC__
#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
+// The _GNUC_VER_NEW macro better represents the new GCC versioning scheme
+// introduced in GCC 5.0.
+#define _GNUC_VER_NEW (_GNUC_VER * 10 + __GNUC_PATCHLEVEL__)
#else
#define _GNUC_VER 0
+#define _GNUC_VER_NEW 0
#endif
-#define _LIBCPP_VERSION 4000
+#define _LIBCPP_VERSION 5000
#ifndef _LIBCPP_ABI_VERSION
#define _LIBCPP_ABI_VERSION 1
#endif
+#if defined(__ELF__)
+#define _LIBCPP_OBJECT_FORMAT_ELF 1
+#elif defined(__MACH__)
+#define _LIBCPP_OBJECT_FORMAT_MACHO 1
+#elif defined(_WIN32)
+#define _LIBCPP_OBJECT_FORMAT_COFF 1
+#else
+#error Unknown object file format
+#endif
+
#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2
// Change short string representation so that string data starts at offset 0,
// improving its alignment in some cases.
@@ -47,7 +63,6 @@
#define _LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB
#define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
#define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
// Don't use a nullptr_t simulation type in C++03 instead using C++11 nullptr
// provided under the alternate keyword __nullptr, which changes the mangling
// of nullptr_t. This option is ABI incompatible with GCC in C++03 mode.
@@ -57,10 +72,18 @@
// `pointer_safety` and `get_pointer_safety()` will no longer be available
// in C++03.
#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
+// Define a key function for `bad_function_call` in the library, to centralize
+// its vtable and typeinfo to libc++ rather than having all other libraries
+// using that class define their own copies.
+#define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
#elif _LIBCPP_ABI_VERSION == 1
-#if !defined(_WIN32)
-// Enable compiling a definition of error_category() into the libc++ dylib.
-#define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR
+#if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
+// Enable compiling copies of now inline methods into the dylib to support
+// applications compiled against older libraries. This is unnecessary with
+// COFF dllexport semantics, since dllexport forces a non-inline definition
+// of inline functions to be emitted anyway. Our own non-inline copy would
+// conflict with the dllexport-emitted copy, so we disable it.
+#define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
#endif
// Feature macros for disabling pre ABI v1 features. All of these options
// are deprecated.
@@ -100,6 +123,11 @@
#ifndef __is_identifier
#define __is_identifier(__x) 1
#endif
+#ifndef __has_declspec_attribute
+#define __has_declspec_attribute(__x) 0
+#endif
+
+#define __has_keyword(__x) !(__is_identifier(__x))
#if defined(__clang__)
#define _LIBCPP_COMPILER_CLANG
@@ -115,7 +143,7 @@
#endif
#ifndef _LIBCPP_CLANG_VER
-# define _LIBCPP_CLANG_VER 0
+#define _LIBCPP_CLANG_VER 0
#endif
// FIXME: ABI detection should be done via compiler builtin macros. This
@@ -190,7 +218,6 @@
# define _LIBCPP_LITTLE_ENDIAN 1
# define _LIBCPP_BIG_ENDIAN 0
# define _LIBCPP_SHORT_WCHAR 1
-
// If mingw not explicitly detected, assume using MS C runtime only.
# ifndef __MINGW32__
# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
@@ -198,6 +225,19 @@
# if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
# define _LIBCPP_HAS_BITSCAN64
# endif
+# if defined(_LIBCPP_MSVCRT)
+# define _LIBCPP_HAS_QUICK_EXIT
+# endif
+
+// Some CRT APIs are unavailable to store apps
+#if defined(WINAPI_FAMILY)
+#include <winapifamily.h>
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \
+ (!defined(WINAPI_PARTITION_SYSTEM) || \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM))
+#define _LIBCPP_WINDOWS_STORE_APP
+#endif
+#endif
#endif // defined(_WIN32)
#ifdef __sun__
@@ -252,7 +292,7 @@
// _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
// _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility.
#if (defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \
- !defined(__arm__)) || \
+ (!defined(__arm__) || __ARM_ARCH_7K__ >= 2)) || \
defined(_LIBCPP_ALTERNATE_STRING_LAYOUT)
#define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
#endif
@@ -297,7 +337,7 @@ typedef __char32_t char32_t;
#endif
#if !(__has_feature(cxx_nullptr))
-# if __has_extension(cxx_nullptr) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR)
+# if (__has_extension(cxx_nullptr) || __has_keyword(__nullptr)) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR)
# define nullptr __nullptr
# else
# define _LIBCPP_HAS_NO_NULLPTR
@@ -335,7 +375,6 @@ typedef __char32_t char32_t;
#if __has_feature(objc_arc_weak)
#define _LIBCPP_HAS_OBJC_ARC_WEAK
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
#endif
#if !(__has_feature(cxx_constexpr))
@@ -472,14 +511,13 @@ namespace std {
#endif // __GXX_EXPERIMENTAL_CXX0X__
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
#define _LIBCPP_END_NAMESPACE_STD } }
#define _VSTD std::_LIBCPP_NAMESPACE
namespace std {
-namespace _LIBCPP_NAMESPACE {
-}
-using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
+ inline namespace _LIBCPP_NAMESPACE {
+ }
}
#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
@@ -551,14 +589,6 @@ namespace std {
#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
-#if defined(__ELF__)
-#define _LIBCPP_OBJECT_FORMAT_ELF 1
-#elif defined(__MACH__)
-#define _LIBCPP_OBJECT_FORMAT_MACHO 1
-#else
-#define _LIBCPP_OBJECT_FORMAT_COFF 1
-#endif
-
#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
#if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
# define _LIBCPP_DLL_VIS
@@ -579,8 +609,10 @@ namespace std {
#define _LIBCPP_TYPE_VIS _LIBCPP_DLL_VIS
#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
+#define _LIBCPP_EXTERN_VIS _LIBCPP_DLL_VIS
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
#define _LIBCPP_HIDDEN
+#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
#define _LIBCPP_TEMPLATE_VIS
#define _LIBCPP_FUNC_VIS_ONLY
#define _LIBCPP_ENUM_VIS
@@ -604,6 +636,15 @@ namespace std {
#endif
#endif
+#ifndef _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+// The inline should be removed once PR32114 is resolved
+#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN
+#else
+#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#endif
+#endif
+
#ifndef _LIBCPP_FUNC_VIS
#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
#define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default")))
@@ -614,24 +655,32 @@ namespace std {
#ifndef _LIBCPP_TYPE_VIS
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
-# if __has_attribute(__type_visibility__)
-# define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
-# else
-# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
-# endif
+# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
# else
# define _LIBCPP_TYPE_VIS
# endif
#endif
#ifndef _LIBCPP_TEMPLATE_VIS
-# define _LIBCPP_TEMPLATE_VIS _LIBCPP_TYPE_VIS
+# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+# if __has_attribute(__type_visibility__)
+# define _LIBCPP_TEMPLATE_VIS __attribute__ ((__type_visibility__("default")))
+# else
+# define _LIBCPP_TEMPLATE_VIS __attribute__ ((__visibility__("default")))
+# endif
+# else
+# define _LIBCPP_TEMPLATE_VIS
+# endif
#endif
#ifndef _LIBCPP_FUNC_VIS_ONLY
# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
#endif
+#ifndef _LIBCPP_EXTERN_VIS
+# define _LIBCPP_EXTERN_VIS
+#endif
+
#ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_FUNC_VIS
#endif
@@ -654,7 +703,7 @@ namespace std {
#ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
-# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ ((__type_visibility__("default")))
+# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ ((__visibility__("default")))
# else
# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
# endif
@@ -739,7 +788,7 @@ template <unsigned> struct __static_assert_check {};
#ifdef _LIBCPP_HAS_NO_DECLTYPE
// GCC 4.6 provides __decltype in all standard modes.
-#if !__is_identifier(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406
+#if __has_keyword(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406
# define decltype(__x) __decltype(__x)
#else
# define decltype(__x) __typeof__(__x)
@@ -802,7 +851,14 @@ template <unsigned> struct __static_assert_check {};
# else
# error Supported values for _LIBCPP_DEBUG are 0 and 1
# endif
+# if !defined(_LIBCPP_BUILDING_LIBRARY)
# define _LIBCPP_EXTERN_TEMPLATE(...)
+# endif
+#endif
+
+#ifdef _LIBCPP_DISABLE_EXTERN_TEMPLATE
+#define _LIBCPP_EXTERN_TEMPLATE(...)
+#define _LIBCPP_EXTERN_TEMPLATE2(...)
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE
@@ -912,7 +968,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
# if defined(__GNUC__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
(__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
# define _LIBCPP_NO_RTTI
-# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
+# elif defined(_LIBCPP_MSVC) && !defined(_CPPRTTI)
# define _LIBCPP_NO_RTTI
# endif
#endif
@@ -923,7 +979,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
// Thread API
#if !defined(_LIBCPP_HAS_NO_THREADS) && \
- !defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+ !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
+ !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
# if defined(__FreeBSD__) || \
defined(__Fuchsia__) || \
defined(__NetBSD__) || \
@@ -945,7 +1002,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
-# error _LIBCPP_HAS_EXTERNAL_THREAD_API may not be defined when \
+# error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be defined when \
_LIBCPP_HAS_NO_THREADS is defined.
#endif
@@ -970,7 +1027,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#if defined(__BIONIC__) || defined(__CloudABI__) || \
- defined(_LIBCPP_HAS_MUSL_LIBC)
+ defined(__Fuchsia__) || defined(_LIBCPP_HAS_MUSL_LIBC)
#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
#endif
@@ -980,7 +1037,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#define _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
#endif
-#if __has_feature(cxx_atomic) || __has_extension(c_atomic)
+#if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
#define _LIBCPP_HAS_C_ATOMIC_IMP
#elif _GNUC_VER > 407
#define _LIBCPP_HAS_GCC_ATOMIC_IMP
@@ -995,10 +1052,16 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
#endif
-#if (defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) && defined(__clang__) \
- && __has_attribute(acquire_capability))
+#if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
+#if defined(__clang__) && __has_attribute(acquire_capability)
+// Work around the attribute handling in clang. When both __declspec and
+// __attribute__ are present, the processing goes awry preventing the definition
+// of the types.
+#if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
#define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
#endif
+#endif
+#endif
#if __has_attribute(require_constant_initialization)
#define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__))
@@ -1007,7 +1070,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#if !__has_builtin(__builtin_addressof) && _GNUC_VER < 700
-#define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
+# define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
#endif
#if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
@@ -1016,6 +1079,38 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#endif
+#if __has_attribute(diagnose_if) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
+# define _LIBCPP_DIAGNOSE_WARNING(...) \
+ __attribute__((diagnose_if(__VA_ARGS__, "warning")))
+# define _LIBCPP_DIAGNOSE_ERROR(...) \
+ __attribute__((diagnose_if(__VA_ARGS__, "error")))
+#else
+# define _LIBCPP_DIAGNOSE_WARNING(...)
+# define _LIBCPP_DIAGNOSE_ERROR(...)
+#endif
+
+#if defined(_LIBCPP_ABI_MICROSOFT) && \
+ (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
+# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
+#else
+# define _LIBCPP_DECLSPEC_EMPTY_BASES
+#endif
+
+#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
+# define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
+# define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+# define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+# define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+#endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
+
+#if !defined(__cpp_deduction_guides) || __cpp_deduction_guides < 201611
+# define _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+#endif
+
+#if !__has_keyword(__is_aggregate) && (_GNUC_VER_NEW < 7001)
+# define _LIBCPP_HAS_NO_IS_AGGREGATE
+#endif
+
#endif // __cplusplus
#endif // _LIBCPP_CONFIG
diff --git a/include/__debug b/include/__debug
index d95e339310d4..d01bacdf7edc 100644
--- a/include/__debug
+++ b/include/__debug
@@ -74,7 +74,7 @@ typedef void(*__libcpp_debug_function_type)(__libcpp_debug_info const&);
/// __libcpp_debug_function - The handler function called when a _LIBCPP_ASSERT
/// fails.
-extern __libcpp_debug_function_type __libcpp_debug_function;
+extern _LIBCPP_EXTERN_VIS __libcpp_debug_function_type __libcpp_debug_function;
/// __libcpp_abort_debug_function - A debug handler that aborts when called.
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
diff --git a/include/__functional_base b/include/__functional_base
index 05c9f066fd0f..4e2b7eb8d289 100644
--- a/include/__functional_base
+++ b/include/__functional_base
@@ -16,6 +16,7 @@
#include <typeinfo>
#include <exception>
#include <new>
+#include <utility>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -23,13 +24,6 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Arg, class _Result>
-struct _LIBCPP_TEMPLATE_VIS unary_function
-{
- typedef _Arg argument_type;
- typedef _Result result_type;
-};
-
template <class _Arg1, class _Arg2, class _Result>
struct _LIBCPP_TEMPLATE_VIS binary_function
{
diff --git a/include/__hash_table b/include/__hash_table
index e082e6c812f5..a20cbb8ed08b 100644
--- a/include/__hash_table
+++ b/include/__hash_table
@@ -18,6 +18,7 @@
#include <algorithm>
#include <cmath>
#include <utility>
+#include <type_traits>
#include <__undef_min_max>
@@ -38,6 +39,15 @@ template <class _Key, class _Tp>
struct __hash_value_type;
#endif
+template <class _Key, class _Cp, class _Hash,
+ bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
+class __unordered_map_hasher;
+
+template <class _Key, class _Cp, class _Pred,
+ bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value
+ >
+class __unordered_map_equal;
+
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
struct __is_hash_value_type_imp : false_type {};
@@ -856,6 +866,37 @@ public:
template <class> friend class __hash_map_node_destructor;
};
+
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Key, class _Hash, class _Equal, class _Alloc>
+struct __diagnose_hash_table_helper {
+ static constexpr bool __trigger_diagnostics()
+ _LIBCPP_DIAGNOSE_WARNING(__check_hash_requirements<_Key, _Hash>::value
+ && !__invokable<_Hash const&, _Key const&>::value,
+ "the specified hash functor does not provide a const call operator")
+ _LIBCPP_DIAGNOSE_WARNING(is_copy_constructible<_Equal>::value
+ && !__invokable<_Equal const&, _Key const&, _Key const&>::value,
+ "the specified comparator type does not provide a const call operator")
+ {
+ static_assert(__check_hash_requirements<_Key, _Hash>::value,
+ "the specified hash does not meet the Hash requirements");
+ static_assert(is_copy_constructible<_Equal>::value,
+ "the specified comparator is required to be copy constructible");
+ return true;
+ }
+};
+
+template <class _Key, class _Value, class _Hash, class _Equal, class _Alloc>
+struct __diagnose_hash_table_helper<
+ __hash_value_type<_Key, _Value>,
+ __unordered_map_hasher<_Key, __hash_value_type<_Key, _Value>, _Hash>,
+ __unordered_map_equal<_Key, __hash_value_type<_Key, _Value>, _Equal>,
+ _Alloc>
+: __diagnose_hash_table_helper<_Key, _Hash, _Equal, _Alloc>
+{
+};
+#endif // _LIBCPP_CXX03_LANG
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
class __hash_table
{
@@ -918,6 +959,10 @@ private:
typedef allocator_traits<__pointer_allocator> __pointer_alloc_traits;
typedef typename __bucket_list_deleter::pointer __node_pointer_pointer;
+#ifndef _LIBCPP_CXX03_LANG
+ static_assert(__diagnose_hash_table_helper<_Tp, _Hash, _Equal, _Alloc>::__trigger_diagnostics(), "");
+#endif
+
// --- Member data begin ---
__bucket_list __bucket_list_;
__compressed_pair<__first_node, __node_allocator> __p1_;
@@ -1357,7 +1402,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
const key_equal& __eql,
const allocator_type& __a)
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
- __p1_(__node_allocator(__a)),
+ __p1_(__second_tag(), __node_allocator(__a)),
__p2_(0, __hf),
__p3_(1.0f, __eql)
{
@@ -1366,7 +1411,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const allocator_type& __a)
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
- __p1_(__node_allocator(__a)),
+ __p1_(__second_tag(), __node_allocator(__a)),
__p2_(0),
__p3_(1.0f)
{
@@ -1378,7 +1423,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u)
__bucket_list_deleter(allocator_traits<__pointer_allocator>::
select_on_container_copy_construction(
__u.__bucket_list_.get_deleter().__alloc()), 0)),
- __p1_(allocator_traits<__node_allocator>::
+ __p1_(__second_tag(), allocator_traits<__node_allocator>::
select_on_container_copy_construction(__u.__node_alloc())),
__p2_(0, __u.hash_function()),
__p3_(__u.__p3_)
@@ -1389,7 +1434,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
const allocator_type& __a)
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
- __p1_(__node_allocator(__a)),
+ __p1_(__second_tag(), __node_allocator(__a)),
__p2_(0, __u.hash_function()),
__p3_(__u.__p3_)
{
@@ -1423,7 +1468,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
const allocator_type& __a)
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
- __p1_(__node_allocator(__a)),
+ __p1_(__second_tag(), __node_allocator(__a)),
__p2_(0, _VSTD::move(__u.hash_function())),
__p3_(_VSTD::move(__u.__p3_))
{
@@ -1449,10 +1494,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
{
+#if defined(_LIBCPP_CXX03_LANG)
static_assert((is_copy_constructible<key_equal>::value),
"Predicate must be copy-constructible.");
static_assert((is_copy_constructible<hasher>::value),
"Hasher must be copy-constructible.");
+#endif
+
__deallocate_node(__p1_.first().__next_);
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__erase_c(this);
diff --git a/include/__libcpp_version b/include/__libcpp_version
index a2113715a3e8..e9c02dad1826 100644
--- a/include/__libcpp_version
+++ b/include/__libcpp_version
@@ -1 +1 @@
-4000 \ No newline at end of file
+5000
diff --git a/include/__locale b/include/__locale
index f4882dee853a..918cd1df5c6b 100644
--- a/include/__locale
+++ b/include/__locale
@@ -37,9 +37,11 @@
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
# include <xlocale.h>
+#elif defined(__Fuchsia__)
+# include <support/fuchsia/xlocale.h>
#elif defined(_LIBCPP_HAS_MUSL_LIBC)
# include <support/musl/xlocale.h>
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
+#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -92,13 +94,16 @@ public:
const locale& operator=(const locale&) _NOEXCEPT;
- template <class _Facet> locale combine(const locale&) const;
+ template <class _Facet>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ locale combine(const locale&) const;
// locale operations:
string name() const;
bool operator==(const locale&) const;
bool operator!=(const locale& __y) const {return !(*this == __y);}
template <class _CharT, class _Traits, class _Allocator>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool operator()(const basic_string<_CharT, _Traits, _Allocator>&,
const basic_string<_CharT, _Traits, _Allocator>&) const;
diff --git a/include/__mutex_base b/include/__mutex_base
index 21638ee3292d..4940f931c97f 100644
--- a/include/__mutex_base
+++ b/include/__mutex_base
@@ -80,21 +80,9 @@ constexpr adopt_lock_t adopt_lock = adopt_lock_t();
#endif
-
-// Forward declare lock_guard as a variadic template even in C++03 to keep
-// the mangling consistent between dialects.
-#if defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
-template <class ..._Mutexes>
-class _LIBCPP_TEMPLATE_VIS lock_guard;
-#endif
-
template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable)
-#if !defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
lock_guard
-#else
-lock_guard<_Mutex>
-#endif
{
public:
typedef _Mutex mutex_type;
@@ -316,20 +304,24 @@ public:
void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
template <class _Predicate>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
void wait(unique_lock<mutex>& __lk, _Predicate __pred);
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
cv_status
wait_until(unique_lock<mutex>& __lk,
const chrono::time_point<_Clock, _Duration>& __t);
template <class _Clock, class _Duration, class _Predicate>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool
wait_until(unique_lock<mutex>& __lk,
const chrono::time_point<_Clock, _Duration>& __t,
_Predicate __pred);
template <class _Rep, class _Period>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
cv_status
wait_for(unique_lock<mutex>& __lk,
const chrono::duration<_Rep, _Period>& __d);
diff --git a/include/__split_buffer b/include/__split_buffer
index 79d1aa1d7c4a..e74cf1f3b772 100644
--- a/include/__split_buffer
+++ b/include/__split_buffer
@@ -361,7 +361,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
template <class _Tp, class _Allocator>
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
- : __end_cap_(__a)
+ : __end_cap_(__second_tag(), __a)
{
if (__a == __c.__alloc())
{
diff --git a/include/__threading_support b/include/__threading_support
index 817a2cfb934f..aa947139a4e9 100644
--- a/include/__threading_support
+++ b/include/__threading_support
@@ -12,6 +12,8 @@
#define _LIBCPP_THREADING_SUPPORT
#include <__config>
+#include <chrono>
+#include <errno.h>
#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#pragma GCC system_header
@@ -25,12 +27,9 @@
# include <pthread.h>
# include <sched.h>
#elif defined(_LIBCPP_HAS_THREAD_API_WIN32)
-#include <assert.h>
#include <Windows.h>
#include <process.h>
#include <fibersapi.h>
-
-#include <chrono>
#endif
#if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
@@ -67,6 +66,8 @@ typedef pthread_once_t __libcpp_exec_once_flag;
typedef pthread_t __libcpp_thread_id;
// Thread
+#define _LIBCPP_NULL_THREAD 0U
+
typedef pthread_t __libcpp_thread_t;
// Thrad Local Storage
@@ -92,6 +93,8 @@ typedef INIT_ONCE __libcpp_exec_once_flag;
typedef DWORD __libcpp_thread_id;
// Thread
+#define _LIBCPP_NULL_THREAD 0U
+
typedef HANDLE __libcpp_thread_t;
// Thread Local Storage
@@ -108,7 +111,7 @@ _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m);
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m);
+bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m);
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m);
@@ -120,7 +123,7 @@ _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_mutex_lock(__libcpp_mutex_t *__m);
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_mutex_trylock(__libcpp_mutex_t *__m);
+bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m);
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m);
@@ -151,11 +154,6 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
void (*init_routine)(void));
// Thread id
-#if defined(__APPLE__) && !defined(__arm__)
-_LIBCPP_THREAD_ABI_VISIBILITY
-mach_port_t __libcpp_thread_get_port();
-#endif
-
_LIBCPP_THREAD_ABI_VISIBILITY
bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2);
@@ -164,6 +162,9 @@ bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2);
// Thread
_LIBCPP_THREAD_ABI_VISIBILITY
+bool __libcpp_thread_isnull(const __libcpp_thread_t *__t);
+
+_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
void *__arg);
@@ -182,6 +183,9 @@ int __libcpp_thread_detach(__libcpp_thread_t *__t);
_LIBCPP_THREAD_ABI_VISIBILITY
void __libcpp_thread_yield();
+_LIBCPP_THREAD_ABI_VISIBILITY
+void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns);
+
// Thread local storage
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_tls_create(__libcpp_tls_key* __key,
@@ -227,9 +231,9 @@ int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
return pthread_mutex_lock(__m);
}
-int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
- return pthread_mutex_trylock(__m);
+ return pthread_mutex_trylock(__m) == 0;
}
int __libcpp_recursive_mutex_unlock(__libcpp_mutex_t *__m)
@@ -247,9 +251,9 @@ int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
return pthread_mutex_lock(__m);
}
-int __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
+bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
- return pthread_mutex_trylock(__m);
+ return pthread_mutex_trylock(__m) == 0;
}
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
@@ -296,12 +300,6 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
}
// Thread id
-#if defined(__APPLE__) && !defined(__arm__)
-mach_port_t __libcpp_thread_get_port() {
- return pthread_mach_thread_np(pthread_self());
-}
-#endif
-
// Returns non-zero if the thread ids are equal, otherwise 0
bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
@@ -315,6 +313,10 @@ bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
}
// Thread
+bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
+ return *__t == 0;
+}
+
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
void *__arg)
{
@@ -346,6 +348,28 @@ void __libcpp_thread_yield()
sched_yield();
}
+void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
+{
+ using namespace chrono;
+ seconds __s = duration_cast<seconds>(__ns);
+ timespec __ts;
+ typedef decltype(__ts.tv_sec) ts_sec;
+ _LIBCPP_CONSTEXPR ts_sec __ts_sec_max = numeric_limits<ts_sec>::max();
+
+ if (__s.count() < __ts_sec_max)
+ {
+ __ts.tv_sec = static_cast<ts_sec>(__s.count());
+ __ts.tv_nsec = static_cast<decltype(__ts.tv_nsec)>((__ns - __s).count());
+ }
+ else
+ {
+ __ts.tv_sec = __ts_sec_max;
+ __ts.tv_nsec = 999999999; // (10^9 - 1)
+ }
+
+ while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
+}
+
// Thread local storage
int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
{
@@ -377,10 +401,9 @@ int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
return 0;
}
-int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
- TryEnterCriticalSection(__m);
- return 0;
+ return TryEnterCriticalSection(__m) != 0;
}
int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
@@ -401,10 +424,9 @@ int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
return 0;
}
-int __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
+bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
- TryAcquireSRWLockExclusive(__m);
- return 0;
+ return TryAcquireSRWLockExclusive(__m) != 0;
}
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
@@ -503,25 +525,32 @@ struct __libcpp_beginthreadex_thunk_data
void *__arg;
};
-static inline _LIBCPP_ALWAYS_INLINE unsigned int WINAPI
-__libcpp_beginthreadex_thunk(void *__data)
+static inline _LIBCPP_ALWAYS_INLINE unsigned WINAPI
+__libcpp_beginthreadex_thunk(void *__raw_data)
{
- __libcpp_beginthreadex_thunk_data data =
- *reinterpret_cast<__libcpp_beginthreadex_thunk_data *>(__data);
- delete reinterpret_cast<__libcpp_beginthreadex_thunk_data *>(__data);
- return reinterpret_cast<unsigned int>(data.__func(data.__arg));
+ auto *__data =
+ static_cast<__libcpp_beginthreadex_thunk_data *>(__raw_data);
+ auto *__func = __data->__func;
+ void *__arg = __data->__arg;
+ delete __data;
+ return static_cast<unsigned>(reinterpret_cast<uintptr_t>(__func(__arg)));
+}
+
+bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
+ return *__t == 0;
}
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
void *__arg)
{
- auto *data = new __libcpp_beginthreadex_thunk_data;
- data->__func = __func;
- data->__arg = __arg;
+ auto *__data = new __libcpp_beginthreadex_thunk_data;
+ __data->__func = __func;
+ __data->__arg = __arg;
- *__t = reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0,
+ *__t = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, 0,
__libcpp_beginthreadex_thunk,
- data, 0, NULL));
+ __data, 0, nullptr));
+
if (*__t)
return 0;
return GetLastError();
@@ -558,6 +587,16 @@ void __libcpp_thread_yield()
SwitchToThread();
}
+void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
+{
+ using namespace chrono;
+ // round-up to the nearest milisecond
+ milliseconds __ms =
+ duration_cast<milliseconds>(__ns + chrono::nanoseconds(999999));
+ // FIXME(compnerd) this should be an alertable sleep (WFSO or SleepEx)
+ Sleep(__ms.count());
+}
+
// Thread Local Storage
int __libcpp_tls_create(__libcpp_tls_key* __key,
void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*))
diff --git a/include/__tree b/include/__tree
index 2fbb479801c2..2161c6cb79d1 100644
--- a/include/__tree
+++ b/include/__tree
@@ -43,6 +43,10 @@ template <class _Key, class _Value>
struct __value_type;
#endif
+template <class _Key, class _CP, class _Compare,
+ bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
+class __map_value_compare;
+
template <class _Allocator> class __map_node_destructor;
template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_iterator;
template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
@@ -957,6 +961,25 @@ private:
};
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Tp, class _Compare, class _Allocator>
+struct __diagnose_tree_helper {
+ static constexpr bool __trigger_diagnostics()
+ _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
+ "the specified comparator type does not provide a const call operator")
+ { return true; }
+};
+
+template <class _Key, class _Value, class _KeyComp, class _Alloc>
+struct __diagnose_tree_helper<
+ __value_type<_Key, _Value>,
+ __map_value_compare<_Key, __value_type<_Key, _Value>, _KeyComp>,
+ _Alloc
+> : __diagnose_tree_helper<_Key, _KeyComp, _Alloc>
+{
+};
+#endif // !_LIBCPP_CXX03_LANG
+
template <class _Tp, class _Compare, class _Allocator>
class __tree
{
@@ -1479,7 +1502,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp)
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_allocator(__a)),
+ __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0)
{
__begin_node() = __end_node();
@@ -1489,7 +1512,7 @@ template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp,
const allocator_type& __a)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_allocator(__a)),
+ __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0, __comp)
{
__begin_node() = __end_node();
@@ -1646,7 +1669,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_traits::select_on_container_copy_construction(__t.__node_alloc())),
+ __pair1_(__second_tag(), __node_traits::select_on_container_copy_construction(__t.__node_alloc())),
__pair3_(0, __t.value_comp())
{
__begin_node() = __end_node();
@@ -1676,7 +1699,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
- : __pair1_(__node_allocator(__a)),
+ : __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0, _VSTD::move(__t.value_comp()))
{
if (__a == __t.__alloc())
@@ -1789,7 +1812,11 @@ __tree<_Tp, _Compare, _Allocator>::~__tree()
{
static_assert((is_copy_constructible<value_compare>::value),
"Comparator must be copy-constructible.");
- destroy(__root());
+#ifndef _LIBCPP_CXX03_LANG
+ static_assert((__diagnose_tree_helper<_Tp, _Compare, _Allocator>::
+ __trigger_diagnostics()), "");
+#endif
+ destroy(__root());
}
template <class _Tp, class _Compare, class _Allocator>
diff --git a/include/__undef_min_max b/include/__undef_min_max
index d3c31388cead..f4ca091def45 100644
--- a/include/__undef_min_max
+++ b/include/__undef_min_max
@@ -10,7 +10,7 @@
#ifdef min
#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
-#if defined(_MSC_VER) && ! defined(__clang__)
+#if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX "
"before any Windows header. #undefing min")
#else
@@ -22,7 +22,7 @@ _LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX "
#ifdef max
#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
-#if defined(_MSC_VER) && ! defined(__clang__)
+#if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("macro max is incompatible with C++. Try #define NOMINMAX "
"before any Windows header. #undefing max")
#else
diff --git a/include/algorithm b/include/algorithm
index 5eec80ca013d..571edd265508 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -281,12 +281,12 @@ template <class ForwardIterator, class OutputIterator>
template <class RandomAccessIterator>
void
- random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14
+ random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++17
template <class RandomAccessIterator, class RandomNumberGenerator>
void
random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
- RandomNumberGenerator& rand); // deprecated in C++14
+ RandomNumberGenerator& rand); // deprecated in C++14, removed in C++17
template<class PopulationIterator, class SampleIterator,
class Distance, class UniformRandomBitGenerator>
@@ -3026,6 +3026,8 @@ uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p
return static_cast<result_type>(__u + __p.a());
}
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) \
+ || defined(_LIBCPP_BUILDING_LIBRARY)
class _LIBCPP_TYPE_VIS __rs_default;
_LIBCPP_FUNC_VIS __rs_default __rs_get();
@@ -3095,6 +3097,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
}
}
}
+#endif
template <class _PopulationIterator, class _SampleIterator, class _Distance,
class _UniformRandomNumberGenerator>
diff --git a/include/any b/include/any
index 823e1304b5cc..d7161b0d6f4c 100644
--- a/include/any
+++ b/include/any
@@ -45,6 +45,10 @@ namespace std {
any& operator=(ValueType&& rhs);
// 6.3.3 any modifiers
+ template <class ValueType, class... Args>
+ decay_t<ValueType>& emplace(Args&&... args);
+ template <class ValueType, class U, class... Args>
+ decay_t<ValueType>& emplace(initializer_list<U>, Args&&...);
void reset() noexcept;
void swap(any& rhs) noexcept;
@@ -73,8 +77,6 @@ namespace std {
template<class ValueType>
ValueType* any_cast(any* operand) noexcept;
-} // namespace fundamentals_v1
-} // namespace experimental
} // namespace std
*/
@@ -258,7 +260,7 @@ public:
is_copy_constructible<_Tp>::value>
>
_LIBCPP_INLINE_VISIBILITY
- void emplace(_Args&&... args);
+ _Tp& emplace(_Args&&... args);
template <class _ValueType, class _Up, class ..._Args,
class _Tp = decay_t<_ValueType>,
@@ -267,7 +269,7 @@ public:
is_copy_constructible<_Tp>::value>
>
_LIBCPP_INLINE_VISIBILITY
- void emplace(initializer_list<_Up>, _Args&&...);
+ _Tp& emplace(initializer_list<_Up>, _Args&&...);
// 6.3.3 any modifiers
_LIBCPP_INLINE_VISIBILITY
@@ -364,9 +366,10 @@ namespace __any_imp
template <class ..._Args>
_LIBCPP_INLINE_VISIBILITY
- static void __create(any & __dest, _Args&&... __args) {
- ::new (static_cast<void*>(&__dest.__s.__buf)) _Tp(_VSTD::forward<_Args>(__args)...);
+ static _Tp& __create(any & __dest, _Args&&... __args) {
+ _Tp* __ret = ::new (static_cast<void*>(&__dest.__s.__buf)) _Tp(_VSTD::forward<_Args>(__args)...);
__dest.__h = &_SmallHandler::__handle;
+ return *__ret;
}
private:
@@ -439,14 +442,15 @@ namespace __any_imp
template <class ..._Args>
_LIBCPP_INLINE_VISIBILITY
- static void __create(any & __dest, _Args&&... __args) {
+ static _Tp& __create(any & __dest, _Args&&... __args) {
typedef allocator<_Tp> _Alloc;
typedef __allocator_destructor<_Alloc> _Dp;
_Alloc __a;
unique_ptr<_Tp, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _Tp(_VSTD::forward<_Args>(__args)...);
+ _Tp* __ret = ::new ((void*)__hold.get()) _Tp(_VSTD::forward<_Args>(__args)...);
__dest.__s.__ptr = __hold.release();
__dest.__h = &_LargeHandler::__handle;
+ return *__ret;
}
private:
@@ -519,16 +523,16 @@ any & any::operator=(_ValueType && __v)
template <class _ValueType, class ..._Args, class _Tp, class>
inline _LIBCPP_INLINE_VISIBILITY
-void any::emplace(_Args&&... __args) {
+_Tp& any::emplace(_Args&&... __args) {
reset();
- __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
+ return __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
}
template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
inline _LIBCPP_INLINE_VISIBILITY
-void any::emplace(initializer_list<_Up> __il, _Args&&... __args) {
+_Tp& any::emplace(initializer_list<_Up> __il, _Args&&... __args) {
reset();
- __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
+ return __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
}
inline _LIBCPP_INLINE_VISIBILITY
diff --git a/include/array b/include/array
index 165ffad6b8b1..31f5501b9bc4 100644
--- a/include/array
+++ b/include/array
@@ -316,7 +316,7 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT
return __a.__elems_[_Ip];
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
@@ -336,7 +336,7 @@ get(const array<_Tp, _Size>&& __a) _NOEXCEPT
return _VSTD::move(__a.__elems_[_Ip]);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/atomic b/include/atomic
index 83889fb473e8..a17bdce1cc6f 100644
--- a/include/atomic
+++ b/include/atomic
@@ -560,6 +560,22 @@ void atomic_signal_fence(memory_order m) noexcept;
# define __cpp_lib_atomic_is_always_lock_free 201603L
#endif
+#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
+ _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
+ __m == memory_order_acquire || \
+ __m == memory_order_acq_rel, \
+ "memory order argument to atomic operation is invalid")
+
+#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
+ _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_release || \
+ __m == memory_order_acq_rel, \
+ "memory order argument to atomic operation is invalid")
+
+#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
+ _LIBCPP_DIAGNOSE_WARNING(__f == memory_order_release || \
+ __f == memory_order_acq_rel, \
+ "memory order argument to atomic operation is invalid")
+
_LIBCPP_BEGIN_NAMESPACE_STD
typedef enum memory_order
@@ -881,15 +897,19 @@ struct __atomic_base // false
{return static_cast<__atomic_base const volatile*>(this)->is_lock_free();}
_LIBCPP_INLINE_VISIBILITY
void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
+ _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{__c11_atomic_store(&__a_, __d, __m);}
_LIBCPP_INLINE_VISIBILITY
void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
+ _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{__c11_atomic_store(&__a_, __d, __m);}
_LIBCPP_INLINE_VISIBILITY
_Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
+ _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{return __c11_atomic_load(&__a_, __m);}
_LIBCPP_INLINE_VISIBILITY
_Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
+ _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{return __c11_atomic_load(&__a_, __m);}
_LIBCPP_INLINE_VISIBILITY
operator _Tp() const volatile _NOEXCEPT {return load();}
@@ -904,18 +924,22 @@ struct __atomic_base // false
_LIBCPP_INLINE_VISIBILITY
bool compare_exchange_weak(_Tp& __e, _Tp __d,
memory_order __s, memory_order __f) volatile _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);}
_LIBCPP_INLINE_VISIBILITY
bool compare_exchange_weak(_Tp& __e, _Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);}
_LIBCPP_INLINE_VISIBILITY
bool compare_exchange_strong(_Tp& __e, _Tp __d,
memory_order __s, memory_order __f) volatile _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);}
_LIBCPP_INLINE_VISIBILITY
bool compare_exchange_strong(_Tp& __e, _Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);}
_LIBCPP_INLINE_VISIBILITY
bool compare_exchange_weak(_Tp& __e, _Tp __d,
@@ -1181,6 +1205,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
+ _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{
__o->store(__d, __m);
}
@@ -1189,6 +1214,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
+ _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{
__o->store(__d, __m);
}
@@ -1217,6 +1243,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
+ _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
return __o->load(__m);
}
@@ -1225,6 +1252,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
+ _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
return __o->load(__m);
}
@@ -1309,6 +1337,7 @@ bool
atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e,
_Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
return __o->compare_exchange_weak(*__e, __d, __s, __f);
}
@@ -1318,6 +1347,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
return __o->compare_exchange_weak(*__e, __d, __s, __f);
}
@@ -1330,6 +1360,7 @@ bool
atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o,
_Tp* __e, _Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
return __o->compare_exchange_strong(*__e, __d, __s, __f);
}
@@ -1340,6 +1371,7 @@ bool
atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e,
_Tp __d,
memory_order __s, memory_order __f) _NOEXCEPT
+ _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
return __o->compare_exchange_strong(*__e, __d, __s, __f);
}
diff --git a/include/chrono b/include/chrono
index 4e82ef2b5f46..657808736d09 100644
--- a/include/chrono
+++ b/include/chrono
@@ -48,7 +48,7 @@ class duration
static_assert(Period::num > 0, "duration period must be positive");
public:
typedef Rep rep;
- typedef Period period;
+ typedef typename _Period::type period;
constexpr duration() = default;
template <class Rep2>
@@ -75,8 +75,8 @@ public:
// arithmetic
- constexpr duration operator+() const;
- constexpr duration operator-() const;
+ constexpr common_type<duration>::type operator+() const;
+ constexpr common_type<duration>::type operator-() const;
constexpr duration& operator++();
constexpr duration operator++(int);
constexpr duration& operator--();
@@ -523,7 +523,7 @@ class _LIBCPP_TEMPLATE_VIS duration
public:
typedef _Rep rep;
- typedef _Period period;
+ typedef typename _Period::type period;
private:
rep __rep_;
public:
@@ -565,8 +565,8 @@ public:
// arithmetic
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator+() const {return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator-() const {return duration(-__rep_);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++() {++__rep_; return *this;}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator++(int) {return duration(__rep_++);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--() {--__rep_; return *this;}
diff --git a/include/cmath b/include/cmath
index 724935623db7..b41f247af59c 100644
--- a/include/cmath
+++ b/include/cmath
@@ -398,7 +398,6 @@ using ::cbrtf;
using ::copysign;
using ::copysignf;
-#ifndef _LIBCPP_MSVCRT
using ::erf;
using ::erff;
using ::erfc;
@@ -435,12 +434,10 @@ using ::lrint;
using ::lrintf;
using ::lround;
using ::lroundf;
-#endif // _LIBCPP_MSVCRT
using ::nan;
using ::nanf;
-#ifndef _LIBCPP_MSVCRT
using ::nearbyint;
using ::nearbyintf;
using ::nextafter;
@@ -463,7 +460,6 @@ using ::tgamma;
using ::tgammaf;
using ::trunc;
using ::truncf;
-#endif // !_LIBCPP_MSVCRT
using ::acosl;
using ::asinl;
@@ -495,7 +491,6 @@ using ::cbrtl;
using ::copysignl;
-#ifndef _LIBCPP_MSVCRT
using ::erfl;
using ::erfcl;
using ::exp2l;
@@ -526,7 +521,6 @@ using ::scalblnl;
using ::scalbnl;
using ::tgammal;
using ::truncl;
-#endif // !_LIBCPP_MSVCRT
#if _LIBCPP_STD_VER > 14
inline _LIBCPP_INLINE_VISIBILITY float hypot( float x, float y, float z ) { return sqrt(x*x + y*y + z*z); }
diff --git a/include/condition_variable b/include/condition_variable
index 10e007701672..c45a326d8985 100644
--- a/include/condition_variable
+++ b/include/condition_variable
@@ -133,12 +133,14 @@ public:
void notify_all() _NOEXCEPT;
template <class _Lock>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
void wait(_Lock& __lock);
template <class _Lock, class _Predicate>
_LIBCPP_INLINE_VISIBILITY
void wait(_Lock& __lock, _Predicate __pred);
template <class _Lock, class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
cv_status
wait_until(_Lock& __lock,
const chrono::time_point<_Clock, _Duration>& __t);
diff --git a/include/cstddef b/include/cstddef
index edd106c001bc..62584494d97c 100644
--- a/include/cstddef
+++ b/include/cstddef
@@ -28,6 +28,7 @@ Types:
size_t
max_align_t
nullptr_t
+ byte // C++17
} // std
@@ -48,7 +49,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
using ::ptrdiff_t;
using ::size_t;
-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
+ defined(__DEFINED_max_align_t)
// Re-use the compiler's <stddef.h> max_align_t where possible.
using ::max_align_t;
#else
@@ -57,4 +59,32 @@ typedef long double max_align_t;
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+namespace std // purposefully not versioned
+{
+enum class byte : unsigned char {};
+
+constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
+{ return __lhs = byte(static_cast<unsigned char>(__lhs) | static_cast<unsigned char>(__rhs)); }
+constexpr byte operator| (byte __lhs, byte __rhs) noexcept
+{ return byte(static_cast<unsigned char>(__lhs) | static_cast<unsigned char>(__rhs)); }
+
+constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
+{ return __lhs = byte(static_cast<unsigned char>(__lhs) & static_cast<unsigned char>(__rhs)); }
+constexpr byte operator& (byte __lhs, byte __rhs) noexcept
+{ return byte(static_cast<unsigned char>(__lhs) & static_cast<unsigned char>(__rhs)); }
+
+constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
+{ return __lhs = byte(static_cast<unsigned char>(__lhs) ^ static_cast<unsigned char>(__rhs)); }
+constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
+{ return byte(static_cast<unsigned char>(__lhs) ^ static_cast<unsigned char>(__rhs)); }
+
+constexpr byte operator~ (byte __b) noexcept
+{ return byte(~static_cast<unsigned char>(__b)); }
+
+}
+
+#include <type_traits> // rest of byte
+#endif
+
#endif // _LIBCPP_CSTDDEF
diff --git a/include/cstdio b/include/cstdio
index 35941ce35156..00b989fad7c8 100644
--- a/include/cstdio
+++ b/include/cstdio
@@ -98,9 +98,6 @@ void perror(const char* s);
#include <__config>
#include <stdio.h>
-#if defined(_LIBCPP_MSVCRT)
-#include <crtversion.h>
-#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -156,8 +153,7 @@ using ::tmpnam;
#ifndef _LIBCPP_HAS_NO_STDIN
using ::getchar;
-#if _LIBCPP_STD_VER <= 11 && \
- (!defined(_VC_CRT_MAJOR_VERSION) || _VC_CRT_MAJOR_VERSION < 14)
+#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_MSVCRT)
using ::gets;
#endif
using ::scanf;
diff --git a/include/cstdlib b/include/cstdlib
index 2ca25ed56ca6..78c428403c37 100644
--- a/include/cstdlib
+++ b/include/cstdlib
@@ -130,8 +130,10 @@ using ::abort;
using ::atexit;
using ::exit;
using ::_Exit;
+#ifndef _LIBCPP_WINDOWS_STORE_APP
using ::getenv;
using ::system;
+#endif
using ::bsearch;
using ::qsort;
using ::abs;
diff --git a/include/deque b/include/deque
index 92801540f2e7..bd4316412f60 100644
--- a/include/deque
+++ b/include/deque
@@ -968,13 +968,12 @@ protected:
public:
~__deque_base();
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
+#ifndef _LIBCPP_CXX03_LANG
__deque_base(__deque_base&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
__deque_base(__deque_base&& __c, const allocator_type& __a);
+#endif // _LIBCPP_CXX03_LANG
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void swap(__deque_base& __c)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT;
@@ -1108,7 +1107,7 @@ __deque_base<_Tp, _Allocator>::~__deque_base()
__alloc_traits::deallocate(__alloc(), *__i, __block_size);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
@@ -1140,7 +1139,7 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
void
@@ -1230,18 +1229,16 @@ public:
typename enable_if<__is_input_iterator<_InputIter>::value>::type* = 0);
deque(const deque& __c);
deque(const deque& __c, const allocator_type& __a);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ deque& operator=(const deque& __c);
+
+#ifndef _LIBCPP_CXX03_LANG
deque(initializer_list<value_type> __il);
deque(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- deque& operator=(const deque& __c);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value);
_LIBCPP_INLINE_VISIBILITY
@@ -1250,7 +1247,10 @@ public:
deque& operator=(deque&& __c)
_NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ _LIBCPP_INLINE_VISIBILITY
+ void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
template <class _InputIter>
void assign(_InputIter __f, _InputIter __l,
@@ -1260,10 +1260,6 @@ public:
void assign(_RAIter __f, _RAIter __l,
typename enable_if<__is_random_access_iterator<_RAIter>::value>::type* = 0);
void assign(size_type __n, const value_type& __v);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT;
@@ -1340,8 +1336,7 @@ public:
// 23.2.2.3 modifiers:
void push_front(const value_type& __v);
void push_back(const value_type& __v);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14
template <class... _Args> reference emplace_front(_Args&&... __args);
template <class... _Args> reference emplace_back (_Args&&... __args);
@@ -1350,11 +1345,16 @@ public:
template <class... _Args> void emplace_back (_Args&&... __args);
#endif
template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args);
-#endif // _LIBCPP_HAS_NO_VARIADICS
+
void push_front(value_type&& __v);
void push_back(value_type&& __v);
iterator insert(const_iterator __p, value_type&& __v);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ _LIBCPP_INLINE_VISIBILITY
+ iterator insert(const_iterator __p, initializer_list<value_type> __il)
+ {return insert(__p, __il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
+
iterator insert(const_iterator __p, const value_type& __v);
iterator insert(const_iterator __p, size_type __n, const value_type& __v);
template <class _InputIter>
@@ -1368,11 +1368,7 @@ public:
template <class _BiIter>
iterator insert(const_iterator __p, _BiIter __f, _BiIter __l,
typename enable_if<__is_bidirectional_iterator<_BiIter>::value>::type* = 0);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- iterator insert(const_iterator __p, initializer_list<value_type> __il)
- {return insert(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
void pop_front();
void pop_back();
iterator erase(const_iterator __p);
@@ -1527,7 +1523,19 @@ deque<_Tp, _Allocator>::deque(const deque& __c, const allocator_type& __a)
__append(__c.begin(), __c.end());
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+template <class _Tp, class _Allocator>
+deque<_Tp, _Allocator>&
+deque<_Tp, _Allocator>::operator=(const deque& __c)
+{
+ if (this != &__c)
+ {
+ __copy_assign_alloc(__c);
+ assign(__c.begin(), __c.end());
+ }
+ return *this;
+}
+
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il)
@@ -1542,22 +1550,6 @@ deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il, const allocator
__append(__il.begin(), __il.end());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-template <class _Tp, class _Allocator>
-deque<_Tp, _Allocator>&
-deque<_Tp, _Allocator>::operator=(const deque& __c)
-{
- if (this != &__c)
- {
- __copy_assign_alloc(__c);
- assign(__c.begin(), __c.end());
- }
- return *this;
-}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Allocator>
inline
deque<_Tp, _Allocator>::deque(deque&& __c)
@@ -1613,7 +1605,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
__base::__move_assign(__c);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
template <class _InputIter>
@@ -1809,8 +1801,20 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v)
++__base::size();
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+template <class _Tp, class _Allocator>
+void
+deque<_Tp, _Allocator>::push_front(const value_type& __v)
+{
+ allocator_type& __a = __base::__alloc();
+ if (__front_spare() == 0)
+ __add_front_capacity();
+ // __front_spare() >= 1
+ __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
+ --__base::__start_;
+ ++__base::size();
+}
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_back(value_type&& __v)
@@ -1823,8 +1827,6 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v)
++__base::size();
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Allocator>
template <class... _Args>
#if _LIBCPP_STD_VER > 14
@@ -1846,24 +1848,6 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-template <class _Tp, class _Allocator>
-void
-deque<_Tp, _Allocator>::push_front(const value_type& __v)
-{
- allocator_type& __a = __base::__alloc();
- if (__front_spare() == 0)
- __add_front_capacity();
- // __front_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
- --__base::__start_;
- ++__base::size();
-}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_front(value_type&& __v)
@@ -1877,7 +1861,6 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
++__base::size();
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class _Tp, class _Allocator>
template <class... _Args>
@@ -1900,12 +1883,9 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
-deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
+deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
{
size_type __pos = __p - __base::begin();
size_type __to_end = __base::size() - __pos;
@@ -1917,23 +1897,20 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
+ __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
--__base::__start_;
++__base::size();
}
else
{
- const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
iterator __b = __base::begin();
iterator __bm1 = _VSTD::prev(__b);
- if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
- __vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
--__base::__start_;
++__base::size();
if (__pos > 1)
- __b = __move_and_check(_VSTD::next(__b), __b + __pos, __b, __vt);
- *__b = *__vt;
+ __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
+ *__b = _VSTD::move(__v);
}
}
else
@@ -1944,31 +1921,27 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
+ __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
++__base::size();
}
else
{
- const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
iterator __e = __base::end();
iterator __em1 = _VSTD::prev(__e);
- if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
- __vt = pointer_traits<const_pointer>::pointer_to(*__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
++__base::size();
if (__de > 1)
- __e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
- *--__e = *__vt;
+ __e = _VSTD::move_backward(__e - __de, __em1, __e);
+ *--__e = _VSTD::move(__v);
}
}
return __base::begin() + __pos;
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Allocator>
+template <class... _Args>
typename deque<_Tp, _Allocator>::iterator
-deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
+deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
{
size_type __pos = __p - __base::begin();
size_type __to_end = __base::size() - __pos;
@@ -1980,12 +1953,13 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
+ __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
--__base::__start_;
++__base::size();
}
else
{
+ __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
iterator __b = __base::begin();
iterator __bm1 = _VSTD::prev(__b);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
@@ -1993,7 +1967,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
++__base::size();
if (__pos > 1)
__b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
- *__b = _VSTD::move(__v);
+ *__b = _VSTD::move(__tmp.get());
}
}
else
@@ -2004,29 +1978,30 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
+ __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...);
++__base::size();
}
else
{
+ __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
iterator __e = __base::end();
iterator __em1 = _VSTD::prev(__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
++__base::size();
if (__de > 1)
__e = _VSTD::move_backward(__e - __de, __em1, __e);
- *--__e = _VSTD::move(__v);
+ *--__e = _VSTD::move(__tmp.get());
}
}
return __base::begin() + __pos;
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_CXX03_LANG
+
template <class _Tp, class _Allocator>
-template <class... _Args>
typename deque<_Tp, _Allocator>::iterator
-deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
+deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
{
size_type __pos = __p - __base::begin();
size_type __to_end = __base::size() - __pos;
@@ -2038,21 +2013,23 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
--__base::__start_;
++__base::size();
}
else
{
- __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+ const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
iterator __b = __base::begin();
iterator __bm1 = _VSTD::prev(__b);
+ if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
+ __vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
--__base::__start_;
++__base::size();
if (__pos > 1)
- __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
- *__b = _VSTD::move(__tmp.get());
+ __b = __move_and_check(_VSTD::next(__b), __b + __pos, __b, __vt);
+ *__b = *__vt;
}
}
else
@@ -2063,27 +2040,26 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
size_type __de = __base::size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
++__base::size();
}
else
{
- __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+ const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
iterator __e = __base::end();
iterator __em1 = _VSTD::prev(__e);
+ if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
+ __vt = pointer_traits<const_pointer>::pointer_to(*__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
++__base::size();
if (__de > 1)
- __e = _VSTD::move_backward(__e - __de, __em1, __e);
- *--__e = _VSTD::move(__tmp.get());
+ __e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
+ *--__e = *__vt;
}
}
return __base::begin() + __pos;
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_type& __v)
diff --git a/include/exception b/include/exception
index 98e1f37f919e..181d604d6c1e 100644
--- a/include/exception
+++ b/include/exception
@@ -82,6 +82,10 @@ template <class E> void rethrow_if_nested(const E& e);
#include <cstdlib>
#include <type_traits>
+#if defined(_LIBCPP_ABI_MICROSOFT)
+#include <vcruntime_exception.h>
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -89,6 +93,7 @@ template <class E> void rethrow_if_nested(const E& e);
namespace std // purposefully not using versioning namespace
{
+#if !defined(_LIBCPP_ABI_MICROSOFT)
class _LIBCPP_EXCEPTION_ABI exception
{
public:
@@ -105,11 +110,16 @@ public:
virtual ~bad_exception() _NOEXCEPT;
virtual const char* what() const _NOEXCEPT;
};
+#endif // !_LIBCPP_ABI_MICROSOFT
+#if _LIBCPP_STD_VER <= 14 \
+ || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
+ || defined(_LIBCPP_BUILDING_LIBRARY)
typedef void (*unexpected_handler)();
_LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
_LIBCPP_FUNC_VIS unexpected_handler get_unexpected() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void unexpected();
+#endif
typedef void (*terminate_handler)();
_LIBCPP_FUNC_VIS terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
@@ -192,58 +202,71 @@ struct __nested
_LIBCPP_INLINE_VISIBILITY explicit __nested(const _Tp& __t) : _Tp(__t) {}
};
-template <class _Tp>
-_LIBCPP_NORETURN
-void
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-throw_with_nested(_Tp&& __t, typename enable_if<
- is_class<typename remove_reference<_Tp>::type>::value &&
- !is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
- && !__libcpp_is_final<typename remove_reference<_Tp>::type>::value
- >::type* = 0)
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-throw_with_nested (_Tp& __t, typename enable_if<
- is_class<_Tp>::value && !is_base_of<nested_exception, _Tp>::value
- >::type* = 0)
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-{
#ifndef _LIBCPP_NO_EXCEPTIONS
- throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t));
-#else
- ((void)__t);
- // FIXME: Make this abort.
+template <class _Tp, class _Up, bool>
+struct __throw_with_nested;
+
+template <class _Tp, class _Up>
+struct __throw_with_nested<_Tp, _Up, true> {
+ _LIBCPP_NORETURN static inline _LIBCPP_ALWAYS_INLINE void
+ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ __do_throw(_Tp&& __t)
+ #else
+ __do_throw (_Tp& __t)
+ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ throw __nested<_Up>(_VSTD::forward<_Tp>(__t));
+ }
+};
+
+template <class _Tp, class _Up>
+struct __throw_with_nested<_Tp, _Up, false> {
+ _LIBCPP_NORETURN static inline _LIBCPP_ALWAYS_INLINE void
+ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ __do_throw(_Tp&& __t)
+ #else
+ __do_throw (_Tp& __t)
+ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ throw _VSTD::forward<_Tp>(__t);
+ }
+};
#endif
-}
template <class _Tp>
_LIBCPP_NORETURN
void
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-throw_with_nested(_Tp&& __t, typename enable_if<
- !is_class<typename remove_reference<_Tp>::type>::value ||
- is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
- || __libcpp_is_final<typename remove_reference<_Tp>::type>::value
- >::type* = 0)
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-throw_with_nested (_Tp& __t, typename enable_if<
- !is_class<_Tp>::value || is_base_of<nested_exception, _Tp>::value
- >::type* = 0)
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+throw_with_nested(_Tp&& __t)
+#else
+throw_with_nested (_Tp& __t)
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- throw _VSTD::forward<_Tp>(__t);
+ typedef typename decay<_Tp>::type _Up;
+ static_assert( is_copy_constructible<_Up>::value, "type thrown must be CopyConstructible");
+ __throw_with_nested<_Tp, _Up,
+ is_class<_Up>::value &&
+ !is_base_of<nested_exception, _Up>::value &&
+ !__libcpp_is_final<_Up>::value>::
+ __do_throw(_VSTD::forward<_Tp>(__t));
#else
((void)__t);
// FIXME: Make this abort
#endif
}
+template <class _From, class _To>
+struct __can_dynamic_cast : public _LIBCPP_BOOL_CONSTANT(
+ is_polymorphic<_From>::value &&
+ (!is_base_of<_To, _From>::value ||
+ is_convertible<const _From*, const _To*>::value)) {};
+
template <class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
void
-rethrow_if_nested(const _Ep& __e, typename enable_if<
- is_polymorphic<_Ep>::value
- >::type* = 0)
+rethrow_if_nested(const _Ep& __e,
+ typename enable_if< __can_dynamic_cast<_Ep, nested_exception>::value>::type* = 0)
{
const nested_exception* __nep = dynamic_cast<const nested_exception*>(_VSTD::addressof(__e));
if (__nep)
@@ -253,9 +276,8 @@ rethrow_if_nested(const _Ep& __e, typename enable_if<
template <class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
void
-rethrow_if_nested(const _Ep&, typename enable_if<
- !is_polymorphic<_Ep>::value
- >::type* = 0)
+rethrow_if_nested(const _Ep&,
+ typename enable_if<!__can_dynamic_cast<_Ep, nested_exception>::value>::type* = 0)
{
}
diff --git a/include/experimental/filesystem b/include/experimental/filesystem
index 739918bb2cbe..42157ba309bc 100644
--- a/include/experimental/filesystem
+++ b/include/experimental/filesystem
@@ -408,8 +408,10 @@ class _LIBCPP_TYPE_VIS file_status
public:
// constructors
_LIBCPP_INLINE_VISIBILITY
- explicit file_status(file_type __ft = file_type::none,
- perms __prms = perms::unknown) _NOEXCEPT
+ file_status() _NOEXCEPT : file_status(file_type::none) {}
+ _LIBCPP_INLINE_VISIBILITY
+ explicit file_status(file_type __ft,
+ perms __prms = perms::unknown) _NOEXCEPT
: __ft_(__ft), __prms_(__prms)
{}
@@ -720,6 +722,7 @@ public:
return *this;
}
+ template <class = void>
_LIBCPP_INLINE_VISIBILITY
path& operator=(string_type&& __s) _NOEXCEPT {
__pn_ = _VSTD::move(__s);
@@ -941,15 +944,15 @@ public:
std::u32string generic_u32string() const { return string<char32_t>(); }
private:
- _LIBCPP_FUNC_VIS int __compare(__string_view) const;
- _LIBCPP_FUNC_VIS __string_view __root_name() const;
- _LIBCPP_FUNC_VIS __string_view __root_directory() const;
- _LIBCPP_FUNC_VIS __string_view __root_path_raw() const;
- _LIBCPP_FUNC_VIS __string_view __relative_path() const;
- _LIBCPP_FUNC_VIS __string_view __parent_path() const;
- _LIBCPP_FUNC_VIS __string_view __filename() const;
- _LIBCPP_FUNC_VIS __string_view __stem() const;
- _LIBCPP_FUNC_VIS __string_view __extension() const;
+ int __compare(__string_view) const;
+ __string_view __root_name() const;
+ __string_view __root_directory() const;
+ __string_view __root_path_raw() const;
+ __string_view __relative_path() const;
+ __string_view __parent_path() const;
+ __string_view __filename() const;
+ __string_view __stem() const;
+ __string_view __extension() const;
public:
// compare
@@ -987,8 +990,8 @@ public:
class _LIBCPP_TYPE_VIS iterator;
typedef iterator const_iterator;
- _LIBCPP_FUNC_VIS iterator begin() const;
- _LIBCPP_FUNC_VIS iterator end() const;
+ iterator begin() const;
+ iterator end() const;
private:
inline _LIBCPP_INLINE_VISIBILITY
@@ -1088,10 +1091,13 @@ class _LIBCPP_TYPE_VIS path::iterator
{
public:
typedef bidirectional_iterator_tag iterator_category;
+
typedef path value_type;
typedef std::ptrdiff_t difference_type;
typedef const path* pointer;
typedef const path& reference;
+
+ typedef void __stashing_iterator_tag; // See reverse_iterator and __is_stashing_iterator
public:
_LIBCPP_INLINE_VISIBILITY
iterator() : __stashed_elem_(), __path_ptr_(nullptr),
@@ -1153,8 +1159,8 @@ private:
inline _LIBCPP_INLINE_VISIBILITY
friend bool operator==(const iterator&, const iterator&);
- _LIBCPP_FUNC_VIS iterator& __increment();
- _LIBCPP_FUNC_VIS iterator& __decrement();
+ iterator& __increment();
+ iterator& __decrement();
path __stashed_elem_;
const path* __path_ptr_;
@@ -1205,7 +1211,6 @@ public:
return __paths_->second;
}
- _LIBCPP_FUNC_VIS
~filesystem_error() override; // key function
// TODO(ericwf): Create a custom error message.
@@ -1923,7 +1928,7 @@ public:
const directory_entry& operator*() const {
_LIBCPP_ASSERT(__imp_, "The end iterator cannot be dereferenced");
- return __deref();
+ return __dereference();
}
const directory_entry* operator->() const
@@ -1948,11 +1953,14 @@ private:
// construct the dir_stream
_LIBCPP_FUNC_VIS
- directory_iterator(const path&, error_code *, directory_options = directory_options::none);
+ directory_iterator(const path&, error_code *,
+ directory_options = directory_options::none);
+
_LIBCPP_FUNC_VIS
directory_iterator& __increment(error_code * __ec = nullptr);
+
_LIBCPP_FUNC_VIS
- const directory_entry& __deref() const;
+ const directory_entry& __dereference() const;
private:
shared_ptr<__dir_stream> __imp_;
@@ -2035,11 +2043,11 @@ public:
_LIBCPP_INLINE_VISIBILITY
const directory_entry& operator*() const
- { return __deref(); }
+ { return __dereference(); }
_LIBCPP_INLINE_VISIBILITY
const directory_entry* operator->() const
- { return &__deref(); }
+ { return &__dereference(); }
recursive_directory_iterator& operator++()
{ return __increment(); }
@@ -2078,7 +2086,7 @@ private:
error_code *__ec);
_LIBCPP_FUNC_VIS
- const directory_entry& __deref() const;
+ const directory_entry& __dereference() const;
_LIBCPP_FUNC_VIS
bool __try_recursion(error_code* __ec);
diff --git a/include/experimental/memory_resource b/include/experimental/memory_resource
index b3d9ca881989..743f9cbe639c 100644
--- a/include/experimental/memory_resource
+++ b/include/experimental/memory_resource
@@ -181,7 +181,7 @@ public:
// 8.6.3, memory.polymorphic.allocator.mem
_LIBCPP_INLINE_VISIBILITY
_ValueType* allocate(size_t __n) {
- if (__n > max_size()) {
+ if (__n > __max_size()) {
__throw_length_error(
"std::experimental::pmr::polymorphic_allocator<T>::allocate(size_t n)"
" 'n' exceeds maximum supported size");
@@ -193,7 +193,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
void deallocate(_ValueType * __p, size_t __n) _NOEXCEPT {
- _LIBCPP_ASSERT(__n <= max_size(),
+ _LIBCPP_ASSERT(__n <= __max_size(),
"deallocate called for size which exceeds max_size()");
__res_->deallocate(__p, __n * sizeof(_ValueType), alignof(_ValueType));
}
@@ -266,10 +266,6 @@ public:
{ __p->~_Tp(); }
_LIBCPP_INLINE_VISIBILITY
- size_t max_size() const _NOEXCEPT
- { return numeric_limits<size_t>::max() / sizeof(value_type); }
-
- _LIBCPP_INLINE_VISIBILITY
polymorphic_allocator
select_on_container_copy_construction() const _NOEXCEPT
{ return polymorphic_allocator(); }
@@ -309,6 +305,10 @@ private:
return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., resource());
}
+ _LIBCPP_INLINE_VISIBILITY
+ size_t __max_size() const _NOEXCEPT
+ { return numeric_limits<size_t>::max() / sizeof(value_type); }
+
memory_resource * __res_;
};
diff --git a/include/experimental/numeric b/include/experimental/numeric
index 32b19a466358..d1209dbec15b 100644
--- a/include/experimental/numeric
+++ b/include/experimental/numeric
@@ -45,18 +45,23 @@ inline namespace fundamentals_v2 {
_LIBCPP_BEGIN_NAMESPACE_LFTS_V2
-template <typename _Tp, bool _IsSigned = is_signed<_Tp>::value> struct __abs;
+template <typename _Result, typename _Source, bool _IsSigned = is_signed<_Source>::value> struct __abs;
-template <typename _Tp>
-struct __abs<_Tp, true> {
+template <typename _Result, typename _Source>
+struct __abs<_Result, _Source, true> {
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- _Tp operator()(_Tp __t) const noexcept { return __t >= 0 ? __t : -__t; }
+ _Result operator()(_Source __t) const noexcept
+ {
+ if (__t >= 0) return __t;
+ if (__t == numeric_limits<_Source>::min()) return -static_cast<_Result>(__t);
+ return -__t;
+ }
};
-template <typename _Tp>
-struct __abs<_Tp, false> {
+template <typename _Result, typename _Source>
+struct __abs<_Result, _Source, false> {
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- _Tp operator()(_Tp __t) const noexcept { return __t; }
+ _Result operator()(_Source __t) const noexcept { return __t; }
};
@@ -75,10 +80,12 @@ common_type_t<_Tp,_Up>
gcd(_Tp __m, _Up __n)
{
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to gcd must be integer types");
+ static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to gcd cannot be bool" );
+ static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
using _Rp = common_type_t<_Tp,_Up>;
using _Wp = make_unsigned_t<_Rp>;
- return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Tp>()(__m)),
- static_cast<_Wp>(__abs<_Up>()(__n))));
+ return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
+ static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
}
template<class _Tp, class _Up>
@@ -87,12 +94,14 @@ common_type_t<_Tp,_Up>
lcm(_Tp __m, _Up __n)
{
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to lcm must be integer types");
+ static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to lcm cannot be bool" );
+ static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to lcm cannot be bool" );
if (__m == 0 || __n == 0)
return 0;
using _Rp = common_type_t<_Tp,_Up>;
- _Rp __val1 = __abs<_Tp>()(__m) / gcd(__m,__n);
- _Up __val2 = __abs<_Up>()(__n);
+ _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
+ _Rp __val2 = __abs<_Rp, _Up>()(__n);
_LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
return __val1 * __val2;
}
diff --git a/include/ext/hash_map b/include/ext/hash_map
index 8998bec66c31..fab36a155bac 100644
--- a/include/ext/hash_map
+++ b/include/ext/hash_map
@@ -207,7 +207,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
#include <ext/__hash>
#if __DEPRECATED
-#if defined(_MSC_VER) && ! defined(__clang__)
+#if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>")
#else
# warning Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>
diff --git a/include/ext/hash_set b/include/ext/hash_set
index 7c6a8bf0ccc7..916ed6910d7d 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -199,7 +199,7 @@ template <class Value, class Hash, class Pred, class Alloc>
#include <ext/__hash>
#if __DEPRECATED
-#if defined(_MSC_VER) && ! defined(__clang__)
+#if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("Use of the header <ext/hash_set> is deprecated. Migrate to <unordered_set>")
#else
# warning Use of the header <ext/hash_set> is deprecated. Migrate to <unordered_set>
diff --git a/include/forward_list b/include/forward_list
index 879f2d3ce087..e4ab41e38b11 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -478,14 +478,14 @@ protected:
__forward_list_base(const allocator_type& __a)
: __before_begin_(__begin_node(), __node_allocator(__a)) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
public:
_LIBCPP_INLINE_VISIBILITY
__forward_list_base(__forward_list_base&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
_LIBCPP_INLINE_VISIBILITY
__forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
private:
__forward_list_base(const __forward_list_base&);
@@ -539,7 +539,7 @@ private:
{__alloc() = _VSTD::move(__x.__alloc());}
};
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline
@@ -563,7 +563,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x,
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
__forward_list_base<_Tp, _Alloc>::~__forward_list_base()
@@ -656,32 +656,33 @@ public:
>::type* = nullptr);
forward_list(const forward_list& __x);
forward_list(const forward_list& __x, const allocator_type& __a);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ forward_list& operator=(const forward_list& __x);
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
forward_list(forward_list&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<base>::value)
: base(_VSTD::move(__x)) {}
forward_list(forward_list&& __x, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
forward_list(initializer_list<value_type> __il);
forward_list(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- // ~forward_list() = default;
-
- forward_list& operator=(const forward_list& __x);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
forward_list& operator=(forward_list&& __x)
_NOEXCEPT_(
__node_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
-#endif
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
forward_list& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ _LIBCPP_INLINE_VISIBILITY
+ void assign(initializer_list<value_type> __il);
+#endif // _LIBCPP_CXX03_LANG
+
+ // ~forward_list() = default;
template <class _InputIterator>
typename enable_if
@@ -691,10 +692,6 @@ public:
>::type
assign(_InputIterator __f, _InputIterator __l);
void assign(size_type __n, const value_type& __v);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- void assign(initializer_list<value_type> __il);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -745,27 +742,26 @@ public:
_LIBCPP_INLINE_VISIBILITY
const_reference front() const {return base::__before_begin()->__next_->__value_;}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14
template <class... _Args> reference emplace_front(_Args&&... __args);
#else
template <class... _Args> void emplace_front(_Args&&... __args);
#endif
-#endif
void push_front(value_type&& __v);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
void push_front(const value_type& __v);
void pop_front();
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class... _Args>
iterator emplace_after(const_iterator __p, _Args&&... __args);
-#endif // _LIBCPP_HAS_NO_VARIADICS
+
iterator insert_after(const_iterator __p, value_type&& __v);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
+ {return insert_after(__p, __il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
iterator insert_after(const_iterator __p, const value_type& __v);
iterator insert_after(const_iterator __p, size_type __n, const value_type& __v);
template <class _InputIterator>
@@ -776,10 +772,6 @@ public:
iterator
>::type
insert_after(const_iterator __p, _InputIterator __f, _InputIterator __l);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
- {return insert_after(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
iterator erase_after(const_iterator __p);
iterator erase_after(const_iterator __f, const_iterator __l);
@@ -799,7 +791,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT {base::clear();}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void splice_after(const_iterator __p, forward_list&& __x);
_LIBCPP_INLINE_VISIBILITY
@@ -807,7 +799,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
void splice_after(const_iterator __p, forward_list&& __x,
const_iterator __f, const_iterator __l);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
void splice_after(const_iterator __p, forward_list& __x);
void splice_after(const_iterator __p, forward_list& __x, const_iterator __i);
void splice_after(const_iterator __p, forward_list& __x,
@@ -817,14 +809,14 @@ public:
_LIBCPP_INLINE_VISIBILITY
void unique() {unique(__equal_to<value_type>());}
template <class _BinaryPredicate> void unique(_BinaryPredicate __binary_pred);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list&& __x) {merge(__x, __less<value_type>());}
template <class _Compare>
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list&& __x, _Compare __comp)
{merge(__x, _VSTD::move(__comp));}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list& __x) {merge(__x, __less<value_type>());}
template <class _Compare> void merge(forward_list& __x, _Compare __comp);
@@ -835,11 +827,11 @@ public:
private:
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
void __move_assign(forward_list& __x, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
void __move_assign(forward_list& __x, false_type);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Compare>
static
@@ -955,8 +947,19 @@ forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x,
insert_after(cbefore_begin(), __x.begin(), __x.end());
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+template <class _Tp, class _Alloc>
+forward_list<_Tp, _Alloc>&
+forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
+{
+ if (this != &__x)
+ {
+ base::__copy_assign_alloc(__x);
+ assign(__x.begin(), __x.end());
+ }
+ return *this;
+}
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
const allocator_type& __a)
@@ -969,10 +972,6 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il)
{
@@ -987,22 +986,6 @@ forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il,
insert_after(cbefore_begin(), __il.begin(), __il.end());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-template <class _Tp, class _Alloc>
-forward_list<_Tp, _Alloc>&
-forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
-{
- if (this != &__x)
- {
- base::__copy_assign_alloc(__x);
- assign(__x.begin(), __x.end());
- }
- return *this;
-}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::__move_assign(forward_list& __x, true_type)
@@ -1040,10 +1023,6 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x)
return *this;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Alloc>
inline
forward_list<_Tp, _Alloc>&
@@ -1053,7 +1032,7 @@ forward_list<_Tp, _Alloc>::operator=(initializer_list<value_type> __il)
return *this;
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
template <class _InputIterator>
@@ -1090,7 +1069,7 @@ forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v)
erase_after(__i, __e);
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline
@@ -1100,11 +1079,6 @@ forward_list<_Tp, _Alloc>::assign(initializer_list<value_type> __il)
assign(__il.begin(), __il.end());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
template <class... _Args>
#if _LIBCPP_STD_VER > 14
@@ -1126,8 +1100,6 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
@@ -1140,7 +1112,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
base::__before_begin()->__next_ = __h.release();
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
@@ -1165,8 +1137,7 @@ forward_list<_Tp, _Alloc>::pop_front()
__node_traits::deallocate(__a, __p, 1);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
template <class... _Args>
@@ -1184,8 +1155,6 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
return iterator(__r->__next_);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
typename forward_list<_Tp, _Alloc>::iterator
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
@@ -1200,7 +1169,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
return iterator(__r->__next_);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
typename forward_list<_Tp, _Alloc>::iterator
@@ -1468,7 +1437,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
}
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1499,7 +1468,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
splice_after(__p, __x, __f, __l);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
diff --git a/include/functional b/include/functional
index 4f8ec65e090d..15e672e0efc7 100644
--- a/include/functional
+++ b/include/functional
@@ -235,7 +235,7 @@ namespace placeholders {
}
template <class Operation>
-class binder1st
+class binder1st // deprecated in C++11, removed in C++17
: public unary_function<typename Operation::second_argument_type,
typename Operation::result_type>
{
@@ -249,10 +249,10 @@ public:
};
template <class Operation, class T>
-binder1st<Operation> bind1st(const Operation& op, const T& x);
+binder1st<Operation> bind1st(const Operation& op, const T& x); // deprecated in C++11, removed in C++17
template <class Operation>
-class binder2nd
+class binder2nd // deprecated in C++11, removed in C++17
: public unary_function<typename Operation::first_argument_type,
typename Operation::result_type>
{
@@ -266,9 +266,9 @@ public:
};
template <class Operation, class T>
-binder2nd<Operation> bind2nd(const Operation& op, const T& x);
+binder2nd<Operation> bind2nd(const Operation& op, const T& x); // deprecated in C++11, removed in C++17
-template <class Arg, class Result>
+template <class Arg, class Result> // deprecated in C++11, removed in C++17
class pointer_to_unary_function : public unary_function<Arg, Result>
{
public:
@@ -277,9 +277,9 @@ public:
};
template <class Arg, class Result>
-pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg));
+pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg)); // deprecated in C++11, removed in C++17
-template <class Arg1, class Arg2, class Result>
+template <class Arg1, class Arg2, class Result> // deprecated in C++11, removed in C++17
class pointer_to_binary_function : public binary_function<Arg1, Arg2, Result>
{
public:
@@ -288,9 +288,9 @@ public:
};
template <class Arg1, class Arg2, class Result>
-pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1,Arg2));
+pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1,Arg2)); // deprecated in C++11, removed in C++17
-template<class S, class T>
+template<class S, class T> // deprecated in C++11, removed in C++17
class mem_fun_t : public unary_function<T*, S>
{
public:
@@ -299,18 +299,18 @@ public:
};
template<class S, class T, class A>
-class mem_fun1_t : public binary_function<T*, A, S>
+class mem_fun1_t : public binary_function<T*, A, S> // deprecated in C++11, removed in C++17
{
public:
explicit mem_fun1_t(S (T::*p)(A));
S operator()(T* p, A x) const;
};
-template<class S, class T> mem_fun_t<S,T> mem_fun(S (T::*f)());
-template<class S, class T, class A> mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));
+template<class S, class T> mem_fun_t<S,T> mem_fun(S (T::*f)()); // deprecated in C++11, removed in C++17
+template<class S, class T, class A> mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A)); // deprecated in C++11, removed in C++17
template<class S, class T>
-class mem_fun_ref_t : public unary_function<T, S>
+class mem_fun_ref_t : public unary_function<T, S> // deprecated in C++11, removed in C++17
{
public:
explicit mem_fun_ref_t(S (T::*p)());
@@ -318,18 +318,18 @@ public:
};
template<class S, class T, class A>
-class mem_fun1_ref_t : public binary_function<T, A, S>
+class mem_fun1_ref_t : public binary_function<T, A, S> // deprecated in C++11, removed in C++17
{
public:
explicit mem_fun1_ref_t(S (T::*p)(A));
S operator()(T& p, A x) const;
};
-template<class S, class T> mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)());
-template<class S, class T, class A> mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));
+template<class S, class T> mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)()); // deprecated in C++11, removed in C++17
+template<class S, class T, class A> mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A)); // deprecated in C++11, removed in C++17
template <class S, class T>
-class const_mem_fun_t : public unary_function<const T*, S>
+class const_mem_fun_t : public unary_function<const T*, S> // deprecated in C++11, removed in C++17
{
public:
explicit const_mem_fun_t(S (T::*p)() const);
@@ -337,18 +337,18 @@ public:
};
template <class S, class T, class A>
-class const_mem_fun1_t : public binary_function<const T*, A, S>
+class const_mem_fun1_t : public binary_function<const T*, A, S> // deprecated in C++11, removed in C++17
{
public:
explicit const_mem_fun1_t(S (T::*p)(A) const);
S operator()(const T* p, A x) const;
};
-template <class S, class T> const_mem_fun_t<S,T> mem_fun(S (T::*f)() const);
-template <class S, class T, class A> const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);
+template <class S, class T> const_mem_fun_t<S,T> mem_fun(S (T::*f)() const); // deprecated in C++11, removed in C++17
+template <class S, class T, class A> const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const); // deprecated in C++11, removed in C++17
template <class S, class T>
-class const_mem_fun_ref_t : public unary_function<T, S>
+class const_mem_fun_ref_t : public unary_function<T, S> // deprecated in C++11, removed in C++17
{
public:
explicit const_mem_fun_ref_t(S (T::*p)() const);
@@ -356,15 +356,15 @@ public:
};
template <class S, class T, class A>
-class const_mem_fun1_ref_t : public binary_function<T, A, S>
+class const_mem_fun1_ref_t : public binary_function<T, A, S> // deprecated in C++11, removed in C++17
{
public:
explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
S operator()(const T& p, A x) const;
};
-template <class S, class T> const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
-template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
+template <class S, class T> const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const); // deprecated in C++11, removed in C++17
+template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const); // deprecated in C++11, removed in C++17
template<class R, class T> unspecified mem_fn(R T::*);
@@ -470,6 +470,7 @@ template <> struct hash<double>;
template <> struct hash<long double>;
template<class T> struct hash<T*>;
+template <> struct hash<nullptr_t>; // C++17
} // std
@@ -485,6 +486,7 @@ POLICY: For non-variadic implementations, the number of arguments is limited
#include <exception>
#include <memory>
#include <tuple>
+#include <utility>
#include <__functional_base>
@@ -1018,6 +1020,7 @@ inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
binary_negate<_Predicate>
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class __Operation>
class _LIBCPP_TEMPLATE_VIS binder1st
: public unary_function<typename __Operation::second_argument_type,
@@ -1242,6 +1245,7 @@ inline _LIBCPP_INLINE_VISIBILITY
const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
{return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
+#endif
////////////////////////////////////////////////////////////////////////////////
// MEMFUN
@@ -1387,6 +1391,12 @@ mem_fn(_Rp _Tp::* __pm) _NOEXCEPT
class _LIBCPP_EXCEPTION_ABI bad_function_call
: public exception
{
+#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+public:
+ virtual ~bad_function_call() _NOEXCEPT;
+
+ virtual const char* what() const _NOEXCEPT;
+#endif
};
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
@@ -2339,247 +2349,6 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
#endif // _LIBCPP_HAS_NO_VARIADICS
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<bool>
- : public unary_function<bool, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(bool __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char>
- : public unary_function<char, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<signed char>
- : public unary_function<signed char, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(signed char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
- : public unary_function<unsigned char, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
- : public unary_function<char16_t, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(char16_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char32_t>
- : public unary_function<char32_t, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<wchar_t>
- : public unary_function<wchar_t, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(wchar_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<short>
- : public unary_function<short, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
- : public unary_function<unsigned short, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(unsigned short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<int>
- : public unary_function<int, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
- : public unary_function<unsigned int, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(unsigned int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long>
- : public unary_function<long, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
- : public unary_function<unsigned long, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(unsigned long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long long>
- : public __scalar_hash<long long>
-{
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long>
- : public __scalar_hash<unsigned long long>
-{
-};
-
-#ifndef _LIBCPP_HAS_NO_INT128
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__int128_t>
- : public __scalar_hash<__int128_t>
-{
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
- : public __scalar_hash<__uint128_t>
-{
-};
-
-#endif
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<float>
- : public __scalar_hash<float>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(float __v) const _NOEXCEPT
- {
- // -0.0 and 0.0 should return same hash
- if (__v == 0)
- return 0;
- return __scalar_hash<float>::operator()(__v);
- }
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<double>
- : public __scalar_hash<double>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(double __v) const _NOEXCEPT
- {
- // -0.0 and 0.0 should return same hash
- if (__v == 0)
- return 0;
- return __scalar_hash<double>::operator()(__v);
- }
-};
-
-template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long double>
- : public __scalar_hash<long double>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(long double __v) const _NOEXCEPT
- {
- // -0.0 and 0.0 should return same hash
- if (__v == 0)
- return 0;
-#if defined(__i386__)
- // Zero out padding bits
- union
- {
- long double __t;
- struct
- {
- size_t __a;
- size_t __b;
- size_t __c;
- size_t __d;
- } __s;
- } __u;
- __u.__s.__a = 0;
- __u.__s.__b = 0;
- __u.__s.__c = 0;
- __u.__s.__d = 0;
- __u.__t = __v;
- return __u.__s.__a ^ __u.__s.__b ^ __u.__s.__c ^ __u.__s.__d;
-#elif defined(__x86_64__)
- // Zero out padding bits
- union
- {
- long double __t;
- struct
- {
- size_t __a;
- size_t __b;
- } __s;
- } __u;
- __u.__s.__a = 0;
- __u.__s.__b = 0;
- __u.__t = __v;
- return __u.__s.__a ^ __u.__s.__b;
-#else
- return __scalar_hash<long double>::operator()(__v);
-#endif
- }
-};
-
-#if _LIBCPP_STD_VER > 11
-
-template <class _Tp, bool = is_enum<_Tp>::value>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- typedef typename underlying_type<_Tp>::type type;
- return hash<type>{}(static_cast<type>(__v));
- }
-};
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
- __enum_hash() = delete;
- __enum_hash(__enum_hash const&) = delete;
- __enum_hash& operator=(__enum_hash const&) = delete;
-};
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
-{
-};
-#endif
-
-
#if _LIBCPP_STD_VER > 14
#define __cpp_lib_invoke 201411
diff --git a/include/future b/include/future
index 48550a37e70e..1ceedf91e9cd 100644
--- a/include/future
+++ b/include/future
@@ -156,7 +156,7 @@ public:
~future();
future& operator=(const future& rhs) = delete;
future& operator=(future&&) noexcept;
- shared_future<R> share();
+ shared_future<R> share() noexcept;
// retrieving the value
R get();
@@ -183,7 +183,7 @@ public:
~future();
future& operator=(const future& rhs) = delete;
future& operator=(future&&) noexcept;
- shared_future<R&> share();
+ shared_future<R&> share() noexcept;
// retrieving the value
R& get();
@@ -210,7 +210,7 @@ public:
~future();
future& operator=(const future& rhs) = delete;
future& operator=(future&&) noexcept;
- shared_future<void> share();
+ shared_future<void> share() noexcept;
// retrieving the value
void get();
@@ -582,6 +582,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const;
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
future_status
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const;
@@ -1119,7 +1120,7 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
~future();
_LIBCPP_INLINE_VISIBILITY
- shared_future<_Rp> share();
+ shared_future<_Rp> share() _NOEXCEPT;
// retrieving the value
_Rp get();
@@ -1222,7 +1223,7 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
~future();
_LIBCPP_INLINE_VISIBILITY
- shared_future<_Rp&> share();
+ shared_future<_Rp&> share() _NOEXCEPT;
// retrieving the value
_Rp& get();
@@ -1320,7 +1321,7 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
~future();
_LIBCPP_INLINE_VISIBILITY
- shared_future<void> share();
+ shared_future<void> share() _NOEXCEPT;
// retrieving the value
void get();
@@ -1674,6 +1675,7 @@ class _LIBCPP_TYPE_VIS promise<void>
public:
promise();
template <class _Allocator>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
promise(allocator_arg_t, const _Allocator& __a);
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -2580,7 +2582,7 @@ swap(shared_future<_Rp>& __x, shared_future<_Rp>& __y) _NOEXCEPT
template <class _Rp>
inline
shared_future<_Rp>
-future<_Rp>::share()
+future<_Rp>::share() _NOEXCEPT
{
return shared_future<_Rp>(_VSTD::move(*this));
}
@@ -2588,7 +2590,7 @@ future<_Rp>::share()
template <class _Rp>
inline
shared_future<_Rp&>
-future<_Rp&>::share()
+future<_Rp&>::share() _NOEXCEPT
{
return shared_future<_Rp&>(_VSTD::move(*this));
}
@@ -2597,7 +2599,7 @@ future<_Rp&>::share()
inline
shared_future<void>
-future<void>::share()
+future<void>::share() _NOEXCEPT
{
return shared_future<void>(_VSTD::move(*this));
}
diff --git a/include/ios b/include/ios
index bb5ca72e5e4d..49f0c01f9858 100644
--- a/include/ios
+++ b/include/ios
@@ -592,6 +592,9 @@ public:
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
+ // __true_value will generate undefined references when linking unless
+ // we give it internal linkage.
+
#if defined(_LIBCPP_CXX03_LANG)
_LIBCPP_ALWAYS_INLINE
operator __cxx03_bool::__bool_type() const {
diff --git a/include/iterator b/include/iterator
index b8f657085c6b..66d1a310d22f 100644
--- a/include/iterator
+++ b/include/iterator
@@ -615,6 +615,14 @@ prev(_BidiretionalIter __x,
return __x;
}
+
+template <class _Tp, class = void>
+struct __is_stashing_iterator : false_type {};
+
+template <class _Tp>
+struct __is_stashing_iterator<_Tp, typename __void_t<typename _Tp::__stashing_iterator_tag>::type>
+ : true_type {};
+
template <class _Iter>
class _LIBCPP_TEMPLATE_VIS reverse_iterator
: public iterator<typename iterator_traits<_Iter>::iterator_category,
@@ -625,6 +633,11 @@ class _LIBCPP_TEMPLATE_VIS reverse_iterator
{
private:
/*mutable*/ _Iter __t; // no longer used as of LWG #2360, not removed due to ABI break
+
+ static_assert(!__is_stashing_iterator<_Iter>::value,
+ "The specified iterator type cannot be used with reverse_iterator; "
+ "Using stashing iterators with reverse_iterator causes undefined behavior");
+
protected:
_Iter current;
public:
diff --git a/include/limits b/include/limits
index b15f8f1b6a5e..609c4d4ed95a 100644
--- a/include/limits
+++ b/include/limits
@@ -101,12 +101,12 @@ template<> class numeric_limits<cv long double>;
} // std
*/
+#include <__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
-#include <__config>
#include <type_traits>
#include <__undef_min_max>
diff --git a/include/list b/include/list
index fa148db516bc..5e76d1103371 100644
--- a/include/list
+++ b/include/list
@@ -860,11 +860,10 @@ public:
list(const list& __c, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
list& operator=(const list& __c);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
list(initializer_list<value_type> __il);
list(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
_LIBCPP_INLINE_VISIBILITY
list(list&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
@@ -875,22 +874,20 @@ public:
_NOEXCEPT_(
__node_alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<__node_allocator>::value);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
list& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ _LIBCPP_INLINE_VISIBILITY
+ void assign(initializer_list<value_type> __il)
+ {assign(__il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
template <class _InpIter>
void assign(_InpIter __f, _InpIter __l,
typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0);
void assign(size_type __n, const value_type& __x);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- void assign(initializer_list<value_type> __il)
- {assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT;
@@ -964,10 +961,10 @@ public:
return base::__end_.__prev_->__as_node()->__value_;
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
void push_front(value_type&& __x);
void push_back(value_type&& __x);
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+
template <class... _Args>
#if _LIBCPP_STD_VER > 14
reference emplace_front(_Args&&... __args);
@@ -982,9 +979,13 @@ public:
#endif
template <class... _Args>
iterator emplace(const_iterator __p, _Args&&... __args);
-#endif // _LIBCPP_HAS_NO_VARIADICS
+
iterator insert(const_iterator __p, value_type&& __x);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ _LIBCPP_INLINE_VISIBILITY
+ iterator insert(const_iterator __p, initializer_list<value_type> __il)
+ {return insert(__p, __il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
void push_front(const value_type& __x);
void push_back(const value_type& __x);
@@ -994,11 +995,6 @@ public:
template <class _InpIter>
iterator insert(const_iterator __p, _InpIter __f, _InpIter __l,
typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- iterator insert(const_iterator __p, initializer_list<value_type> __il)
- {return insert(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void swap(list& __c)
@@ -1022,22 +1018,18 @@ public:
void resize(size_type __n, const value_type& __x);
void splice(const_iterator __p, list& __c);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void splice(const_iterator __p, list&& __c) {splice(__p, __c);}
-#endif
- void splice(const_iterator __p, list& __c, const_iterator __i);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
void splice(const_iterator __p, list&& __c, const_iterator __i)
{splice(__p, __c, __i);}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
- void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l)
{splice(__p, __c, __f, __l);}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
+ void splice(const_iterator __p, list& __c, const_iterator __i);
+ void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l);
void remove(const value_type& __x);
template <class _Pred> void remove_if(_Pred __pred);
@@ -1047,17 +1039,17 @@ public:
void unique(_BinaryPred __binary_pred);
_LIBCPP_INLINE_VISIBILITY
void merge(list& __c);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void merge(list&& __c) {merge(__c);}
-#endif
- template <class _Comp>
- void merge(list& __c, _Comp __comp);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
template <class _Comp>
_LIBCPP_INLINE_VISIBILITY
void merge(list&& __c, _Comp __comp) {merge(__c, __comp);}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
+ template <class _Comp>
+ void merge(list& __c, _Comp __comp);
+
_LIBCPP_INLINE_VISIBILITY
void sort();
template <class _Comp>
@@ -1146,7 +1138,7 @@ list<_Tp, _Alloc>::list(size_type __n)
__get_db()->__insert_c(this);
#endif
for (; __n > 0; --__n)
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
emplace_back();
#else
push_back(value_type());
@@ -1161,11 +1153,7 @@ list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a)
__get_db()->__insert_c(this);
#endif
for (; __n > 0; --__n)
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
emplace_back();
-#else
- push_back(value_type());
-#endif
}
#endif
@@ -1239,7 +1227,7 @@ list<_Tp, _Alloc>::list(const list& __c, const allocator_type& __a)
push_back(*__i);
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& __a)
@@ -1264,23 +1252,6 @@ list<_Tp, _Alloc>::list(initializer_list<value_type> __il)
push_back(*__i);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-template <class _Tp, class _Alloc>
-inline
-list<_Tp, _Alloc>&
-list<_Tp, _Alloc>::operator=(const list& __c)
-{
- if (this != &__c)
- {
- base::__copy_assign_alloc(__c);
- assign(__c.begin(), __c.end());
- }
- return *this;
-}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Alloc>
inline
list<_Tp, _Alloc>::list(list&& __c)
@@ -1346,7 +1317,20 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type)
splice(end(), __c);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
+
+template <class _Tp, class _Alloc>
+inline
+list<_Tp, _Alloc>&
+list<_Tp, _Alloc>::operator=(const list& __c)
+{
+ if (this != &__c)
+ {
+ base::__copy_assign_alloc(__c);
+ assign(__c.begin(), __c.end());
+ }
+ return *this;
+}
template <class _Tp, class _Alloc>
template <class _InpIter>
@@ -1576,7 +1560,7 @@ list<_Tp, _Alloc>::push_back(const value_type& __x)
__hold.release();
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
@@ -1604,8 +1588,6 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
__hold.release();
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
template <class... _Args>
#if _LIBCPP_STD_VER > 14
@@ -1677,8 +1659,6 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args)
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator
list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
@@ -1704,7 +1684,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
#endif
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
diff --git a/include/locale b/include/locale
index 9cef429686ef..da31a1e62cb2 100644
--- a/include/locale
+++ b/include/locale
@@ -623,16 +623,19 @@ protected:
~num_get() {}
template <class _Fp>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
iter_type __do_get_floating_point
(iter_type __b, iter_type __e, ios_base& __iob,
ios_base::iostate& __err, _Fp& __v) const;
template <class _Signed>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
iter_type __do_get_signed
(iter_type __b, iter_type __e, ios_base& __iob,
ios_base::iostate& __err, _Signed& __v) const;
template <class _Unsigned>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
iter_type __do_get_unsigned
(iter_type __b, iter_type __e, ios_base& __iob,
ios_base::iostate& __err, _Unsigned& __v) const;
@@ -2628,10 +2631,10 @@ private:
void init(const char*);
};
-template<> void moneypunct_byname<char, false>::init(const char*);
-template<> void moneypunct_byname<char, true>::init(const char*);
-template<> void moneypunct_byname<wchar_t, false>::init(const char*);
-template<> void moneypunct_byname<wchar_t, true>::init(const char*);
+template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, false>::init(const char*);
+template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, true>::init(const char*);
+template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, false>::init(const char*);
+template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, true>::init(const char*);
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>)
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>)
diff --git a/include/map b/include/map
index 9555aadd2956..c8131eceb72b 100644
--- a/include/map
+++ b/include/map
@@ -453,9 +453,7 @@ swap(multimap<Key, T, Compare, Allocator>& x,
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Key, class _CP, class _Compare,
- bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value
- >
+template <class _Key, class _CP, class _Compare, bool _IsSmall>
class __map_value_compare
: private _Compare
{
@@ -482,8 +480,8 @@ public:
void swap(__map_value_compare&__y)
_NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
{
- using _VSTD::swap;
- swap(static_cast<const _Compare&>(*this), static_cast<const _Compare&>(__y));
+ using _VSTD::swap;
+ swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
}
#if _LIBCPP_STD_VER > 11
diff --git a/include/math.h b/include/math.h
index fb0b6083010b..79ebf2f119d7 100644
--- a/include/math.h
+++ b/include/math.h
@@ -330,6 +330,16 @@ signbit(_A1 __lcpp_x) _NOEXCEPT
return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x);
}
+#elif defined(_LIBCPP_MSVCRT)
+
+template <typename _A1>
+inline _LIBCPP_INLINE_VISIBILITY
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
+signbit(_A1 __lcpp_x) _NOEXCEPT
+{
+ return ::signbit(static_cast<typename std::__promote<_A1>::type>(__lcpp_x));
+}
+
#endif // signbit
// fpclassify
@@ -354,6 +364,16 @@ fpclassify(_A1 __lcpp_x) _NOEXCEPT
return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
}
+#elif defined(_LIBCPP_MSVCRT)
+
+template <typename _A1>
+inline _LIBCPP_INLINE_VISIBILITY
+typename std::enable_if<std::is_arithmetic<_A1>::value, int>::type
+fpclassify(_A1 __lcpp_x) _NOEXCEPT
+{
+ return ::fpclassify(static_cast<typename std::__promote<_A1>::type>(__lcpp_x));
+}
+
#endif // fpclassify
// isfinite
@@ -637,58 +657,58 @@ isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
#if !(defined(_AIX) || defined(__sun__))
inline _LIBCPP_INLINE_VISIBILITY
float
-abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
+abs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY
double
-abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
+abs(double __lcpp_x) _NOEXCEPT {return ::fabs(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY
long double
-abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
+abs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
#endif // !(defined(_AIX) || defined(__sun__))
// acos
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return acosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
+acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
// asin
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return asinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return asinl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return ::asinf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-asin(_A1 __lcpp_x) _NOEXCEPT {return asin((double)__lcpp_x);}
+asin(_A1 __lcpp_x) _NOEXCEPT {return ::asin((double)__lcpp_x);}
// atan
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return atanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return atanl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return ::atanf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-atan(_A1 __lcpp_x) _NOEXCEPT {return atan((double)__lcpp_x);}
+atan(_A1 __lcpp_x) _NOEXCEPT {return ::atan((double)__lcpp_x);}
// atan2
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return atan2f(__lcpp_y, __lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return atan2l(__lcpp_y, __lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return ::atan2f(__lcpp_y, __lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);}
#endif
template <class _A1, class _A2>
@@ -704,86 +724,86 @@ atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return atan2((__result_type)__lcpp_y, (__result_type)__lcpp_x);
+ return ::atan2((__result_type)__lcpp_y, (__result_type)__lcpp_x);
}
// ceil
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ceilf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ceill(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ::ceilf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-ceil(_A1 __lcpp_x) _NOEXCEPT {return ceil((double)__lcpp_x);}
+ceil(_A1 __lcpp_x) _NOEXCEPT {return ::ceil((double)__lcpp_x);}
// cos
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return cosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return cosl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return ::cosf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cos(_A1 __lcpp_x) _NOEXCEPT {return cos((double)__lcpp_x);}
+cos(_A1 __lcpp_x) _NOEXCEPT {return ::cos((double)__lcpp_x);}
// cosh
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return coshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return coshl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return ::coshf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cosh(_A1 __lcpp_x) _NOEXCEPT {return cosh((double)__lcpp_x);}
+cosh(_A1 __lcpp_x) _NOEXCEPT {return ::cosh((double)__lcpp_x);}
// exp
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return expf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return expl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return ::expf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-exp(_A1 __lcpp_x) _NOEXCEPT {return exp((double)__lcpp_x);}
+exp(_A1 __lcpp_x) _NOEXCEPT {return ::exp((double)__lcpp_x);}
// fabs
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-fabs(_A1 __lcpp_x) _NOEXCEPT {return fabs((double)__lcpp_x);}
+fabs(_A1 __lcpp_x) _NOEXCEPT {return ::fabs((double)__lcpp_x);}
// floor
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return floorf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return floorl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return ::floorf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-floor(_A1 __lcpp_x) _NOEXCEPT {return floor((double)__lcpp_x);}
+floor(_A1 __lcpp_x) _NOEXCEPT {return ::floor((double)__lcpp_x);}
// fmod
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fmodf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmodl(__lcpp_x, __lcpp_y);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmodf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);}
#endif
template <class _A1, class _A2>
@@ -799,69 +819,69 @@ fmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return fmod((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmod((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// frexp
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpl(__lcpp_x, __lcpp_e);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpf(__lcpp_x, __lcpp_e);}
+inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexp((double)__lcpp_x, __lcpp_e);}
+frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexp((double)__lcpp_x, __lcpp_e);}
// ldexp
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpl(__lcpp_x, __lcpp_e);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpf(__lcpp_x, __lcpp_e);}
+inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexp((double)__lcpp_x, __lcpp_e);}
+ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexp((double)__lcpp_x, __lcpp_e);}
// log
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return logf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return ::logf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log(_A1 __lcpp_x) _NOEXCEPT {return log((double)__lcpp_x);}
+log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
// log10
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return log10f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return log10l(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return ::log10f(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log10(_A1 __lcpp_x) _NOEXCEPT {return log10((double)__lcpp_x);}
+log10(_A1 __lcpp_x) _NOEXCEPT {return ::log10((double)__lcpp_x);}
// modf
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return modff(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return modfl(__lcpp_x, __lcpp_y);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return ::modff(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);}
#endif
// pow
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return powf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return powl(__lcpp_x, __lcpp_y);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::powf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);}
#endif
template <class _A1, class _A2>
@@ -877,129 +897,119 @@ pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return pow((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::pow((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// sin
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return sinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return sinl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return ::sinf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sin(_A1 __lcpp_x) _NOEXCEPT {return sin((double)__lcpp_x);}
+sin(_A1 __lcpp_x) _NOEXCEPT {return ::sin((double)__lcpp_x);}
// sinh
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return sinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return sinhl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return ::sinhf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sinh(_A1 __lcpp_x) _NOEXCEPT {return sinh((double)__lcpp_x);}
+sinh(_A1 __lcpp_x) _NOEXCEPT {return ::sinh((double)__lcpp_x);}
// sqrt
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return sqrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return sqrtl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return ::sqrtf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sqrt(_A1 __lcpp_x) _NOEXCEPT {return sqrt((double)__lcpp_x);}
+sqrt(_A1 __lcpp_x) _NOEXCEPT {return ::sqrt((double)__lcpp_x);}
// tan
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return tanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return tanl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return ::tanf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tan(_A1 __lcpp_x) _NOEXCEPT {return tan((double)__lcpp_x);}
+tan(_A1 __lcpp_x) _NOEXCEPT {return ::tan((double)__lcpp_x);}
// tanh
-#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__))
-inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return tanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return tanhl(__lcpp_x);}
+#if !(defined(_AIX) || defined(__sun__))
+inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return ::tanhf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);}
#endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tanh(_A1 __lcpp_x) _NOEXCEPT {return tanh((double)__lcpp_x);}
+tanh(_A1 __lcpp_x) _NOEXCEPT {return ::tanh((double)__lcpp_x);}
// acosh
-#ifndef _LIBCPP_MSVCRT
-inline _LIBCPP_INLINE_VISIBILITY float acosh(float __lcpp_x) _NOEXCEPT {return acoshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return acoshl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float acosh(float __lcpp_x) _NOEXCEPT {return ::acoshf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return ::acoshl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-acosh(_A1 __lcpp_x) _NOEXCEPT {return acosh((double)__lcpp_x);}
-#endif
+acosh(_A1 __lcpp_x) _NOEXCEPT {return ::acosh((double)__lcpp_x);}
// asinh
-#ifndef _LIBCPP_MSVCRT
-inline _LIBCPP_INLINE_VISIBILITY float asinh(float __lcpp_x) _NOEXCEPT {return asinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return asinhl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float asinh(float __lcpp_x) _NOEXCEPT {return ::asinhf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return ::asinhl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-asinh(_A1 __lcpp_x) _NOEXCEPT {return asinh((double)__lcpp_x);}
-#endif
+asinh(_A1 __lcpp_x) _NOEXCEPT {return ::asinh((double)__lcpp_x);}
// atanh
-#ifndef _LIBCPP_MSVCRT
-inline _LIBCPP_INLINE_VISIBILITY float atanh(float __lcpp_x) _NOEXCEPT {return atanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return atanhl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float atanh(float __lcpp_x) _NOEXCEPT {return ::atanhf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return ::atanhl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-atanh(_A1 __lcpp_x) _NOEXCEPT {return atanh((double)__lcpp_x);}
-#endif
+atanh(_A1 __lcpp_x) _NOEXCEPT {return ::atanh((double)__lcpp_x);}
// cbrt
-#ifndef _LIBCPP_MSVCRT
-inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return cbrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return cbrtl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return ::cbrtf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cbrt(_A1 __lcpp_x) _NOEXCEPT {return cbrt((double)__lcpp_x);}
-#endif
+cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
// copysign
-#if !defined(_VC_CRT_MAJOR_VERSION) || (_VC_CRT_MAJOR_VERSION < 12)
inline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x,
float __lcpp_y) _NOEXCEPT {
- return copysignf(__lcpp_x, __lcpp_y);
+ return ::copysignf(__lcpp_x, __lcpp_y);
}
inline _LIBCPP_INLINE_VISIBILITY long double
copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
- return copysignl(__lcpp_x, __lcpp_y);
+ return ::copysignl(__lcpp_x, __lcpp_y);
}
-#endif
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1014,55 +1024,53 @@ copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
-#ifndef _LIBCPP_MSVCRT
-
// erf
-inline _LIBCPP_INLINE_VISIBILITY float erf(float __lcpp_x) _NOEXCEPT {return erff(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return erfl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float erf(float __lcpp_x) _NOEXCEPT {return ::erff(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return ::erfl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-erf(_A1 __lcpp_x) _NOEXCEPT {return erf((double)__lcpp_x);}
+erf(_A1 __lcpp_x) _NOEXCEPT {return ::erf((double)__lcpp_x);}
// erfc
-inline _LIBCPP_INLINE_VISIBILITY float erfc(float __lcpp_x) _NOEXCEPT {return erfcf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return erfcl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float erfc(float __lcpp_x) _NOEXCEPT {return ::erfcf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return ::erfcl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-erfc(_A1 __lcpp_x) _NOEXCEPT {return erfc((double)__lcpp_x);}
+erfc(_A1 __lcpp_x) _NOEXCEPT {return ::erfc((double)__lcpp_x);}
// exp2
-inline _LIBCPP_INLINE_VISIBILITY float exp2(float __lcpp_x) _NOEXCEPT {return exp2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return exp2l(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float exp2(float __lcpp_x) _NOEXCEPT {return ::exp2f(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return ::exp2l(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-exp2(_A1 __lcpp_x) _NOEXCEPT {return exp2((double)__lcpp_x);}
+exp2(_A1 __lcpp_x) _NOEXCEPT {return ::exp2((double)__lcpp_x);}
// expm1
-inline _LIBCPP_INLINE_VISIBILITY float expm1(float __lcpp_x) _NOEXCEPT {return expm1f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return expm1l(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float expm1(float __lcpp_x) _NOEXCEPT {return ::expm1f(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return ::expm1l(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-expm1(_A1 __lcpp_x) _NOEXCEPT {return expm1((double)__lcpp_x);}
+expm1(_A1 __lcpp_x) _NOEXCEPT {return ::expm1((double)__lcpp_x);}
// fdim
-inline _LIBCPP_INLINE_VISIBILITY float fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fdimf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fdiml(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fdimf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fdiml(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1077,13 +1085,13 @@ fdim(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return fdim((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fdim((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// fma
-inline _LIBCPP_INLINE_VISIBILITY float fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT {return fmaf(__lcpp_x, __lcpp_y, __lcpp_z);}
-inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT {return fmal(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCPP_INLINE_VISIBILITY float fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT {return ::fmaf(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT {return ::fmal(__lcpp_x, __lcpp_y, __lcpp_z);}
template <class _A1, class _A2, class _A3>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1100,13 +1108,13 @@ fma(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value &&
std::is_same<_A3, __result_type>::value)), "");
- return fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
+ return ::fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
}
// fmax
-inline _LIBCPP_INLINE_VISIBILITY float fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fmaxf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmaxf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1121,13 +1129,13 @@ fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return fmax((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmax((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// fmin
-inline _LIBCPP_INLINE_VISIBILITY float fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fminf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fminl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fminf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fminl(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1142,13 +1150,13 @@ fmin(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return fmin((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmin((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// hypot
-inline _LIBCPP_INLINE_VISIBILITY float hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return hypotf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return hypotl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::hypotf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::hypotl(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1163,115 +1171,115 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// ilogb
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT {return ilogbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ilogbl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT {return ::ilogbf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ::ilogbl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, int>::type
-ilogb(_A1 __lcpp_x) _NOEXCEPT {return ilogb((double)__lcpp_x);}
+ilogb(_A1 __lcpp_x) _NOEXCEPT {return ::ilogb((double)__lcpp_x);}
// lgamma
-inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __lcpp_x) _NOEXCEPT {return lgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return lgammal(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __lcpp_x) _NOEXCEPT {return ::lgammaf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return ::lgammal(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-lgamma(_A1 __lcpp_x) _NOEXCEPT {return lgamma((double)__lcpp_x);}
+lgamma(_A1 __lcpp_x) _NOEXCEPT {return ::lgamma((double)__lcpp_x);}
// llrint
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT {return llrintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT {return llrintl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT {return ::llrintf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT {return ::llrintl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, long long>::type
-llrint(_A1 __lcpp_x) _NOEXCEPT {return llrint((double)__lcpp_x);}
+llrint(_A1 __lcpp_x) _NOEXCEPT {return ::llrint((double)__lcpp_x);}
// llround
-inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT {return llroundf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT {return llroundl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT {return ::llroundf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT {return ::llroundl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, long long>::type
-llround(_A1 __lcpp_x) _NOEXCEPT {return llround((double)__lcpp_x);}
+llround(_A1 __lcpp_x) _NOEXCEPT {return ::llround((double)__lcpp_x);}
// log1p
-inline _LIBCPP_INLINE_VISIBILITY float log1p(float __lcpp_x) _NOEXCEPT {return log1pf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return log1pl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float log1p(float __lcpp_x) _NOEXCEPT {return ::log1pf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return ::log1pl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log1p(_A1 __lcpp_x) _NOEXCEPT {return log1p((double)__lcpp_x);}
+log1p(_A1 __lcpp_x) _NOEXCEPT {return ::log1p((double)__lcpp_x);}
// log2
-inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return log2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return log2l(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return ::log2f(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log2(_A1 __lcpp_x) _NOEXCEPT {return log2((double)__lcpp_x);}
+log2(_A1 __lcpp_x) _NOEXCEPT {return ::log2((double)__lcpp_x);}
// logb
-inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return logbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return logbl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return ::logbf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return ::logbl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-logb(_A1 __lcpp_x) _NOEXCEPT {return logb((double)__lcpp_x);}
+logb(_A1 __lcpp_x) _NOEXCEPT {return ::logb((double)__lcpp_x);}
// lrint
-inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT {return lrintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT {return lrintl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT {return ::lrintf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT {return ::lrintl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, long>::type
-lrint(_A1 __lcpp_x) _NOEXCEPT {return lrint((double)__lcpp_x);}
+lrint(_A1 __lcpp_x) _NOEXCEPT {return ::lrint((double)__lcpp_x);}
// lround
-inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT {return lroundf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT {return lroundl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT {return ::lroundf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT {return ::lroundl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, long>::type
-lround(_A1 __lcpp_x) _NOEXCEPT {return lround((double)__lcpp_x);}
+lround(_A1 __lcpp_x) _NOEXCEPT {return ::lround((double)__lcpp_x);}
// nan
// nearbyint
-inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __lcpp_x) _NOEXCEPT {return nearbyintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return nearbyintl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __lcpp_x) _NOEXCEPT {return ::nearbyintf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return ::nearbyintl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-nearbyint(_A1 __lcpp_x) _NOEXCEPT {return nearbyint((double)__lcpp_x);}
+nearbyint(_A1 __lcpp_x) _NOEXCEPT {return ::nearbyint((double)__lcpp_x);}
// nextafter
-inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return nextafterf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nextafterl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::nextafterf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nextafterl(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1286,23 +1294,23 @@ nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// nexttoward
-inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttowardf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttowardl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardl(__lcpp_x, __lcpp_y);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((double)__lcpp_x, __lcpp_y);}
+nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttoward((double)__lcpp_x, __lcpp_y);}
// remainder
-inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return remainderf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return remainderl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::remainderf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::remainderl(__lcpp_x, __lcpp_y);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1317,13 +1325,13 @@ remainder(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return remainder((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::remainder((__result_type)__lcpp_x, (__result_type)__lcpp_y);
}
// remquo
-inline _LIBCPP_INLINE_VISIBILITY float remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT {return remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
-inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCPP_INLINE_VISIBILITY float remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1338,70 +1346,68 @@ remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) _NOEXCEPT
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::is_same<_A1, __result_type>::value &&
std::is_same<_A2, __result_type>::value)), "");
- return remquo((__result_type)__lcpp_x, (__result_type)__lcpp_y, __lcpp_z);
+ return ::remquo((__result_type)__lcpp_x, (__result_type)__lcpp_y, __lcpp_z);
}
// rint
-inline _LIBCPP_INLINE_VISIBILITY float rint(float __lcpp_x) _NOEXCEPT {return rintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT {return rintl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float rint(float __lcpp_x) _NOEXCEPT {return ::rintf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT {return ::rintl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-rint(_A1 __lcpp_x) _NOEXCEPT {return rint((double)__lcpp_x);}
+rint(_A1 __lcpp_x) _NOEXCEPT {return ::rint((double)__lcpp_x);}
// round
-inline _LIBCPP_INLINE_VISIBILITY float round(float __lcpp_x) _NOEXCEPT {return roundf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT {return roundl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float round(float __lcpp_x) _NOEXCEPT {return ::roundf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT {return ::roundl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-round(_A1 __lcpp_x) _NOEXCEPT {return round((double)__lcpp_x);}
+round(_A1 __lcpp_x) _NOEXCEPT {return ::round((double)__lcpp_x);}
// scalbln
-inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalblnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalblnl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnl(__lcpp_x, __lcpp_y);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-scalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalbln((double)__lcpp_x, __lcpp_y);}
+scalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalbln((double)__lcpp_x, __lcpp_y);}
// scalbn
-inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnf(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbn((double)__lcpp_x, __lcpp_y);}
+scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
// tgamma
-inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __lcpp_x) _NOEXCEPT {return tgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return tgammal(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __lcpp_x) _NOEXCEPT {return ::tgammaf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return ::tgammal(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tgamma(_A1 __lcpp_x) _NOEXCEPT {return tgamma((double)__lcpp_x);}
+tgamma(_A1 __lcpp_x) _NOEXCEPT {return ::tgamma((double)__lcpp_x);}
// trunc
-inline _LIBCPP_INLINE_VISIBILITY float trunc(float __lcpp_x) _NOEXCEPT {return truncf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT {return truncl(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY float trunc(float __lcpp_x) _NOEXCEPT {return ::truncf(__lcpp_x);}
+inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT {return ::truncl(__lcpp_x);}
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-trunc(_A1 __lcpp_x) _NOEXCEPT {return trunc((double)__lcpp_x);}
-
-#endif // !_LIBCPP_MSVCRT
+trunc(_A1 __lcpp_x) _NOEXCEPT {return ::trunc((double)__lcpp_x);}
} // extern "C++"
diff --git a/include/memory b/include/memory
index 2a25f0ecb507..44a0c34e43e1 100644
--- a/include/memory
+++ b/include/memory
@@ -208,10 +208,10 @@ template <class ForwardIterator>
template <class ForwardIterator, class Size>
ForwardIterator uninitialized_default_construct_n(ForwardIterator first, Size n);
-template <class Y> struct auto_ptr_ref {};
+template <class Y> struct auto_ptr_ref {}; // removed in C++17
template<class X>
-class auto_ptr
+class auto_ptr // removed in C++17
{
public:
typedef X element_type;
@@ -270,7 +270,7 @@ public:
template <class U, class E>
unique_ptr(unique_ptr<U, E>&& u) noexcept;
template <class U>
- unique_ptr(auto_ptr<U>&& u) noexcept;
+ unique_ptr(auto_ptr<U>&& u) noexcept; // removed in C++17
// destructor
~unique_ptr();
@@ -404,7 +404,7 @@ public:
shared_ptr(shared_ptr&& r) noexcept;
template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
- template<class Y> shared_ptr(auto_ptr<Y>&& r);
+ template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
shared_ptr(nullptr_t) : shared_ptr() { }
@@ -416,7 +416,7 @@ public:
template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
shared_ptr& operator=(shared_ptr&& r) noexcept;
template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
- template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r);
+ template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
// modifiers:
@@ -433,8 +433,8 @@ public:
long use_count() const noexcept;
bool unique() const noexcept;
explicit operator bool() const noexcept;
- template<class U> bool owner_before(shared_ptr<U> const& b) const;
- template<class U> bool owner_before(weak_ptr<U> const& b) const;
+ template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
+ template<class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
};
// shared_ptr comparisons:
@@ -531,8 +531,8 @@ public:
long use_count() const noexcept;
bool expired() const noexcept;
shared_ptr<T> lock() const noexcept;
- template<class U> bool owner_before(shared_ptr<U> const& b) const;
- template<class U> bool owner_before(weak_ptr<U> const& b) const;
+ template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
+ template<class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
};
// weak_ptr specialized algorithms:
@@ -546,9 +546,9 @@ struct owner_less<shared_ptr<T>>
: binary_function<shared_ptr<T>, shared_ptr<T>, bool>
{
typedef bool result_type;
- bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const;
- bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
- bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
+ bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
+ bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+ bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
};
template<class T>
@@ -556,9 +556,24 @@ struct owner_less<weak_ptr<T>>
: binary_function<weak_ptr<T>, weak_ptr<T>, bool>
{
typedef bool result_type;
- bool operator()(weak_ptr<T> const&, weak_ptr<T> const&) const;
- bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
- bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
+ bool operator()(weak_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+ bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+ bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
+};
+
+template <> // Added in C++14
+struct owner_less<void>
+{
+ template <class _Tp, class _Up>
+ bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
+ template <class _Tp, class _Up>
+ bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
+ template <class _Tp, class _Up>
+ bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
+ template <class _Tp, class _Up>
+ bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
+
+ typedef void is_transparent;
};
template<class T>
@@ -638,7 +653,7 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
#include <tuple>
#include <stdexcept>
#include <cstring>
-
+#include <cassert>
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
# include <atomic>
#endif
@@ -1542,26 +1557,26 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
#else // _LIBCPP_HAS_NO_VARIADICS
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
- static void construct(allocator_type& __a, _Tp* __p)
+ static void construct(allocator_type&, _Tp* __p)
{
::new ((void*)__p) _Tp();
}
template <class _Tp, class _A0>
_LIBCPP_INLINE_VISIBILITY
- static void construct(allocator_type& __a, _Tp* __p, const _A0& __a0)
+ static void construct(allocator_type&, _Tp* __p, const _A0& __a0)
{
::new ((void*)__p) _Tp(__a0);
}
template <class _Tp, class _A0, class _A1>
_LIBCPP_INLINE_VISIBILITY
- static void construct(allocator_type& __a, _Tp* __p, const _A0& __a0,
+ static void construct(allocator_type&, _Tp* __p, const _A0& __a0,
const _A1& __a1)
{
::new ((void*)__p) _Tp(__a0, __a1);
}
template <class _Tp, class _A0, class _A1, class _A2>
_LIBCPP_INLINE_VISIBILITY
- static void construct(allocator_type& __a, _Tp* __p, const _A0& __a0,
+ static void construct(allocator_type&, _Tp* __p, const _A0& __a0,
const _A1& __a1, const _A2& __a2)
{
::new ((void*)__p) _Tp(__a0, __a1, __a2);
@@ -1996,6 +2011,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void return_temporary_buffer(_Tp* __p) _NOEXCEPT {::operator delete(__p);}
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template <class _Tp>
struct auto_ptr_ref
{
@@ -2052,776 +2068,815 @@ class _LIBCPP_TEMPLATE_VIS auto_ptr<void>
public:
typedef void element_type;
};
+#endif
-template <class _T1, class _T2, bool = is_same<typename remove_cv<_T1>::type,
- typename remove_cv<_T2>::type>::value,
- bool = is_empty<_T1>::value
- && !__libcpp_is_final<_T1>::value,
- bool = is_empty<_T2>::value
- && !__libcpp_is_final<_T2>::value
- >
-struct __libcpp_compressed_pair_switch;
+template <class _Tp, int _Idx,
+ bool _CanBeEmptyBase =
+ is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
+struct __compressed_pair_elem {
+ typedef _Tp _ParamT;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+
+#ifndef _LIBCPP_CXX03_LANG
+ template <bool _Dummy = true, class = typename enable_if<
+ __dependent_type<is_default_constructible<_Tp>, _Dummy>::value
+ >::type
+ >
+ _LIBCPP_CONSTEXPR __compressed_pair_elem()
+ _NOEXCEPT_(is_nothrow_default_constructible<_Tp>::value)
+ : __value_() {}
+
+ template <class _Up, class = typename enable_if<
+ !is_same<__compressed_pair_elem, _Up>::value>::type>
+ _LIBCPP_CONSTEXPR explicit
+ __compressed_pair_elem(_Up&& __u)
+ : __value_(_VSTD::forward<_Up>(__u)){};
+
+ template <class... _Args, size_t... _Indexes>
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args,
+ __tuple_indices<_Indexes...>)
+ : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
+#else
+ __compressed_pair_elem() : __value_() {}
+ __compressed_pair_elem(_ParamT __p) : __value_(std::forward<_ParamT>(__p)) {}
+#endif
-template <class _T1, class _T2, bool IsSame>
-struct __libcpp_compressed_pair_switch<_T1, _T2, IsSame, false, false> {enum {value = 0};};
+ reference __get() _NOEXCEPT { return __value_; }
+ const_reference __get() const _NOEXCEPT { return __value_; }
-template <class _T1, class _T2, bool IsSame>
-struct __libcpp_compressed_pair_switch<_T1, _T2, IsSame, true, false> {enum {value = 1};};
+private:
+ _Tp __value_;
+};
-template <class _T1, class _T2, bool IsSame>
-struct __libcpp_compressed_pair_switch<_T1, _T2, IsSame, false, true> {enum {value = 2};};
+template <class _Tp, int _Idx>
+struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
+ typedef _Tp _ParamT;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp __value_type;
-template <class _T1, class _T2>
-struct __libcpp_compressed_pair_switch<_T1, _T2, false, true, true> {enum {value = 3};};
+#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_CONSTEXPR __compressed_pair_elem() = default;
+
+ template <class _Up, class = typename enable_if<
+ !is_same<__compressed_pair_elem, _Up>::value>::type>
+ _LIBCPP_CONSTEXPR explicit
+ __compressed_pair_elem(_Up&& __u)
+ : __value_type(_VSTD::forward<_Up>(__u)){};
+
+ template <class... _Args, size_t... _Indexes>
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args,
+ __tuple_indices<_Indexes...>)
+ : __value_type(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
+#else
+ __compressed_pair_elem() : __value_type() {}
+ __compressed_pair_elem(_ParamT __p)
+ : __value_type(std::forward<_ParamT>(__p)) {}
+#endif
-template <class _T1, class _T2>
-struct __libcpp_compressed_pair_switch<_T1, _T2, true, true, true> {enum {value = 1};};
+ reference __get() _NOEXCEPT { return *this; }
+ const_reference __get() const _NOEXCEPT { return *this; }
+};
-template <class _T1, class _T2, unsigned = __libcpp_compressed_pair_switch<_T1, _T2>::value>
-class __libcpp_compressed_pair_imp;
+// Tag used to construct the second element of the compressed pair.
+struct __second_tag {};
template <class _T1, class _T2>
-class __libcpp_compressed_pair_imp<_T1, _T2, 0>
-{
-private:
- _T1 __first_;
- _T2 __second_;
+class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
+ private __compressed_pair_elem<_T2, 1> {
+ typedef __compressed_pair_elem<_T1, 0> _Base1;
+ typedef __compressed_pair_elem<_T2, 1> _Base2;
+
+ // NOTE: This static assert should never fire because __compressed_pair
+ // is *almost never* used in a scenario where it's possible for T1 == T2.
+ // (The exception is std::function where it is possible that the function
+ // object and the allocator have the same type).
+ static_assert((!is_same<_T1, _T2>::value),
+ "__compressed_pair cannot be instantated when T1 and T2 are the same type; "
+ "The current implementation is NOT ABI-compatible with the previous "
+ "implementation for this configuration");
+
public:
- typedef _T1 _T1_param;
- typedef _T2 _T2_param;
+#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_INLINE_VISIBILITY
+ __compressed_pair() = default;
+
+ template <class _Tp, typename enable_if<!is_same<typename decay<_Tp>::type,
+ __compressed_pair>::value,
+ bool>::type = true>
+ _LIBCPP_INLINE_VISIBILITY constexpr explicit
+ __compressed_pair(_Tp&& __t)
+ : _Base1(std::forward<_Tp>(__t)), _Base2() {}
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY constexpr
+ __compressed_pair(__second_tag, _Tp&& __t)
+ : _Base1(), _Base2(std::forward<_Tp>(__t)) {}
+
+ template <class _U1, class _U2>
+ _LIBCPP_INLINE_VISIBILITY constexpr
+ __compressed_pair(_U1&& __t1, _U2&& __t2)
+ : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
+
+ template <class... _Args1, class... _Args2>
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
+ tuple<_Args2...> __second_args)
+ : _Base1(__pc, _VSTD::move(__first_args),
+ typename __make_tuple_indices<sizeof...(_Args1)>::type()),
+ _Base2(__pc, _VSTD::move(__second_args),
+ typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
- typedef typename remove_reference<_T1>::type& _T1_reference;
- typedef typename remove_reference<_T2>::type& _T2_reference;
+#else
+ _LIBCPP_INLINE_VISIBILITY
+ __compressed_pair() {}
- typedef const typename remove_reference<_T1>::type& _T1_const_reference;
- typedef const typename remove_reference<_T2>::type& _T2_const_reference;
+ _LIBCPP_INLINE_VISIBILITY explicit
+ __compressed_pair(_T1 __t1) : _Base1(_VSTD::forward<_T1>(__t1)) {}
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_(), __second_() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : __first_(_VSTD::forward<_T1_param>(__t1)), __second_() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : __first_(), __second_(_VSTD::forward<_T2_param>(__t2)) {}
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
- : __first_(_VSTD::forward<_T1_param>(__t1)), __second_(_VSTD::forward<_T2_param>(__t2)) {}
+ _LIBCPP_INLINE_VISIBILITY
+ __compressed_pair(__second_tag, _T2 __t2)
+ : _Base1(), _Base2(_VSTD::forward<_T2>(__t2)) {}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
+ __compressed_pair(_T1 __t1, _T2 __t2)
+ : _Base1(_VSTD::forward<_T1>(__t1)), _Base2(_VSTD::forward<_T2>(__t2)) {}
+#endif
- template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
- _LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t,
- tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args,
- __tuple_indices<_I1...>,
- __tuple_indices<_I2...>)
- : __first_(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
- __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
- {}
+ _LIBCPP_INLINE_VISIBILITY
+ typename _Base1::reference first() _NOEXCEPT {
+ return static_cast<_Base1&>(*this).__get();
+ }
-#endif // _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
+ typename _Base1::const_reference first() const _NOEXCEPT {
+ return static_cast<_Base1 const&>(*this).__get();
+ }
- _LIBCPP_INLINE_VISIBILITY _T1_reference first() _NOEXCEPT {return __first_;}
- _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return __first_;}
+ _LIBCPP_INLINE_VISIBILITY
+ typename _Base2::reference second() _NOEXCEPT {
+ return static_cast<_Base2&>(*this).__get();
+ }
- _LIBCPP_INLINE_VISIBILITY _T2_reference second() _NOEXCEPT {return __second_;}
- _LIBCPP_INLINE_VISIBILITY _T2_const_reference second() const _NOEXCEPT {return __second_;}
+ _LIBCPP_INLINE_VISIBILITY
+ typename _Base2::const_reference second() const _NOEXCEPT {
+ return static_cast<_Base2 const&>(*this).__get();
+ }
- _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {
- using _VSTD::swap;
- swap(__first_, __x.__first_);
- swap(__second_, __x.__second_);
- }
+ _LIBCPP_INLINE_VISIBILITY
+ void swap(__compressed_pair& __x)
+ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
+ __is_nothrow_swappable<_T2>::value)
+ {
+ using std::swap;
+ swap(first(), __x.first());
+ swap(second(), __x.second());
+ }
};
template <class _T1, class _T2>
-class __libcpp_compressed_pair_imp<_T1, _T2, 1>
- : private _T1
-{
-private:
- _T2 __second_;
-public:
- typedef _T1 _T1_param;
- typedef _T2 _T2_param;
-
- typedef _T1& _T1_reference;
- typedef typename remove_reference<_T2>::type& _T2_reference;
-
- typedef const _T1& _T1_const_reference;
- typedef const typename remove_reference<_T2>::type& _T2_const_reference;
-
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __second_() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : _T1(_VSTD::forward<_T1_param>(__t1)), __second_() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : __second_(_VSTD::forward<_T2_param>(__t2)) {}
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
- : _T1(_VSTD::forward<_T1_param>(__t1)), __second_(_VSTD::forward<_T2_param>(__t2)) {}
-
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
- template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
- _LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t,
- tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args,
- __tuple_indices<_I1...>,
- __tuple_indices<_I2...>)
- : _T1(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
- __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
- {}
-
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
- _LIBCPP_INLINE_VISIBILITY _T1_reference first() _NOEXCEPT {return *this;}
- _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return *this;}
+inline _LIBCPP_INLINE_VISIBILITY
+void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
+ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
+ __is_nothrow_swappable<_T2>::value) {
+ __x.swap(__y);
+}
- _LIBCPP_INLINE_VISIBILITY _T2_reference second() _NOEXCEPT {return __second_;}
- _LIBCPP_INLINE_VISIBILITY _T2_const_reference second() const _NOEXCEPT {return __second_;}
+// default_delete
- _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {
- using _VSTD::swap;
- swap(__second_, __x.__second_);
- }
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS default_delete {
+#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_INLINE_VISIBILITY constexpr default_delete() noexcept = default;
+#else
+ _LIBCPP_INLINE_VISIBILITY default_delete() {}
+#endif
+ template <class _Up>
+ _LIBCPP_INLINE_VISIBILITY
+ default_delete(const default_delete<_Up>&,
+ typename enable_if<is_convertible<_Up*, _Tp*>::value>::type* =
+ 0) _NOEXCEPT {}
+
+ _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {
+ static_assert(sizeof(_Tp) > 0,
+ "default_delete can not delete incomplete type");
+ static_assert(!is_void<_Tp>::value,
+ "default_delete can not delete incomplete type");
+ delete __ptr;
+ }
};
-template <class _T1, class _T2>
-class __libcpp_compressed_pair_imp<_T1, _T2, 2>
- : private _T2
-{
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> {
private:
- _T1 __first_;
-public:
- typedef _T1 _T1_param;
- typedef _T2 _T2_param;
+ template <class _Up>
+ struct _EnableIfConvertible
+ : enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value> {};
- typedef typename remove_reference<_T1>::type& _T1_reference;
- typedef _T2& _T2_reference;
-
- typedef const typename remove_reference<_T1>::type& _T1_const_reference;
- typedef const _T2& _T2_const_reference;
-
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : __first_(_VSTD::forward<_T1_param>(__t1)) {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : _T2(_VSTD::forward<_T2_param>(__t2)), __first_() {}
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
- _NOEXCEPT_(is_nothrow_move_constructible<_T1>::value &&
- is_nothrow_move_constructible<_T2>::value)
- : _T2(_VSTD::forward<_T2_param>(__t2)), __first_(_VSTD::forward<_T1_param>(__t1)) {}
+public:
+#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_INLINE_VISIBILITY constexpr default_delete() noexcept = default;
+#else
+ _LIBCPP_INLINE_VISIBILITY default_delete() {}
+#endif
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+ template <class _Up>
+ _LIBCPP_INLINE_VISIBILITY
+ default_delete(const default_delete<_Up[]>&,
+ typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}
+
+ template <class _Up>
+ _LIBCPP_INLINE_VISIBILITY
+ typename _EnableIfConvertible<_Up>::type
+ operator()(_Up* __ptr) const _NOEXCEPT {
+ static_assert(sizeof(_Tp) > 0,
+ "default_delete can not delete incomplete type");
+ static_assert(!is_void<_Tp>::value,
+ "default_delete can not delete void type");
+ delete[] __ptr;
+ }
+};
- template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
- _LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t,
- tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args,
- __tuple_indices<_I1...>,
- __tuple_indices<_I2...>)
- : _T2(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...),
- __first_(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...)
-
- {}
-#endif // _LIBCPP_HAS_NO_VARIADICS
- _LIBCPP_INLINE_VISIBILITY _T1_reference first() _NOEXCEPT {return __first_;}
- _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return __first_;}
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Deleter>
+struct __unique_ptr_deleter_sfinae {
+ static_assert(!is_reference<_Deleter>::value, "incorrect specialization");
+ typedef const _Deleter& __lval_ref_type;
+ typedef _Deleter&& __good_rval_ref_type;
+ typedef true_type __enable_rval_overload;
+};
- _LIBCPP_INLINE_VISIBILITY _T2_reference second() _NOEXCEPT {return *this;}
- _LIBCPP_INLINE_VISIBILITY _T2_const_reference second() const _NOEXCEPT {return *this;}
+template <class _Deleter>
+struct __unique_ptr_deleter_sfinae<_Deleter const&> {
+ typedef const _Deleter& __lval_ref_type;
+ typedef const _Deleter&& __bad_rval_ref_type;
+ typedef false_type __enable_rval_overload;
+};
- _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {
- using _VSTD::swap;
- swap(__first_, __x.__first_);
- }
+template <class _Deleter>
+struct __unique_ptr_deleter_sfinae<_Deleter&> {
+ typedef _Deleter& __lval_ref_type;
+ typedef _Deleter&& __bad_rval_ref_type;
+ typedef false_type __enable_rval_overload;
};
+#endif // !defined(_LIBCPP_CXX03_LANG)
-template <class _T1, class _T2>
-class __libcpp_compressed_pair_imp<_T1, _T2, 3>
- : private _T1,
- private _T2
-{
+template <class _Tp, class _Dp = default_delete<_Tp> >
+class _LIBCPP_TEMPLATE_VIS unique_ptr {
public:
- typedef _T1 _T1_param;
- typedef _T2 _T2_param;
-
- typedef _T1& _T1_reference;
- typedef _T2& _T2_reference;
-
- typedef const _T1& _T1_const_reference;
- typedef const _T2& _T2_const_reference;
-
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)
- : _T1(_VSTD::forward<_T1_param>(__t1)) {}
- _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2)
- : _T2(_VSTD::forward<_T2_param>(__t2)) {}
- _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
- : _T1(_VSTD::forward<_T1_param>(__t1)), _T2(_VSTD::forward<_T2_param>(__t2)) {}
-
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+ typedef _Tp element_type;
+ typedef _Dp deleter_type;
+ typedef typename __pointer_type<_Tp, deleter_type>::type pointer;
- template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
- _LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t,
- tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args,
- __tuple_indices<_I1...>,
- __tuple_indices<_I2...>)
- : _T1(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
- _T2(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
- {}
-
-#endif // _LIBCPP_HAS_NO_VARIADICS
+ static_assert(!is_rvalue_reference<deleter_type>::value,
+ "the specified deleter type cannot be an rvalue reference");
- _LIBCPP_INLINE_VISIBILITY _T1_reference first() _NOEXCEPT {return *this;}
- _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return *this;}
+private:
+ __compressed_pair<pointer, deleter_type> __ptr_;
- _LIBCPP_INLINE_VISIBILITY _T2_reference second() _NOEXCEPT {return *this;}
- _LIBCPP_INLINE_VISIBILITY _T2_const_reference second() const _NOEXCEPT {return *this;}
+ struct __nat { int __for_bool_; };
- _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp&)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {
- }
-};
+#ifndef _LIBCPP_CXX03_LANG
+ typedef __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
+
+ template <bool _Dummy>
+ using _LValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;
+
+ template <bool _Dummy>
+ using _GoodRValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;
+
+ template <bool _Dummy>
+ using _BadRValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;
+
+ template <bool _Dummy, class _Deleter = typename __dependent_type<
+ __identity<deleter_type>, _Dummy>::type>
+ using _EnableIfDeleterDefaultConstructible =
+ typename enable_if<is_default_constructible<_Deleter>::value &&
+ !is_pointer<_Deleter>::value>::type;
+
+ template <class _ArgType>
+ using _EnableIfDeleterConstructible =
+ typename enable_if<is_constructible<deleter_type, _ArgType>::value>::type;
+
+ template <class _UPtr, class _Up>
+ using _EnableIfMoveConvertible = typename enable_if<
+ is_convertible<typename _UPtr::pointer, pointer>::value &&
+ !is_array<_Up>::value
+ >::type;
+
+ template <class _UDel>
+ using _EnableIfDeleterConvertible = typename enable_if<
+ (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
+ (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
+ >::type;
+
+ template <class _UDel>
+ using _EnableIfDeleterAssignable = typename enable_if<
+ is_assignable<_Dp&, _UDel&&>::value
+ >::type;
-template <class _T1, class _T2>
-class __compressed_pair
- : private __libcpp_compressed_pair_imp<_T1, _T2>
-{
- typedef __libcpp_compressed_pair_imp<_T1, _T2> base;
public:
- typedef typename base::_T1_param _T1_param;
- typedef typename base::_T2_param _T2_param;
-
- typedef typename base::_T1_reference _T1_reference;
- typedef typename base::_T2_reference _T2_reference;
-
- typedef typename base::_T1_const_reference _T1_const_reference;
- typedef typename base::_T2_const_reference _T2_const_reference;
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>>
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr unique_ptr() noexcept : __ptr_(pointer()) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>>
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr unique_ptr(nullptr_t) noexcept : __ptr_(pointer()) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>>
+ _LIBCPP_INLINE_VISIBILITY
+ explicit unique_ptr(pointer __p) noexcept : __ptr_(__p) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_LValRefType<_Dummy>>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(pointer __p, _LValRefType<_Dummy> __d) noexcept
+ : __ptr_(__p, __d) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy>>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) noexcept
+ : __ptr_(__p, _VSTD::move(__d)) {
+ static_assert(!is_reference<deleter_type>::value,
+ "rvalue deleter bound to reference");
+ }
- _LIBCPP_INLINE_VISIBILITY __compressed_pair() {}
- _LIBCPP_INLINE_VISIBILITY explicit __compressed_pair(_T1_param __t1)
- : base(_VSTD::forward<_T1_param>(__t1)) {}
- _LIBCPP_INLINE_VISIBILITY explicit __compressed_pair(_T2_param __t2)
- : base(_VSTD::forward<_T2_param>(__t2)) {}
- _LIBCPP_INLINE_VISIBILITY __compressed_pair(_T1_param __t1, _T2_param __t2)
- : base(_VSTD::forward<_T1_param>(__t1), _VSTD::forward<_T2_param>(__t2)) {}
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy>>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(unique_ptr&& __u) noexcept
+ : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
+ }
- template <class... _Args1, class... _Args2>
- _LIBCPP_INLINE_VISIBILITY
- __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args)
- : base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
- typename __make_tuple_indices<sizeof...(_Args1)>::type(),
- typename __make_tuple_indices<sizeof...(_Args2) >::type())
- {}
+ template <class _Up, class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterConvertible<_Ep>
+ >
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
+ : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}
+
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+ template <class _Up>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(auto_ptr<_Up>&& __p,
+ typename enable_if<is_convertible<_Up*, _Tp*>::value &&
+ is_same<_Dp, default_delete<_Tp>>::value,
+ __nat>::type = __nat()) _NOEXCEPT
+ : __ptr_(__p.release()) {}
+#endif
-#endif // _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
+ reset(__u.release());
+ __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
+ return *this;
+ }
- _LIBCPP_INLINE_VISIBILITY _T1_reference first() _NOEXCEPT {return base::first();}
- _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return base::first();}
+ template <class _Up, class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterAssignable<_Ep>
+ >
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
+ reset(__u.release());
+ __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
+ return *this;
+ }
- _LIBCPP_INLINE_VISIBILITY _T2_reference second() _NOEXCEPT {return base::second();}
- _LIBCPP_INLINE_VISIBILITY _T2_const_reference second() const _NOEXCEPT {return base::second();}
+#else // _LIBCPP_CXX03_LANG
+private:
+ unique_ptr(unique_ptr&);
+ template <class _Up, class _Ep> unique_ptr(unique_ptr<_Up, _Ep>&);
- _LIBCPP_INLINE_VISIBILITY void swap(__compressed_pair& __x)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {base::swap(__x);}
-};
+ unique_ptr& operator=(unique_ptr&);
+ template <class _Up, class _Ep> unique_ptr& operator=(unique_ptr<_Up, _Ep>&);
-template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
-void
-swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
- __is_nothrow_swappable<_T2>::value)
- {__x.swap(__y);}
-
-// __same_or_less_cv_qualified
-
-template <class _Ptr1, class _Ptr2,
- bool = is_same<typename remove_cv<typename pointer_traits<_Ptr1>::element_type>::type,
- typename remove_cv<typename pointer_traits<_Ptr2>::element_type>::type
- >::value
- >
-struct __same_or_less_cv_qualified_imp
- : is_convertible<_Ptr1, _Ptr2> {};
-
-template <class _Ptr1, class _Ptr2>
-struct __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false>
- : false_type {};
-
-template <class _Ptr1, class _Ptr2, bool = is_pointer<_Ptr1>::value ||
- is_same<_Ptr1, _Ptr2>::value ||
- __has_element_type<_Ptr1>::value>
-struct __same_or_less_cv_qualified
- : __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
-
-template <class _Ptr1, class _Ptr2>
-struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, false>
- : false_type {};
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr() : __ptr_(pointer())
+ {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ static_assert(is_default_constructible<deleter_type>::value,
+ "unique_ptr::deleter_type is not default constructible");
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(nullptr_t) : __ptr_(pointer())
+ {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ explicit unique_ptr(pointer __p)
+ : __ptr_(_VSTD::move(__p)) {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ }
-// default_delete
+ _LIBCPP_INLINE_VISIBILITY
+ operator __rv<unique_ptr>() {
+ return __rv<unique_ptr>(*this);
+ }
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete
-{
-#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT = default;
-#else
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT {}
-#endif
- template <class _Up>
- _LIBCPP_INLINE_VISIBILITY default_delete(const default_delete<_Up>&,
- typename enable_if<is_convertible<_Up*, _Tp*>::value>::type* = 0) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY void operator() (_Tp* __ptr) const _NOEXCEPT
- {
- static_assert(sizeof(_Tp) > 0, "default_delete can not delete incomplete type");
- static_assert(!is_void<_Tp>::value, "default_delete can not delete incomplete type");
- delete __ptr;
- }
-};
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(__rv<unique_ptr> __u)
+ : __ptr_(__u->release(),
+ _VSTD::forward<deleter_type>(__u->get_deleter())) {}
+
+ template <class _Up, class _Ep>
+ _LIBCPP_INLINE_VISIBILITY
+ typename enable_if<
+ !is_array<_Up>::value &&
+ is_convertible<typename unique_ptr<_Up, _Ep>::pointer,
+ pointer>::value &&
+ is_assignable<deleter_type&, _Ep&>::value,
+ unique_ptr&>::type
+ operator=(unique_ptr<_Up, _Ep> __u) {
+ reset(__u.release());
+ __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
+ return *this;
+ }
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]>
-{
-public:
-#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT = default;
-#else
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(pointer __p, deleter_type __d)
+ : __ptr_(_VSTD::move(__p), _VSTD::move(__d)) {}
+#endif // _LIBCPP_CXX03_LANG
+
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+ template <class _Up>
+ _LIBCPP_INLINE_VISIBILITY
+ typename enable_if<is_convertible<_Up*, _Tp*>::value &&
+ is_same<_Dp, default_delete<_Tp> >::value,
+ unique_ptr&>::type
+ operator=(auto_ptr<_Up> __p) {
+ reset(__p.release());
+ return *this;
+ }
#endif
- template <class _Up>
- _LIBCPP_INLINE_VISIBILITY default_delete(const default_delete<_Up[]>&,
- typename enable_if<__same_or_less_cv_qualified<_Up*, _Tp*>::value>::type* = 0) _NOEXCEPT {}
- template <class _Up>
- _LIBCPP_INLINE_VISIBILITY
- void operator() (_Up* __ptr,
- typename enable_if<__same_or_less_cv_qualified<_Up*, _Tp*>::value>::type* = 0) const _NOEXCEPT
- {
- static_assert(sizeof(_Tp) > 0, "default_delete can not delete incomplete type");
- static_assert(!is_void<_Tp>::value, "default_delete can not delete void type");
- delete [] __ptr;
- }
-};
-template <class _Tp, class _Dp = default_delete<_Tp> >
-class _LIBCPP_TEMPLATE_VIS unique_ptr
-{
-public:
- typedef _Tp element_type;
- typedef _Dp deleter_type;
- typedef typename __pointer_type<_Tp, deleter_type>::type pointer;
-private:
- __compressed_pair<pointer, deleter_type> __ptr_;
-
-#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- unique_ptr(unique_ptr&);
- template <class _Up, class _Ep>
- unique_ptr(unique_ptr<_Up, _Ep>&);
- unique_ptr& operator=(unique_ptr&);
- template <class _Up, class _Ep>
- unique_ptr& operator=(unique_ptr<_Up, _Ep>&);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
+ ~unique_ptr() { reset(); }
- struct __nat {int __for_bool_;};
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ reset();
+ return *this;
+ }
- typedef typename remove_reference<deleter_type>::type& _Dp_reference;
- typedef const typename remove_reference<deleter_type>::type& _Dp_const_reference;
-public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT
- : __ptr_(pointer())
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT
- : __ptr_(pointer())
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
- _LIBCPP_INLINE_VISIBILITY explicit unique_ptr(pointer __p) _NOEXCEPT
- : __ptr_(_VSTD::move(__p))
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
+ _LIBCPP_INLINE_VISIBILITY
+ typename add_lvalue_reference<_Tp>::type
+ operator*() const {
+ return *__ptr_.first();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ pointer operator->() const _NOEXCEPT {
+ return __ptr_.first();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ pointer get() const _NOEXCEPT {
+ return __ptr_.first();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ deleter_type& get_deleter() _NOEXCEPT {
+ return __ptr_.second();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ const deleter_type& get_deleter() const _NOEXCEPT {
+ return __ptr_.second();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {
+ return __ptr_.first() != nullptr;
+ }
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename conditional<
- is_reference<deleter_type>::value,
- deleter_type,
- typename add_lvalue_reference<const deleter_type>::type>::type __d)
- _NOEXCEPT
- : __ptr_(__p, __d) {}
+ _LIBCPP_INLINE_VISIBILITY
+ pointer release() _NOEXCEPT {
+ pointer __t = __ptr_.first();
+ __ptr_.first() = pointer();
+ return __t;
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename remove_reference<deleter_type>::type&& __d)
- _NOEXCEPT
- : __ptr_(__p, _VSTD::move(__d))
- {
- static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
- }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}
- template <class _Up, class _Ep>
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr<_Up, _Ep>&& __u,
- typename enable_if
- <
- !is_array<_Up>::value &&
- is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>::value &&
- is_convertible<_Ep, deleter_type>::value &&
- (
- !is_reference<deleter_type>::value ||
- is_same<deleter_type, _Ep>::value
- ),
- __nat
- >::type = __nat()) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}
+ _LIBCPP_INLINE_VISIBILITY
+ void reset(pointer __p = pointer()) _NOEXCEPT {
+ pointer __tmp = __ptr_.first();
+ __ptr_.first() = __p;
+ if (__tmp)
+ __ptr_.second()(__tmp);
+ }
- template <class _Up>
- _LIBCPP_INLINE_VISIBILITY unique_ptr(auto_ptr<_Up>&& __p,
- typename enable_if<
- is_convertible<_Up*, _Tp*>::value &&
- is_same<_Dp, default_delete<_Tp> >::value,
- __nat
- >::type = __nat()) _NOEXCEPT
- : __ptr_(__p.release())
- {
- }
+ _LIBCPP_INLINE_VISIBILITY
+ void swap(unique_ptr& __u) _NOEXCEPT {
+ __ptr_.swap(__u.__ptr_);
+ }
+};
- _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT
- {
- reset(__u.release());
- __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
- return *this;
- }
- template <class _Up, class _Ep>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if
- <
- !is_array<_Up>::value &&
- is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>::value &&
- is_assignable<deleter_type&, _Ep&&>::value,
- unique_ptr&
- >::type
- operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
- {
- reset(__u.release());
- __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
- return *this;
- }
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+template <class _Tp, class _Dp>
+class _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> {
+public:
+ typedef _Tp element_type;
+ typedef _Dp deleter_type;
+ typedef typename __pointer_type<_Tp, deleter_type>::type pointer;
- _LIBCPP_INLINE_VISIBILITY operator __rv<unique_ptr>()
- {
- return __rv<unique_ptr>(*this);
- }
+private:
+ __compressed_pair<pointer, deleter_type> __ptr_;
- _LIBCPP_INLINE_VISIBILITY unique_ptr(__rv<unique_ptr> __u)
- : __ptr_(__u->release(), _VSTD::forward<deleter_type>(__u->get_deleter())) {}
+ template <class _From>
+ struct _CheckArrayPointerConversion : is_same<_From, pointer> {};
- template <class _Up, class _Ep>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if<
- !is_array<_Up>::value &&
- is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>::value &&
- is_assignable<deleter_type&, _Ep&>::value,
- unique_ptr&
- >::type
- operator=(unique_ptr<_Up, _Ep> __u)
- {
- reset(__u.release());
- __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
- return *this;
- }
+ template <class _FromElem>
+ struct _CheckArrayPointerConversion<_FromElem*>
+ : integral_constant<bool,
+ is_same<_FromElem*, pointer>::value ||
+ (is_same<pointer, element_type*>::value &&
+ is_convertible<_FromElem(*)[], element_type(*)[]>::value)
+ >
+ {};
- _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, deleter_type __d)
- : __ptr_(_VSTD::move(__p), _VSTD::move(__d)) {}
+#ifndef _LIBCPP_CXX03_LANG
+ typedef __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
+
+ template <bool _Dummy>
+ using _LValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;
+
+ template <bool _Dummy>
+ using _GoodRValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;
+
+ template <bool _Dummy>
+ using _BadRValRefType =
+ typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;
+
+ template <bool _Dummy, class _Deleter = typename __dependent_type<
+ __identity<deleter_type>, _Dummy>::type>
+ using _EnableIfDeleterDefaultConstructible =
+ typename enable_if<is_default_constructible<_Deleter>::value &&
+ !is_pointer<_Deleter>::value>::type;
+
+ template <class _ArgType>
+ using _EnableIfDeleterConstructible =
+ typename enable_if<is_constructible<deleter_type, _ArgType>::value>::type;
+
+ template <class _Pp>
+ using _EnableIfPointerConvertible = typename enable_if<
+ _CheckArrayPointerConversion<_Pp>::value
+ >::type;
+
+ template <class _UPtr, class _Up,
+ class _ElemT = typename _UPtr::element_type>
+ using _EnableIfMoveConvertible = typename enable_if<
+ is_array<_Up>::value &&
+ is_same<pointer, element_type*>::value &&
+ is_same<typename _UPtr::pointer, _ElemT*>::value &&
+ is_convertible<_ElemT(*)[], element_type(*)[]>::value
+ >::type;
+
+ template <class _UDel>
+ using _EnableIfDeleterConvertible = typename enable_if<
+ (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
+ (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
+ >::type;
+
+ template <class _UDel>
+ using _EnableIfDeleterAssignable = typename enable_if<
+ is_assignable<_Dp&, _UDel&&>::value
+ >::type;
- template <class _Up>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if<
- is_convertible<_Up*, _Tp*>::value &&
- is_same<_Dp, default_delete<_Tp> >::value,
- unique_ptr&
- >::type
- operator=(auto_ptr<_Up> __p)
- {reset(__p.release()); return *this;}
+public:
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>>
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr unique_ptr() noexcept : __ptr_(pointer()) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>>
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr unique_ptr(nullptr_t) noexcept : __ptr_(pointer()) {}
+
+ template <class _Pp, bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>,
+ class = _EnableIfPointerConvertible<_Pp>>
+ _LIBCPP_INLINE_VISIBILITY
+ explicit unique_ptr(_Pp __p) noexcept
+ : __ptr_(__p) {}
+
+ template <class _Pp, bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_LValRefType<_Dummy>>,
+ class = _EnableIfPointerConvertible<_Pp>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) noexcept
+ : __ptr_(__p, __d) {}
+
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_LValRefType<_Dummy>>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) noexcept
+ : __ptr_(nullptr, __d) {}
+
+ template <class _Pp, bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy>>,
+ class = _EnableIfPointerConvertible<_Pp>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) noexcept
+ : __ptr_(__p, _VSTD::move(__d)) {
+ static_assert(!is_reference<deleter_type>::value,
+ "rvalue deleter bound to reference");
+ }
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();}
+ template <bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy>>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) noexcept
+ : __ptr_(nullptr, _VSTD::move(__d)) {
+ static_assert(!is_reference<deleter_type>::value,
+ "rvalue deleter bound to reference");
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t) _NOEXCEPT
- {
- reset();
- return *this;
- }
+ template <class _Pp, bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy>>,
+ class = _EnableIfPointerConvertible<_Pp>>
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(_Pp __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_INLINE_VISIBILITY typename add_lvalue_reference<_Tp>::type operator*() const
- {return *__ptr_.first();}
- _LIBCPP_INLINE_VISIBILITY pointer operator->() const _NOEXCEPT {return __ptr_.first();}
- _LIBCPP_INLINE_VISIBILITY pointer get() const _NOEXCEPT {return __ptr_.first();}
- _LIBCPP_INLINE_VISIBILITY _Dp_reference get_deleter() _NOEXCEPT
- {return __ptr_.second();}
- _LIBCPP_INLINE_VISIBILITY _Dp_const_reference get_deleter() const _NOEXCEPT
- {return __ptr_.second();}
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT
- {return __ptr_.first() != nullptr;}
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(unique_ptr&& __u) noexcept
+ : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
+ }
- _LIBCPP_INLINE_VISIBILITY pointer release() _NOEXCEPT
- {
- pointer __t = __ptr_.first();
- __ptr_.first() = pointer();
- return __t;
- }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(unique_ptr&& __u) noexcept {
+ reset(__u.release());
+ __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
+ return *this;
+ }
- _LIBCPP_INLINE_VISIBILITY void reset(pointer __p = pointer()) _NOEXCEPT
- {
- pointer __tmp = __ptr_.first();
- __ptr_.first() = __p;
- if (__tmp)
- __ptr_.second()(__tmp);
- }
+ template <class _Up, class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterConvertible<_Ep>
+ >
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
+ : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
+ }
- _LIBCPP_INLINE_VISIBILITY void swap(unique_ptr& __u) _NOEXCEPT
- {__ptr_.swap(__u.__ptr_);}
-};
+ template <class _Up, class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterAssignable<_Ep>
+ >
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr&
+ operator=(unique_ptr<_Up, _Ep>&& __u) noexcept {
+ reset(__u.release());
+ __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
+ return *this;
+ }
-template <class _Tp, class _Dp>
-class _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
-{
-public:
- typedef _Tp element_type;
- typedef _Dp deleter_type;
- typedef typename __pointer_type<_Tp, deleter_type>::type pointer;
+#else // _LIBCPP_CXX03_LANG
private:
- __compressed_pair<pointer, deleter_type> __ptr_;
+ template <class _Up> explicit unique_ptr(_Up);
-#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- unique_ptr(unique_ptr&);
- template <class _Up>
- unique_ptr(unique_ptr<_Up>&);
- unique_ptr& operator=(unique_ptr&);
- template <class _Up>
- unique_ptr& operator=(unique_ptr<_Up>&);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ unique_ptr(unique_ptr&);
+ template <class _Up> unique_ptr(unique_ptr<_Up>&);
- struct __nat {int __for_bool_;};
+ unique_ptr& operator=(unique_ptr&);
+ template <class _Up> unique_ptr& operator=(unique_ptr<_Up>&);
- typedef typename remove_reference<deleter_type>::type& _Dp_reference;
- typedef const typename remove_reference<deleter_type>::type& _Dp_const_reference;
+ template <class _Up>
+ unique_ptr(_Up __u,
+ typename conditional<
+ is_reference<deleter_type>::value, deleter_type,
+ typename add_lvalue_reference<const deleter_type>::type>::type,
+ typename enable_if<is_convertible<_Up, pointer>::value,
+ __nat>::type = __nat());
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT
- : __ptr_(pointer())
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT
- : __ptr_(pointer())
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- template <class _Pp>
- _LIBCPP_INLINE_VISIBILITY explicit unique_ptr(_Pp __p,
- typename enable_if<__same_or_less_cv_qualified<_Pp, pointer>::value, __nat>::type = __nat()) _NOEXCEPT
- : __ptr_(__p)
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
-
- template <class _Pp>
- _LIBCPP_INLINE_VISIBILITY unique_ptr(_Pp __p, typename conditional<
- is_reference<deleter_type>::value,
- deleter_type,
- typename add_lvalue_reference<const deleter_type>::type>::type __d,
- typename enable_if<__same_or_less_cv_qualified<_Pp, pointer>::value, __nat>::type = __nat())
- _NOEXCEPT
- : __ptr_(__p, __d) {}
-
- _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t, typename conditional<
- is_reference<deleter_type>::value,
- deleter_type,
- typename add_lvalue_reference<const deleter_type>::type>::type __d)
- _NOEXCEPT
- : __ptr_(pointer(), __d) {}
-
- template <class _Pp>
- _LIBCPP_INLINE_VISIBILITY unique_ptr(_Pp __p,
- typename remove_reference<deleter_type>::type&& __d,
- typename enable_if<__same_or_less_cv_qualified<_Pp, pointer>::value, __nat>::type = __nat())
- _NOEXCEPT
- : __ptr_(__p, _VSTD::move(__d))
- {
- static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
- }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr() : __ptr_(pointer()) {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(nullptr_t) : __ptr_(pointer()) {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t, typename remove_reference<deleter_type>::type&& __d)
- _NOEXCEPT
- : __ptr_(pointer(), _VSTD::move(__d))
- {
- static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference");
- }
+ _LIBCPP_INLINE_VISIBILITY
+ explicit unique_ptr(pointer __p) : __ptr_(__p) {
+ static_assert(!is_pointer<deleter_type>::value,
+ "unique_ptr constructed with null function pointer deleter");
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(pointer __p, deleter_type __d)
+ : __ptr_(__p, _VSTD::forward<deleter_type>(__d)) {}
- _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT
- {
- reset(__u.release());
- __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
- return *this;
- }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(nullptr_t, deleter_type __d)
+ : __ptr_(pointer(), _VSTD::forward<deleter_type>(__d)) {}
- template <class _Up, class _Ep>
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr<_Up, _Ep>&& __u,
- typename enable_if
- <
- is_array<_Up>::value &&
- __same_or_less_cv_qualified<typename unique_ptr<_Up, _Ep>::pointer, pointer>::value
- && is_convertible<_Ep, deleter_type>::value &&
- (
- !is_reference<deleter_type>::value ||
- is_same<deleter_type, _Ep>::value
- ),
- __nat
- >::type = __nat()
- ) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}
-
-
- template <class _Up, class _Ep>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if
- <
- is_array<_Up>::value &&
- __same_or_less_cv_qualified<typename unique_ptr<_Up, _Ep>::pointer, pointer>::value &&
- is_assignable<deleter_type&, _Ep&&>::value,
- unique_ptr&
- >::type
- operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
- {
- reset(__u.release());
- __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
- return *this;
- }
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
+ operator __rv<unique_ptr>() {
+ return __rv<unique_ptr>(*this);
+ }
- _LIBCPP_INLINE_VISIBILITY explicit unique_ptr(pointer __p)
- : __ptr_(__p)
- {
- static_assert(!is_pointer<deleter_type>::value,
- "unique_ptr constructed with null function pointer deleter");
- }
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr(__rv<unique_ptr> __u)
+ : __ptr_(__u->release(),
+ _VSTD::forward<deleter_type>(__u->get_deleter())) {}
- _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, deleter_type __d)
- : __ptr_(__p, _VSTD::forward<deleter_type>(__d)) {}
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(__rv<unique_ptr> __u) {
+ reset(__u->release());
+ __ptr_.second() = _VSTD::forward<deleter_type>(__u->get_deleter());
+ return *this;
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t, deleter_type __d)
- : __ptr_(pointer(), _VSTD::forward<deleter_type>(__d)) {}
+#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY operator __rv<unique_ptr>()
- {
- return __rv<unique_ptr>(*this);
- }
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ ~unique_ptr() { reset(); }
- _LIBCPP_INLINE_VISIBILITY unique_ptr(__rv<unique_ptr> __u)
- : __ptr_(__u->release(), _VSTD::forward<deleter_type>(__u->get_deleter())) {}
+ _LIBCPP_INLINE_VISIBILITY
+ unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ reset();
+ return *this;
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(__rv<unique_ptr> __u)
- {
- reset(__u->release());
- __ptr_.second() = _VSTD::forward<deleter_type>(__u->get_deleter());
- return *this;
- }
+ _LIBCPP_INLINE_VISIBILITY
+ typename add_lvalue_reference<_Tp>::type
+ operator[](size_t __i) const {
+ return __ptr_.first()[__i];
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ pointer get() const _NOEXCEPT {
+ return __ptr_.first();
+ }
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();}
+ _LIBCPP_INLINE_VISIBILITY
+ deleter_type& get_deleter() _NOEXCEPT {
+ return __ptr_.second();
+ }
- _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t) _NOEXCEPT
- {
- reset();
- return *this;
- }
+ _LIBCPP_INLINE_VISIBILITY
+ const deleter_type& get_deleter() const _NOEXCEPT {
+ return __ptr_.second();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {
+ return __ptr_.first() != nullptr;
+ }
- _LIBCPP_INLINE_VISIBILITY typename add_lvalue_reference<_Tp>::type operator[](size_t __i) const
- {return __ptr_.first()[__i];}
- _LIBCPP_INLINE_VISIBILITY pointer get() const _NOEXCEPT {return __ptr_.first();}
- _LIBCPP_INLINE_VISIBILITY _Dp_reference get_deleter() _NOEXCEPT
- {return __ptr_.second();}
- _LIBCPP_INLINE_VISIBILITY _Dp_const_reference get_deleter() const _NOEXCEPT
- {return __ptr_.second();}
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT
- {return __ptr_.first() != nullptr;}
+ _LIBCPP_INLINE_VISIBILITY
+ pointer release() _NOEXCEPT {
+ pointer __t = __ptr_.first();
+ __ptr_.first() = pointer();
+ return __t;
+ }
- _LIBCPP_INLINE_VISIBILITY pointer release() _NOEXCEPT
- {
- pointer __t = __ptr_.first();
- __ptr_.first() = pointer();
- return __t;
- }
+ template <class _Pp>
+ _LIBCPP_INLINE_VISIBILITY
+ typename enable_if<
+ _CheckArrayPointerConversion<_Pp>::value
+ >::type
+ reset(_Pp __p) _NOEXCEPT {
+ pointer __tmp = __ptr_.first();
+ __ptr_.first() = __p;
+ if (__tmp)
+ __ptr_.second()(__tmp);
+ }
- template <class _Pp>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if<__same_or_less_cv_qualified<_Pp, pointer>::value, void>::type
- reset(_Pp __p) _NOEXCEPT
- {
- pointer __tmp = __ptr_.first();
- __ptr_.first() = __p;
- if (__tmp)
- __ptr_.second()(__tmp);
- }
- _LIBCPP_INLINE_VISIBILITY void reset(nullptr_t = nullptr) _NOEXCEPT
- {
- pointer __tmp = __ptr_.first();
- __ptr_.first() = nullptr;
- if (__tmp)
- __ptr_.second()(__tmp);
- }
+ _LIBCPP_INLINE_VISIBILITY
+ void reset(nullptr_t = nullptr) _NOEXCEPT {
+ pointer __tmp = __ptr_.first();
+ __ptr_.first() = nullptr;
+ if (__tmp)
+ __ptr_.second()(__tmp);
+ }
- _LIBCPP_INLINE_VISIBILITY void swap(unique_ptr& __u) {__ptr_.swap(__u.__ptr_);}
-private:
+ _LIBCPP_INLINE_VISIBILITY
+ void swap(unique_ptr& __u) _NOEXCEPT {
+ __ptr_.swap(__u.__ptr_);
+ }
-#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- template <class _Up>
- explicit unique_ptr(_Up);
- template <class _Up>
- unique_ptr(_Up __u,
- typename conditional<
- is_reference<deleter_type>::value,
- deleter_type,
- typename add_lvalue_reference<const deleter_type>::type>::type,
- typename enable_if
- <
- is_convertible<_Up, pointer>::value,
- __nat
- >::type = __nat());
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
};
template <class _Tp, class _Dp>
@@ -3021,365 +3076,18 @@ template<class _Tp, class... _Args>
#endif // _LIBCPP_STD_VER > 11
-template <class _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_Size
-__loadword(const void* __p)
-{
- _Size __r;
- std::memcpy(&__r, __p, sizeof(__r));
- return __r;
-}
-
-// We use murmur2 when size_t is 32 bits, and cityhash64 when size_t
-// is 64 bits. This is because cityhash64 uses 64bit x 64bit
-// multiplication, which can be very slow on 32-bit systems.
-template <class _Size, size_t = sizeof(_Size)*__CHAR_BIT__>
-struct __murmur2_or_cityhash;
-
-template <class _Size>
-struct __murmur2_or_cityhash<_Size, 32>
-{
- _Size operator()(const void* __key, _Size __len);
-};
-
-// murmur2
-template <class _Size>
-_Size
-__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-{
- const _Size __m = 0x5bd1e995;
- const _Size __r = 24;
- _Size __h = __len;
- const unsigned char* __data = static_cast<const unsigned char*>(__key);
- for (; __len >= 4; __data += 4, __len -= 4)
- {
- _Size __k = __loadword<_Size>(__data);
- __k *= __m;
- __k ^= __k >> __r;
- __k *= __m;
- __h *= __m;
- __h ^= __k;
- }
- switch (__len)
- {
- case 3:
- __h ^= __data[2] << 16;
- case 2:
- __h ^= __data[1] << 8;
- case 1:
- __h ^= __data[0];
- __h *= __m;
- }
- __h ^= __h >> 13;
- __h *= __m;
- __h ^= __h >> 15;
- return __h;
-}
-
-template <class _Size>
-struct __murmur2_or_cityhash<_Size, 64>
-{
- _Size operator()(const void* __key, _Size __len);
-
- private:
- // Some primes between 2^63 and 2^64.
- static const _Size __k0 = 0xc3a5c85c97cb3127ULL;
- static const _Size __k1 = 0xb492b66fbe98f273ULL;
- static const _Size __k2 = 0x9ae16a3b2f90404fULL;
- static const _Size __k3 = 0xc949d7c7509e6557ULL;
-
- static _Size __rotate(_Size __val, int __shift) {
- return __shift == 0 ? __val : ((__val >> __shift) | (__val << (64 - __shift)));
- }
-
- static _Size __rotate_by_at_least_1(_Size __val, int __shift) {
- return (__val >> __shift) | (__val << (64 - __shift));
- }
-
- static _Size __shift_mix(_Size __val) {
- return __val ^ (__val >> 47);
- }
-
- static _Size __hash_len_16(_Size __u, _Size __v) {
- const _Size __mul = 0x9ddfea08eb382d69ULL;
- _Size __a = (__u ^ __v) * __mul;
- __a ^= (__a >> 47);
- _Size __b = (__v ^ __a) * __mul;
- __b ^= (__b >> 47);
- __b *= __mul;
- return __b;
- }
-
- static _Size __hash_len_0_to_16(const char* __s, _Size __len) {
- if (__len > 8) {
- const _Size __a = __loadword<_Size>(__s);
- const _Size __b = __loadword<_Size>(__s + __len - 8);
- return __hash_len_16(__a, __rotate_by_at_least_1(__b + __len, __len)) ^ __b;
- }
- if (__len >= 4) {
- const uint32_t __a = __loadword<uint32_t>(__s);
- const uint32_t __b = __loadword<uint32_t>(__s + __len - 4);
- return __hash_len_16(__len + (__a << 3), __b);
- }
- if (__len > 0) {
- const unsigned char __a = __s[0];
- const unsigned char __b = __s[__len >> 1];
- const unsigned char __c = __s[__len - 1];
- const uint32_t __y = static_cast<uint32_t>(__a) +
- (static_cast<uint32_t>(__b) << 8);
- const uint32_t __z = __len + (static_cast<uint32_t>(__c) << 2);
- return __shift_mix(__y * __k2 ^ __z * __k3) * __k2;
- }
- return __k2;
- }
-
- static _Size __hash_len_17_to_32(const char *__s, _Size __len) {
- const _Size __a = __loadword<_Size>(__s) * __k1;
- const _Size __b = __loadword<_Size>(__s + 8);
- const _Size __c = __loadword<_Size>(__s + __len - 8) * __k2;
- const _Size __d = __loadword<_Size>(__s + __len - 16) * __k0;
- return __hash_len_16(__rotate(__a - __b, 43) + __rotate(__c, 30) + __d,
- __a + __rotate(__b ^ __k3, 20) - __c + __len);
- }
-
- // Return a 16-byte hash for 48 bytes. Quick and dirty.
- // Callers do best to use "random-looking" values for a and b.
- static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
- _Size __w, _Size __x, _Size __y, _Size __z, _Size __a, _Size __b) {
- __a += __w;
- __b = __rotate(__b + __a + __z, 21);
- const _Size __c = __a;
- __a += __x;
- __a += __y;
- __b += __rotate(__a, 44);
- return pair<_Size, _Size>(__a + __z, __b + __c);
- }
-
- // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty.
- static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
- const char* __s, _Size __a, _Size __b) {
- return __weak_hash_len_32_with_seeds(__loadword<_Size>(__s),
- __loadword<_Size>(__s + 8),
- __loadword<_Size>(__s + 16),
- __loadword<_Size>(__s + 24),
- __a,
- __b);
- }
-
- // Return an 8-byte hash for 33 to 64 bytes.
- static _Size __hash_len_33_to_64(const char *__s, size_t __len) {
- _Size __z = __loadword<_Size>(__s + 24);
- _Size __a = __loadword<_Size>(__s) +
- (__len + __loadword<_Size>(__s + __len - 16)) * __k0;
- _Size __b = __rotate(__a + __z, 52);
- _Size __c = __rotate(__a, 37);
- __a += __loadword<_Size>(__s + 8);
- __c += __rotate(__a, 7);
- __a += __loadword<_Size>(__s + 16);
- _Size __vf = __a + __z;
- _Size __vs = __b + __rotate(__a, 31) + __c;
- __a = __loadword<_Size>(__s + 16) + __loadword<_Size>(__s + __len - 32);
- __z += __loadword<_Size>(__s + __len - 8);
- __b = __rotate(__a + __z, 52);
- __c = __rotate(__a, 37);
- __a += __loadword<_Size>(__s + __len - 24);
- __c += __rotate(__a, 7);
- __a += __loadword<_Size>(__s + __len - 16);
- _Size __wf = __a + __z;
- _Size __ws = __b + __rotate(__a, 31) + __c;
- _Size __r = __shift_mix((__vf + __ws) * __k2 + (__wf + __vs) * __k0);
- return __shift_mix(__r * __k0 + __vs) * __k2;
- }
-};
-
-// cityhash64
-template <class _Size>
-_Size
-__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-{
- const char* __s = static_cast<const char*>(__key);
- if (__len <= 32) {
- if (__len <= 16) {
- return __hash_len_0_to_16(__s, __len);
- } else {
- return __hash_len_17_to_32(__s, __len);
- }
- } else if (__len <= 64) {
- return __hash_len_33_to_64(__s, __len);
- }
-
- // For strings over 64 bytes we hash the end first, and then as we
- // loop we keep 56 bytes of state: v, w, x, y, and z.
- _Size __x = __loadword<_Size>(__s + __len - 40);
- _Size __y = __loadword<_Size>(__s + __len - 16) +
- __loadword<_Size>(__s + __len - 56);
- _Size __z = __hash_len_16(__loadword<_Size>(__s + __len - 48) + __len,
- __loadword<_Size>(__s + __len - 24));
- pair<_Size, _Size> __v = __weak_hash_len_32_with_seeds(__s + __len - 64, __len, __z);
- pair<_Size, _Size> __w = __weak_hash_len_32_with_seeds(__s + __len - 32, __y + __k1, __x);
- __x = __x * __k1 + __loadword<_Size>(__s);
-
- // Decrease len to the nearest multiple of 64, and operate on 64-byte chunks.
- __len = (__len - 1) & ~static_cast<_Size>(63);
- do {
- __x = __rotate(__x + __y + __v.first + __loadword<_Size>(__s + 8), 37) * __k1;
- __y = __rotate(__y + __v.second + __loadword<_Size>(__s + 48), 42) * __k1;
- __x ^= __w.second;
- __y += __v.first + __loadword<_Size>(__s + 40);
- __z = __rotate(__z + __w.first, 33) * __k1;
- __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
- __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
- __y + __loadword<_Size>(__s + 16));
- std::swap(__z, __x);
- __s += 64;
- __len -= 64;
- } while (__len != 0);
- return __hash_len_16(
- __hash_len_16(__v.first, __w.first) + __shift_mix(__y) * __k1 + __z,
- __hash_len_16(__v.second, __w.second) + __x);
-}
-
-template <class _Tp, size_t = sizeof(_Tp) / sizeof(size_t)>
-struct __scalar_hash;
-
-template <class _Tp>
-struct __scalar_hash<_Tp, 0>
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- union
- {
- _Tp __t;
- size_t __a;
- } __u;
- __u.__a = 0;
- __u.__t = __v;
- return __u.__a;
- }
-};
-
-template <class _Tp>
-struct __scalar_hash<_Tp, 1>
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- union
- {
- _Tp __t;
- size_t __a;
- } __u;
- __u.__t = __v;
- return __u.__a;
- }
-};
-
-template <class _Tp>
-struct __scalar_hash<_Tp, 2>
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- union
- {
- _Tp __t;
- struct
- {
- size_t __a;
- size_t __b;
- } __s;
- } __u;
- __u.__t = __v;
- return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
- }
-};
-
-template <class _Tp>
-struct __scalar_hash<_Tp, 3>
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- union
- {
- _Tp __t;
- struct
- {
- size_t __a;
- size_t __b;
- size_t __c;
- } __s;
- } __u;
- __u.__t = __v;
- return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
- }
-};
-
-template <class _Tp>
-struct __scalar_hash<_Tp, 4>
- : public unary_function<_Tp, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp __v) const _NOEXCEPT
- {
- union
- {
- _Tp __t;
- struct
- {
- size_t __a;
- size_t __b;
- size_t __c;
- size_t __d;
- } __s;
- } __u;
- __u.__t = __v;
- return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
- }
-};
-
-struct _PairT {
- size_t first;
- size_t second;
-};
-
-_LIBCPP_INLINE_VISIBILITY
-inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
- typedef __scalar_hash<_PairT> _HashT;
- const _PairT __p = {__lhs, __rhs};
- return _HashT()(__p);
-}
-
-template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
- : public unary_function<_Tp*, size_t>
-{
- _LIBCPP_INLINE_VISIBILITY
- size_t operator()(_Tp* __v) const _NOEXCEPT
- {
- union
- {
- _Tp* __t;
- size_t __a;
- } __u;
- __u.__t = __v;
- return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
- }
-};
-
template <class _Tp, class _Dp>
+#ifdef _LIBCPP_CXX03_LANG
struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
+#else
+struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
+ unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer>>
+#endif
{
typedef unique_ptr<_Tp, _Dp> argument_type;
typedef size_t result_type;
_LIBCPP_INLINE_VISIBILITY
- result_type operator()(const argument_type& __ptr) const _NOEXCEPT
+ result_type operator()(const argument_type& __ptr) const
{
typedef typename argument_type::pointer pointer;
return hash<pointer>()(__ptr.get());
@@ -3681,6 +3389,39 @@ uninitialized_move_n(_InputIt __first, _Size __n, _ForwardIt __first_res) {
#endif // _LIBCPP_STD_VER > 14
+// NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)
+// should be sufficient for thread safety.
+// See https://bugs.llvm.org/show_bug.cgi?id=22803
+#if defined(__clang__) && __has_builtin(__atomic_add_fetch) \
+ && defined(__ATOMIC_RELAXED) \
+ && defined(__ATOMIC_ACQ_REL)
+# define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
+#elif !defined(__clang__) && defined(_GNUC_VER) && _GNUC_VER >= 407
+# define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
+#endif
+
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY _Tp
+__libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT
+{
+#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
+ return __atomic_add_fetch(&__t, 1, __ATOMIC_RELAXED);
+#else
+ return __t += 1;
+#endif
+}
+
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY _Tp
+__libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT
+{
+#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
+ return __atomic_add_fetch(&__t, -1, __ATOMIC_ACQ_REL);
+#else
+ return __t -= 1;
+#endif
+}
+
class _LIBCPP_EXCEPTION_ABI bad_weak_ptr
: public std::exception
{
@@ -3717,8 +3458,24 @@ public:
explicit __shared_count(long __refs = 0) _NOEXCEPT
: __shared_owners_(__refs) {}
+#if defined(_LIBCPP_BUILDING_MEMORY) && \
+ defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
void __add_shared() _NOEXCEPT;
bool __release_shared() _NOEXCEPT;
+#else
+ _LIBCPP_INLINE_VISIBILITY
+ void __add_shared() _NOEXCEPT {
+ __libcpp_atomic_refcount_increment(__shared_owners_);
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ bool __release_shared() _NOEXCEPT {
+ if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1) {
+ __on_zero_shared();
+ return true;
+ }
+ return false;
+ }
+#endif
_LIBCPP_INLINE_VISIBILITY
long use_count() const _NOEXCEPT {
return __libcpp_relaxed_load(&__shared_owners_) + 1;
@@ -3739,9 +3496,26 @@ protected:
virtual ~__shared_weak_count();
public:
+#if defined(_LIBCPP_BUILDING_MEMORY) && \
+ defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
void __add_shared() _NOEXCEPT;
void __add_weak() _NOEXCEPT;
void __release_shared() _NOEXCEPT;
+#else
+ _LIBCPP_INLINE_VISIBILITY
+ void __add_shared() _NOEXCEPT {
+ __shared_count::__add_shared();
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ void __add_weak() _NOEXCEPT {
+ __libcpp_atomic_refcount_increment(__shared_weak_owners_);
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ void __release_shared() _NOEXCEPT {
+ if (__shared_count::__release_shared())
+ __release_weak();
+ }
+#endif
void __release_weak() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
long use_count() const _NOEXCEPT {return __shared_count::use_count();}
@@ -3926,6 +3700,7 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r,
typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type= __nat());
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template<class _Yp>
shared_ptr(auto_ptr<_Yp>&& __r,
@@ -3935,6 +3710,7 @@ public:
shared_ptr(auto_ptr<_Yp> __r,
typename enable_if<is_convertible<_Yp*, element_type*>::value, __nat>::type = __nat());
#endif
+#endif
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Yp, class _Dp>
shared_ptr(unique_ptr<_Yp, _Dp>&&,
@@ -3998,6 +3774,7 @@ public:
>::type
_LIBCPP_INLINE_VISIBILITY
operator=(shared_ptr<_Yp>&& __r);
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template<class _Yp>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
@@ -4007,7 +3784,9 @@ public:
shared_ptr
>::type&
operator=(auto_ptr<_Yp>&& __r);
+#endif
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template<class _Yp>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
@@ -4018,6 +3797,7 @@ public:
>::type
operator=(auto_ptr<_Yp> __r);
#endif
+#endif
template <class _Yp, class _Dp>
typename enable_if
<
@@ -4077,11 +3857,11 @@ public:
_LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return get() != 0;}
template <class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool owner_before(shared_ptr<_Up> const& __p) const
+ bool owner_before(shared_ptr<_Up> const& __p) const _NOEXCEPT
{return __cntrl_ < __p.__cntrl_;}
template <class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool owner_before(weak_ptr<_Up> const& __p) const
+ bool owner_before(weak_ptr<_Up> const& __p) const _NOEXCEPT
{return __cntrl_ < __p.__cntrl_;}
_LIBCPP_INLINE_VISIBILITY
bool
@@ -4353,6 +4133,7 @@ shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r,
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template<class _Tp>
template<class _Yp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -4368,6 +4149,7 @@ shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r,
__enable_weak_this(__r.get(), __r.get());
__r.release();
}
+#endif
template<class _Tp>
template <class _Yp, class _Dp>
@@ -4674,6 +4456,7 @@ shared_ptr<_Tp>::operator=(shared_ptr<_Yp>&& __r)
return *this;
}
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template<class _Tp>
template<class _Yp>
inline
@@ -4688,6 +4471,7 @@ shared_ptr<_Tp>::operator=(auto_ptr<_Yp>&& __r)
shared_ptr(_VSTD::move(__r)).swap(*this);
return *this;
}
+#endif
template<class _Tp>
template <class _Yp, class _Dp>
@@ -4707,6 +4491,7 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r)
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
template<class _Tp>
template<class _Yp>
inline _LIBCPP_INLINE_VISIBILITY
@@ -4721,6 +4506,7 @@ shared_ptr<_Tp>::operator=(auto_ptr<_Yp> __r)
shared_ptr(__r).swap(*this);
return *this;
}
+#endif
template<class _Tp>
template <class _Yp, class _Dp>
@@ -5171,11 +4957,11 @@ public:
shared_ptr<_Tp> lock() const _NOEXCEPT;
template<class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool owner_before(const shared_ptr<_Up>& __r) const
+ bool owner_before(const shared_ptr<_Up>& __r) const _NOEXCEPT
{return __cntrl_ < __r.__cntrl_;}
template<class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool owner_before(const weak_ptr<_Up>& __r) const
+ bool owner_before(const weak_ptr<_Up>& __r) const _NOEXCEPT
{return __cntrl_ < __r.__cntrl_;}
template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
@@ -5384,13 +5170,13 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> >
{
typedef bool result_type;
_LIBCPP_INLINE_VISIBILITY
- bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
+ bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
_LIBCPP_INLINE_VISIBILITY
- bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
+ bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
_LIBCPP_INLINE_VISIBILITY
- bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
+ bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
};
@@ -5400,13 +5186,13 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
{
typedef bool result_type;
_LIBCPP_INLINE_VISIBILITY
- bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
+ bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
_LIBCPP_INLINE_VISIBILITY
- bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
+ bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
_LIBCPP_INLINE_VISIBILITY
- bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
+ bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
};
@@ -5416,19 +5202,19 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<void>
{
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const
+ bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const
+ bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const
+ bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY
- bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const
+ bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const _NOEXCEPT
{return __x.owner_before(__y);}
typedef void is_transparent;
};
@@ -5474,6 +5260,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> >
{
typedef shared_ptr<_Tp> argument_type;
typedef size_t result_type;
+
_LIBCPP_INLINE_VISIBILITY
result_type operator()(const argument_type& __ptr) const _NOEXCEPT
{
diff --git a/include/mutex b/include/mutex
index 8526533f1402..f28d37c83e63 100644
--- a/include/mutex
+++ b/include/mutex
@@ -109,15 +109,17 @@ public:
lock_guard& operator=(lock_guard const&) = delete;
};
-template <class... MutexTypes> // Variadic lock_guard only provided in ABI V2.
-class lock_guard
+template <class... MutexTypes>
+class scoped_lock // C++17
{
public:
- explicit lock_guard(MutexTypes&... m);
- lock_guard(MutexTypes&... m, adopt_lock_t);
- ~lock_guard();
- lock_guard(lock_guard const&) = delete;
- lock_guard& operator=(lock_guard const&) = delete;
+ using mutex_type = Mutex; // If MutexTypes... consists of the single type Mutex
+
+ explicit scoped_lock(MutexTypes&... m);
+ scoped_lock(MutexTypes&... m, adopt_lock_t);
+ ~scoped_lock();
+ scoped_lock(scoped_lock const&) = delete;
+ scoped_lock& operator=(scoped_lock const&) = delete;
private:
tuple<MutexTypes&...> pm; // exposition only
};
@@ -248,6 +250,7 @@ public:
bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
{return try_lock_until(chrono::steady_clock::now() + __d);}
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
void unlock() _NOEXCEPT;
};
@@ -291,6 +294,7 @@ public:
bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
{return try_lock_until(chrono::steady_clock::now() + __d);}
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
void unlock() _NOEXCEPT;
};
@@ -464,6 +468,84 @@ void __unlock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) {
#endif // _LIBCPP_HAS_NO_VARIADICS
+#if _LIBCPP_STD_VER > 14
+template <class ..._Mutexes>
+class _LIBCPP_TEMPLATE_VIS scoped_lock;
+
+template <>
+class _LIBCPP_TEMPLATE_VIS scoped_lock<> {
+public:
+ explicit scoped_lock() {}
+ ~scoped_lock() = default;
+
+ _LIBCPP_INLINE_VISIBILITY
+ explicit scoped_lock(adopt_lock_t) {}
+
+ scoped_lock(scoped_lock const&) = delete;
+ scoped_lock& operator=(scoped_lock const&) = delete;
+};
+
+template <class _Mutex>
+class _LIBCPP_TEMPLATE_VIS scoped_lock<_Mutex> {
+public:
+ typedef _Mutex mutex_type;
+private:
+ mutex_type& __m_;
+public:
+ explicit scoped_lock(mutex_type & __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
+ : __m_(__m) {__m_.lock();}
+
+ ~scoped_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
+
+ _LIBCPP_INLINE_VISIBILITY
+ explicit scoped_lock(mutex_type& __m, adopt_lock_t) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
+ : __m_(__m) {}
+
+
+ scoped_lock(scoped_lock const&) = delete;
+ scoped_lock& operator=(scoped_lock const&) = delete;
+};
+
+template <class ..._MArgs>
+class _LIBCPP_TEMPLATE_VIS scoped_lock
+{
+ static_assert(sizeof...(_MArgs) > 1, "At least 2 lock types required");
+ typedef tuple<_MArgs&...> _MutexTuple;
+
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ explicit scoped_lock(_MArgs&... __margs)
+ : __t_(__margs...)
+ {
+ _VSTD::lock(__margs...);
+ }
+
+ _LIBCPP_INLINE_VISIBILITY
+ scoped_lock(_MArgs&... __margs, adopt_lock_t)
+ : __t_(__margs...)
+ {
+ }
+
+ _LIBCPP_INLINE_VISIBILITY
+ ~scoped_lock() {
+ typedef typename __make_tuple_indices<sizeof...(_MArgs)>::type _Indices;
+ __unlock_unpack(_Indices{}, __t_);
+ }
+
+ scoped_lock(scoped_lock const&) = delete;
+ scoped_lock& operator=(scoped_lock const&) = delete;
+
+private:
+ template <size_t ..._Indx>
+ _LIBCPP_INLINE_VISIBILITY
+ static void __unlock_unpack(__tuple_indices<_Indx...>, _MutexTuple& __mt) {
+ _VSTD::__unlock(_VSTD::get<_Indx>(__mt)...);
+ }
+
+ _MutexTuple __t_;
+};
+
+#endif // _LIBCPP_STD_VER > 14
#endif // !_LIBCPP_HAS_NO_THREADS
struct _LIBCPP_TEMPLATE_VIS once_flag;
@@ -612,63 +694,6 @@ call_once(once_flag& __flag, const _Callable& __func)
#endif // _LIBCPP_HAS_NO_VARIADICS
-
-#if defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD) \
- && !defined(_LIBCPP_CXX03_LANG)
-template <>
-class _LIBCPP_TEMPLATE_VIS lock_guard<> {
-public:
- explicit lock_guard() {}
- ~lock_guard() = default;
-
- _LIBCPP_INLINE_VISIBILITY
- explicit lock_guard(adopt_lock_t) {}
-
- lock_guard(lock_guard const&) = delete;
- lock_guard& operator=(lock_guard const&) = delete;
-};
-
-template <class ..._MArgs>
-class _LIBCPP_TEMPLATE_VIS lock_guard
-{
- static_assert(sizeof...(_MArgs) >= 2, "At least 2 lock types required");
- typedef tuple<_MArgs&...> _MutexTuple;
-
-public:
- _LIBCPP_INLINE_VISIBILITY
- explicit lock_guard(_MArgs&... __margs)
- : __t_(__margs...)
- {
- _VSTD::lock(__margs...);
- }
-
- _LIBCPP_INLINE_VISIBILITY
- lock_guard(_MArgs&... __margs, adopt_lock_t)
- : __t_(__margs...)
- {
- }
-
- _LIBCPP_INLINE_VISIBILITY
- ~lock_guard() {
- typedef typename __make_tuple_indices<sizeof...(_MArgs)>::type _Indices;
- __unlock_unpack(_Indices{}, __t_);
- }
-
- lock_guard(lock_guard const&) = delete;
- lock_guard& operator=(lock_guard const&) = delete;
-
-private:
- template <size_t ..._Indx>
- _LIBCPP_INLINE_VISIBILITY
- static void __unlock_unpack(__tuple_indices<_Indx...>, _MutexTuple& __mt) {
- _VSTD::__unlock(_VSTD::get<_Indx>(__mt)...);
- }
-
- _MutexTuple __t_;
-};
-
-#endif // _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_MUTEX
diff --git a/include/new b/include/new
index 86428f281dc1..c0e7b2dafe5b 100644
--- a/include/new
+++ b/include/new
@@ -92,6 +92,10 @@ void operator delete[](void* ptr, void*) noexcept;
#include <cstdlib>
#endif
+#if defined(_LIBCPP_ABI_MICROSOFT)
+#include <new.h>
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -110,6 +114,10 @@ void operator delete[](void* ptr, void*) noexcept;
namespace std // purposefully not using versioning namespace
{
+#if !defined(_LIBCPP_ABI_MICROSOFT)
+struct _LIBCPP_TYPE_VIS nothrow_t {};
+extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
+
class _LIBCPP_EXCEPTION_ABI bad_alloc
: public exception
{
@@ -128,9 +136,15 @@ public:
virtual const char* what() const _NOEXCEPT;
};
+typedef void (*new_handler)();
+_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
+_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
+
+#endif // !_LIBCPP_ABI_MICROSOFT
+
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
-#if defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11)
+#if defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11)
class _LIBCPP_EXCEPTION_ABI bad_array_length
: public bad_alloc
@@ -153,12 +167,6 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 };
#endif
#endif
-struct _LIBCPP_TYPE_VIS nothrow_t {};
-extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
-typedef void (*new_handler)();
-_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
-
} // std
#if defined(_LIBCPP_CXX03_LANG)
@@ -167,6 +175,8 @@ _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
#define _THROW_BAD_ALLOC
#endif
+#if !defined(_LIBCPP_ABI_MICROSOFT)
+
_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
@@ -206,6 +216,8 @@ inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _N
inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {}
inline _LIBCPP_INLINE_VISIBILITY void operator delete[](void*, void*) _NOEXCEPT {}
+#endif // !_LIBCPP_ABI_MICROSOFT
+
_LIBCPP_BEGIN_NAMESPACE_STD
inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) {
diff --git a/include/numeric b/include/numeric
index e00580854d41..8f25146938a4 100644
--- a/include/numeric
+++ b/include/numeric
@@ -65,6 +65,7 @@ template <class M, class N>
#include <__config>
#include <iterator>
+#include <limits> // for numeric_limits
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -200,18 +201,23 @@ iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value_)
#if _LIBCPP_STD_VER > 14
-template <typename _Tp, bool _IsSigned = is_signed<_Tp>::value> struct __abs;
+template <typename _Result, typename _Source, bool _IsSigned = is_signed<_Source>::value> struct __abs;
-template <typename _Tp>
-struct __abs<_Tp, true> {
+template <typename _Result, typename _Source>
+struct __abs<_Result, _Source, true> {
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- _Tp operator()(_Tp __t) const noexcept { return __t >= 0 ? __t : -__t; }
+ _Result operator()(_Source __t) const noexcept
+ {
+ if (__t >= 0) return __t;
+ if (__t == numeric_limits<_Source>::min()) return -static_cast<_Result>(__t);
+ return -__t;
+ }
};
-template <typename _Tp>
-struct __abs<_Tp, false> {
+template <typename _Result, typename _Source>
+struct __abs<_Result, _Source, false> {
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- _Tp operator()(_Tp __t) const noexcept { return __t; }
+ _Result operator()(_Source __t) const noexcept { return __t; }
};
@@ -219,7 +225,7 @@ template<class _Tp>
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
_Tp __gcd(_Tp __m, _Tp __n)
{
- static_assert((!is_signed<_Tp>::value), "" );
+ static_assert((!is_signed<_Tp>::value), "");
return __n == 0 ? __m : __gcd<_Tp>(__n, __m % __n);
}
@@ -234,8 +240,8 @@ gcd(_Tp __m, _Up __n)
static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
using _Rp = common_type_t<_Tp,_Up>;
using _Wp = make_unsigned_t<_Rp>;
- return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Tp>()(__m)),
- static_cast<_Wp>(__abs<_Up>()(__n))));
+ return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
+ static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
}
template<class _Tp, class _Up>
@@ -250,8 +256,8 @@ lcm(_Tp __m, _Up __n)
return 0;
using _Rp = common_type_t<_Tp,_Up>;
- _Rp __val1 = __abs<_Tp>()(__m) / gcd(__m,__n);
- _Up __val2 = __abs<_Up>()(__n);
+ _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
+ _Rp __val2 = __abs<_Rp, _Up>()(__n);
_LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
return __val1 * __val2;
}
diff --git a/include/optional b/include/optional
index 8f47986242ca..118d71782882 100644
--- a/include/optional
+++ b/include/optional
@@ -87,7 +87,7 @@ namespace std {
constexpr optional() noexcept;
constexpr optional(nullopt_t) noexcept;
optional(const optional &);
- optional(optional &&) noexcept(see below );
+ optional(optional &&) noexcept(see below);
template <class... Args> constexpr explicit optional(in_place_t, Args &&...);
template <class U, class... Args>
constexpr explicit optional(in_place_t, initializer_list<U>, Args &&...);
@@ -108,9 +108,9 @@ namespace std {
template <class U = T> optional &operator=(U &&);
template <class U> optional &operator=(const optional<U> &);
template <class U> optional &operator=(optional<U> &&);
- template <class... Args> void emplace(Args &&...);
+ template <class... Args> T& emplace(Args &&...);
template <class U, class... Args>
- void emplace(initializer_list<U>, Args &&...);
+ T& emplace(initializer_list<U>, Args &&...);
// 20.6.3.4, swap
void swap(optional &) noexcept(see below );
@@ -531,7 +531,7 @@ private:
};
template <class _Up>
using _CheckOptionalArgsCtor = conditional_t<
- !is_same_v<in_place_t, _Up> &&
+ !is_same_v<decay_t<_Up>, in_place_t> &&
!is_same_v<decay_t<_Up>, optional>,
_CheckOptionalArgsConstructor,
__check_tuple_constructor_fail
@@ -729,11 +729,12 @@ public:
>
>
_LIBCPP_INLINE_VISIBILITY
- void
+ _Tp &
emplace(_Args&&... __args)
{
reset();
this->__construct(_VSTD::forward<_Args>(__args)...);
+ return this->__get();
}
template <class _Up, class... _Args,
@@ -743,11 +744,12 @@ public:
>
>
_LIBCPP_INLINE_VISIBILITY
- void
+ _Tp &
emplace(initializer_list<_Up> __il, _Args&&... __args)
{
reset();
this->__construct(__il, _VSTD::forward<_Args>(__args)...);
+ return this->__get();
}
_LIBCPP_INLINE_VISIBILITY
@@ -921,14 +923,14 @@ private:
};
// Comparisons between optionals
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator==(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (static_cast<bool>(__x) != static_cast<bool>(__y))
return false;
@@ -937,14 +939,14 @@ operator==(const optional<_Tp>& __x, const optional<_Tp>& __y)
return *__x == *__y;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator!=(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (static_cast<bool>(__x) != static_cast<bool>(__y))
return true;
@@ -953,14 +955,14 @@ operator!=(const optional<_Tp>& __x, const optional<_Tp>& __y)
return *__x != *__y;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (!static_cast<bool>(__y))
return false;
@@ -969,14 +971,14 @@ operator<(const optional<_Tp>& __x, const optional<_Tp>& __y)
return *__x < *__y;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (!static_cast<bool>(__x))
return false;
@@ -985,14 +987,14 @@ operator>(const optional<_Tp>& __x, const optional<_Tp>& __y)
return *__x > *__y;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<=(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (!static_cast<bool>(__x))
return true;
@@ -1001,14 +1003,14 @@ operator<=(const optional<_Tp>& __x, const optional<_Tp>& __y)
return *__x <= *__y;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>=(const optional<_Tp>& __x, const optional<_Tp>& __y)
+operator>=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (!static_cast<bool>(__y))
return true;
@@ -1115,146 +1117,146 @@ operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
}
// Comparisons with T
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator==(const optional<_Tp>& __x, const _Tp& __v)
+operator==(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x == __v : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator==(const _Tp& __v, const optional<_Tp>& __x)
+operator==(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v == *__x : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator!=(const optional<_Tp>& __x, const _Tp& __v)
+operator!=(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x != __v : true;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator!=(const _Tp& __v, const optional<_Tp>& __x)
+operator!=(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v != *__x : true;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<(const optional<_Tp>& __x, const _Tp& __v)
+operator<(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x < __v : true;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<(const _Tp& __v, const optional<_Tp>& __x)
+operator<(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v < *__x : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<=(const optional<_Tp>& __x, const _Tp& __v)
+operator<=(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x <= __v : true;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator<=(const _Tp& __v, const optional<_Tp>& __x)
+operator<=(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v <= *__x : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>(const optional<_Tp>& __x, const _Tp& __v)
+operator>(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x > __v : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>(const _Tp& __v, const optional<_Tp>& __x)
+operator>(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v > *__x : true;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>=(const optional<_Tp>& __x, const _Tp& __v)
+operator>=(const optional<_Tp>& __x, const _Up& __v)
{
return static_cast<bool>(__x) ? *__x >= __v : false;
}
-template <class _Tp>
+template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
- _VSTD::declval<const _Tp&>()), bool>,
+ _VSTD::declval<const _Up&>()), bool>,
bool
>
-operator>=(const _Tp& __v, const optional<_Tp>& __x)
+operator>=(const _Tp& __v, const optional<_Up>& __x)
{
return static_cast<bool>(__x) ? __v >= *__x : true;
}
@@ -1293,15 +1295,17 @@ optional<_Tp> make_optional(initializer_list<_Up> __il, _Args&&... __args)
}
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<optional<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS hash<
+ __enable_hash_helper<optional<_Tp>, remove_const_t<_Tp>>
+>
{
typedef optional<_Tp> argument_type;
typedef size_t result_type;
_LIBCPP_INLINE_VISIBILITY
- result_type operator()(const argument_type& __opt) const _NOEXCEPT
+ result_type operator()(const argument_type& __opt) const
{
- return static_cast<bool>(__opt) ? hash<_Tp>()(*__opt) : 0;
+ return static_cast<bool>(__opt) ? hash<remove_const_t<_Tp>>()(*__opt) : 0;
}
};
diff --git a/include/regex b/include/regex
index 42e55e86f454..fe97a63763c9 100644
--- a/include/regex
+++ b/include/regex
@@ -3957,7 +3957,6 @@ basic_regex<_CharT, _Traits>::__parse_equivalence_class(_ForwardIterator __first
if (__temp == __last)
__throw_regex_error<regex_constants::error_brack>();
// [__first, __temp) contains all text in [= ... =]
- typedef typename _Traits::string_type string_type;
string_type __collate_name =
__traits_.lookup_collatename(__first, __temp);
if (__collate_name.empty())
diff --git a/include/shared_mutex b/include/shared_mutex
index 923fe07ab38b..f2fd667b5c67 100644
--- a/include/shared_mutex
+++ b/include/shared_mutex
@@ -175,7 +175,7 @@ struct _LIBCPP_TYPE_VIS __shared_mutex_base
#if _LIBCPP_STD_VER > 14
class _LIBCPP_TYPE_VIS shared_mutex
{
- __shared_mutex_base __base;
+ __shared_mutex_base __base;
public:
shared_mutex() : __base() {}
_LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
@@ -201,7 +201,7 @@ public:
class _LIBCPP_TYPE_VIS shared_timed_mutex
{
- __shared_mutex_base __base;
+ __shared_mutex_base __base;
public:
shared_timed_mutex();
_LIBCPP_INLINE_VISIBILITY ~shared_timed_mutex() = default;
@@ -220,6 +220,7 @@ public:
return try_lock_until(chrono::steady_clock::now() + __rel_time);
}
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool
try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time);
void unlock();
@@ -235,6 +236,7 @@ public:
return try_lock_shared_until(chrono::steady_clock::now() + __rel_time);
}
template <class _Clock, class _Duration>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
bool
try_lock_shared_until(const chrono::time_point<_Clock, _Duration>& __abs_time);
void unlock_shared();
diff --git a/include/stddef.h b/include/stddef.h
index 8841bbea2978..faf8552d8ce7 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -53,7 +53,8 @@ using std::nullptr_t;
}
// Re-use the compiler's <stddef.h> max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+ !defined(__DEFINED_max_align_t)
typedef long double max_align_t;
#endif
diff --git a/include/string b/include/string
index ba311efa5a31..1bc91ed12492 100644
--- a/include/string
+++ b/include/string
@@ -637,7 +637,7 @@ public:
typedef basic_string __self;
typedef basic_string_view<_CharT, _Traits> __self_view;
typedef _Traits traits_type;
- typedef typename traits_type::char_type value_type;
+ typedef _CharT value_type;
typedef _Allocator allocator_type;
typedef allocator_traits<allocator_type> __alloc_traits;
typedef typename __alloc_traits::size_type size_type;
@@ -648,7 +648,7 @@ public:
typedef typename __alloc_traits::const_pointer const_pointer;
static_assert(is_pod<value_type>::value, "Character type of basic_string must be a POD");
- static_assert((is_same<_CharT, value_type>::value),
+ static_assert((is_same<_CharT, typename traits_type::char_type>::value),
"traits_type::char_type must be the same type as CharT");
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
@@ -775,30 +775,31 @@ public:
_LIBCPP_INLINE_VISIBILITY
basic_string(basic_string&& __str, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
+ _LIBCPP_INLINE_VISIBILITY basic_string(const _CharT* __s);
_LIBCPP_INLINE_VISIBILITY
- basic_string(const value_type* __s, const allocator_type& __a);
+ basic_string(const _CharT* __s, const _Allocator& __a);
_LIBCPP_INLINE_VISIBILITY
- basic_string(const value_type* __s, size_type __n);
+ basic_string(const _CharT* __s, size_type __n);
_LIBCPP_INLINE_VISIBILITY
- basic_string(const value_type* __s, size_type __n, const allocator_type& __a);
+ basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
_LIBCPP_INLINE_VISIBILITY
- basic_string(size_type __n, value_type __c);
+ basic_string(size_type __n, _CharT __c);
_LIBCPP_INLINE_VISIBILITY
- basic_string(size_type __n, value_type __c, const allocator_type& __a);
+ basic_string(size_type __n, _CharT __c, const _Allocator& __a);
basic_string(const basic_string& __str, size_type __pos, size_type __n,
- const allocator_type& __a = allocator_type());
+ const _Allocator& __a = _Allocator());
_LIBCPP_INLINE_VISIBILITY
basic_string(const basic_string& __str, size_type __pos,
- const allocator_type& __a = allocator_type());
+ const _Allocator& __a = _Allocator());
template<class _Tp>
- basic_string(const _Tp& __t, size_type __pos, size_type __n,
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ basic_string(const _Tp& __t, size_type __pos, size_type __n,
const allocator_type& __a = allocator_type(),
typename enable_if<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, void>::type* = 0);
_LIBCPP_INLINE_VISIBILITY explicit
basic_string(__self_view __sv);
_LIBCPP_INLINE_VISIBILITY
- basic_string(__self_view __sv, const allocator_type& __a);
+ basic_string(__self_view __sv, const _Allocator& __a);
template<class _InputIterator>
_LIBCPP_INLINE_VISIBILITY
basic_string(_InputIterator __first, _InputIterator __last);
@@ -807,9 +808,9 @@ public:
basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
- basic_string(initializer_list<value_type> __il);
+ basic_string(initializer_list<_CharT> __il);
_LIBCPP_INLINE_VISIBILITY
- basic_string(initializer_list<value_type> __il, const allocator_type& __a);
+ basic_string(initializer_list<_CharT> __il, const _Allocator& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
inline ~basic_string();
@@ -927,7 +928,8 @@ public:
basic_string& append(__self_view __sv) { return append(__sv.data(), __sv.size()); }
basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
template <class _Tp>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -937,9 +939,11 @@ public:
basic_string& append(const value_type* __s);
basic_string& append(size_type __n, value_type __c);
template <class _ForwardIterator>
- inline basic_string& __append_forward_unsafe(_ForwardIterator, _ForwardIterator);
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ basic_string& __append_forward_unsafe(_ForwardIterator, _ForwardIterator);
template<class _InputIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_exactly_input_iterator<_InputIterator>::value
|| !__libcpp_string_gets_noexcept_iterator<_InputIterator>::value,
@@ -952,7 +956,8 @@ public:
return *this;
}
template<class _ForwardIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value
&& __libcpp_string_gets_noexcept_iterator<_ForwardIterator>::value,
@@ -988,7 +993,8 @@ public:
#endif
basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
template <class _Tp>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -998,7 +1004,8 @@ public:
basic_string& assign(const value_type* __s);
basic_string& assign(size_type __n, value_type __c);
template<class _InputIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_exactly_input_iterator<_InputIterator>::value
|| !__libcpp_string_gets_noexcept_iterator<_InputIterator>::value,
@@ -1006,7 +1013,8 @@ public:
>::type
assign(_InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value
&& __libcpp_string_gets_noexcept_iterator<_ForwardIterator>::value,
@@ -1023,7 +1031,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
basic_string& insert(size_type __pos1, __self_view __sv) { return insert(__pos1, __sv.data(), __sv.size()); }
template <class _Tp>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1037,7 +1046,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __pos, size_type __n, value_type __c);
template<class _InputIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_exactly_input_iterator<_InputIterator>::value
|| !__libcpp_string_gets_noexcept_iterator<_InputIterator>::value,
@@ -1045,7 +1055,8 @@ public:
>::type
insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value
&& __libcpp_string_gets_noexcept_iterator<_ForwardIterator>::value,
@@ -1070,7 +1081,8 @@ public:
basic_string& replace(size_type __pos1, size_type __n1, __self_view __sv) { return replace(__pos1, __n1, __sv.data(), __sv.size()); }
basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos);
template <class _Tp>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
@@ -1090,7 +1102,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
template<class _InputIterator>
- typename enable_if
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ typename enable_if
<
__is_input_iterator<_InputIterator>::value,
basic_string&
@@ -1325,15 +1338,15 @@ private:
__align_it<sizeof(value_type) < __alignment ?
__alignment/sizeof(value_type) : 1 > (__s+1)) - 1;}
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
void __init(const value_type* __s, size_type __sz, size_type __reserve);
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
void __init(const value_type* __s, size_type __sz);
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
void __init(size_type __n, value_type __c);
template <class _InputIterator>
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
typename enable_if
<
__is_exactly_input_iterator<_InputIterator>::value,
@@ -1342,7 +1355,7 @@ private:
__init(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator>
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value,
@@ -1367,12 +1380,28 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const basic_string& __str, true_type)
{
- if (__alloc() != __str.__alloc())
+ if (__alloc() == __str.__alloc())
+ __alloc() = __str.__alloc();
+ else
{
- clear();
- shrink_to_fit();
+ if (!__str.__is_long())
+ {
+ clear();
+ shrink_to_fit();
+ __alloc() = __str.__alloc();
+ }
+ else
+ {
+ allocator_type __a = __str.__alloc();
+ pointer __p = __alloc_traits::allocate(__a, __str.__get_long_cap());
+ clear();
+ shrink_to_fit();
+ __alloc() = _VSTD::move(__a);
+ __set_long_pointer(__p);
+ __set_long_cap(__str.__get_long_cap());
+ __set_long_size(__str.size());
+ }
}
- __alloc() = __str.__alloc();
}
_LIBCPP_INLINE_VISIBILITY
@@ -1482,7 +1511,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __
#else
_NOEXCEPT
#endif
-: __r_(__a)
+: __r_(__second_tag(), __a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
@@ -1541,7 +1570,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s)
{
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
__init(__s, traits_type::length(__s));
@@ -1552,8 +1581,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s)
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr");
__init(__s, traits_type::length(__s));
@@ -1564,7 +1593,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, c
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, size_type __n)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n)
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
__init(__s, __n);
@@ -1575,8 +1604,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, s
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, size_type __n, const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
__init(__s, __n);
@@ -1587,7 +1616,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, s
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str)
- : __r_(__alloc_traits::select_on_container_copy_construction(__str.__alloc()))
+ : __r_(__second_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc()))
{
if (!__str.__is_long())
__r_.first().__r = __str.__r_.first().__r;
@@ -1599,8 +1628,9 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
}
template <class _CharT, class _Traits, class _Allocator>
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(
+ const basic_string& __str, const allocator_type& __a)
+ : __r_(__second_tag(), __a)
{
if (!__str.__is_long())
__r_.first().__r = __str.__r_.first().__r;
@@ -1634,7 +1664,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, const allocator_type& __a)
- : __r_(__a)
+ : __r_(__second_tag(), __a)
{
if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
__init(_VSTD::__to_raw_pointer(__str.__get_long_pointer()), __str.__get_long_size());
@@ -1678,7 +1708,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c)
{
__init(__n, __c);
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1688,8 +1718,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_typ
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c, const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
__init(__n, __c);
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1698,9 +1728,10 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_typ
}
template <class _CharT, class _Traits, class _Allocator>
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos, size_type __n,
- const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str,
+ size_type __pos, size_type __n,
+ const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
size_type __str_sz = __str.size();
if (__pos > __str_sz)
@@ -1714,8 +1745,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos,
- const allocator_type& __a)
- : __r_(__a)
+ const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
size_type __str_sz = __str.size();
if (__pos > __str_sz)
@@ -1731,13 +1762,13 @@ template <class _Tp>
basic_string<_CharT, _Traits, _Allocator>::basic_string(
const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a,
typename enable_if<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, void>::type *)
- : __r_(__a)
+ : __r_(__second_tag(), __a)
{
__self_view __sv = __self_view(__t).substr(__pos, __n);
__init(__sv.data(), __sv.size());
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
-#endif
+#endif
}
template <class _CharT, class _Traits, class _Allocator>
@@ -1752,8 +1783,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(__self_view __sv)
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(__self_view __sv, const allocator_type& __a)
- : __r_(__a)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(__self_view __sv, const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
__init(__sv.data(), __sv.size());
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1835,7 +1866,7 @@ template<class _InputIterator>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, _InputIterator __last,
const allocator_type& __a)
- : __r_(__a)
+ : __r_(__second_tag(), __a)
{
__init(__first, __last);
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1847,7 +1878,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first,
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_type> __il)
+basic_string<_CharT, _Traits, _Allocator>::basic_string(
+ initializer_list<_CharT> __il)
{
__init(__il.begin(), __il.end());
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1857,8 +1889,10 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_t
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
-basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_type> __il, const allocator_type& __a)
- : __r_(__a)
+
+basic_string<_CharT, _Traits, _Allocator>::basic_string(
+ initializer_list<_CharT> __il, const _Allocator& __a)
+ : __r_(__second_tag(), __a)
{
__init(__il.begin(), __il.end());
#if _LIBCPP_DEBUG_LEVEL >= 2
@@ -2242,7 +2276,9 @@ basic_string<_CharT, _Traits, _Allocator>::__append_forward_unsafe(
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n)
{
- if ( __ptr_in_range(&*__first, data(), data() + size()))
+ typedef typename iterator_traits<_ForwardIterator>::reference _CharRef;
+ _CharRef __tmp_ref = *__first;
+ if (__ptr_in_range(_VSTD::addressof(__tmp_ref), data(), data() + size()))
{
const basic_string __temp (__first, __last, __alloc());
append(__temp.data(), __temp.size());
@@ -2406,7 +2442,9 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _Forward
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n)
{
- if ( __ptr_in_range(&*__first, data(), data() + size()))
+ typedef typename iterator_traits<_ForwardIterator>::reference _CharRef;
+ _CharRef __tmp_char = *__first;
+ if (__ptr_in_range(_VSTD::addressof(__tmp_char), data(), data() + size()))
{
const basic_string __temp(__first, __last, __alloc());
return insert(__pos, __temp.data(), __temp.data() + __temp.size());
@@ -2526,6 +2564,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_typ
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
_LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
size_type __sz = size();
@@ -2565,6 +2604,8 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
}
traits_type::move(__p + __pos, __s, __n2);
__finish:
+// __sz += __n2 - __n1; in this and the below function below can cause unsigned integer overflow,
+// but this is a safe operation, so we disable the check.
__sz += __n2 - __n1;
__set_size(__sz);
__invalidate_iterators_past(__sz);
@@ -2578,6 +2619,7 @@ __finish:
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, size_type __n2, value_type __c)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
size_type __sz = size();
if (__pos > __sz)
diff --git a/include/string_view b/include/string_view
index 20a4e06cd4cc..5c42b36ca565 100644
--- a/include/string_view
+++ b/include/string_view
@@ -199,6 +199,10 @@ public:
typedef ptrdiff_t difference_type;
static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
+ static_assert(is_pod<value_type>::value, "Character type of basic_string_view must be a POD");
+ static_assert((is_same<_CharT, typename traits_type::char_type>::value),
+ "traits_type::char_type must be the same type as CharT");
+
// [string.view.cons], construct/copy
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view() _NOEXCEPT : __data (nullptr), __size(0) {}
@@ -206,7 +210,7 @@ public:
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view(const basic_string_view&) _NOEXCEPT = default;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default;
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
@@ -235,16 +239,16 @@ public:
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
const_iterator cend() const _NOEXCEPT { return __data + __size; }
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator rend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator crbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator crend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
// [string.view.capacity], capacity
diff --git a/include/support/fuchsia/xlocale.h b/include/support/fuchsia/xlocale.h
new file mode 100644
index 000000000000..1de2fca28e22
--- /dev/null
+++ b/include/support/fuchsia/xlocale.h
@@ -0,0 +1,23 @@
+// -*- C++ -*-
+//===------------------- support/fuchsia/xlocale.h ------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+
+#if defined(__Fuchsia__)
+
+#include <cstdlib>
+#include <cwchar>
+#include <support/xlocale/__posix_l_fallback.h>
+#include <support/xlocale/__strtonum_fallback.h>
+
+#endif // defined(__Fuchsia__)
+
+#endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
diff --git a/include/support/win32/locale_win32.h b/include/support/win32/locale_win32.h
index ebf5bda740a5..2f4f90f52af5 100644
--- a/include/support/win32/locale_win32.h
+++ b/include/support/win32/locale_win32.h
@@ -11,13 +11,6 @@
#ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
-#include <crtversion.h>
-
-#if _VC_CRT_MAJOR_VERSION < 14
-// ctype mask table defined in msvcrt.dll
-extern "C" unsigned short __declspec(dllimport) _ctype[];
-#endif
-
#include "support/win32/support.h"
#include "support/win32/locale_mgmt_win32.h"
#include <stdio.h>
diff --git a/include/support/win32/support.h b/include/support/win32/support.h
index f9613445cffb..e48b08ddad03 100644
--- a/include/support/win32/support.h
+++ b/include/support/win32/support.h
@@ -21,9 +21,6 @@
#if defined(_LIBCPP_COMPILER_MSVC)
#include <intrin.h>
#endif
-#if defined(_LIBCPP_MSVCRT)
-#include <crtversion.h>
-#endif
#define swprintf _snwprintf
#define vswprintf _vsnwprintf
@@ -44,11 +41,6 @@ size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
}
#endif // __MINGW32__
-#if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14
-#define snprintf _snprintf
-#define _Exit _exit
-#endif
-
#if defined(_LIBCPP_COMPILER_MSVC)
// Bit builtin's make these assumptions when calling _BitScanForward/Reverse
diff --git a/include/system_error b/include/system_error
index 3257ef9569fb..a29807db0d65 100644
--- a/include/system_error
+++ b/include/system_error
@@ -385,7 +385,7 @@ public:
virtual ~error_category() _NOEXCEPT;
#if defined(_LIBCPP_BUILDING_SYSTEM_ERROR) && \
- defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
+ defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
error_category() _NOEXCEPT;
#else
_LIBCPP_ALWAYS_INLINE
diff --git a/include/thread b/include/thread
index 479e3c08f809..874ce3ec196c 100644
--- a/include/thread
+++ b/include/thread
@@ -261,7 +261,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>
: public unary_function<__thread_id, size_t>
{
_LIBCPP_INLINE_VISIBILITY
- size_t operator()(__thread_id __v) const
+ size_t operator()(__thread_id __v) const _NOEXCEPT
{
return hash<__libcpp_thread_id>()(__v.__id_);
}
@@ -290,7 +290,7 @@ public:
typedef __libcpp_thread_t native_handle_type;
_LIBCPP_INLINE_VISIBILITY
- thread() _NOEXCEPT : __t_(0) {}
+ thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {}
#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class _Fp, class ..._Args,
class = typename enable_if
@@ -298,15 +298,18 @@ public:
!is_same<typename decay<_Fp>::type, thread>::value
>::type
>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
explicit thread(_Fp&& __f, _Args&&... __args);
#else // _LIBCPP_HAS_NO_VARIADICS
- template <class _Fp> explicit thread(_Fp __f);
+ template <class _Fp>
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+ explicit thread(_Fp __f);
#endif
~thread();
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
- thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) {__t.__t_ = 0;}
+ thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) {__t.__t_ = _LIBCPP_NULL_THREAD;}
_LIBCPP_INLINE_VISIBILITY
thread& operator=(thread&& __t) _NOEXCEPT;
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -315,7 +318,7 @@ public:
void swap(thread& __t) _NOEXCEPT {_VSTD::swap(__t_, __t.__t_);}
_LIBCPP_INLINE_VISIBILITY
- bool joinable() const _NOEXCEPT {return __t_ != 0;}
+ bool joinable() const _NOEXCEPT {return !__libcpp_thread_isnull(&__t_);}
void join();
void detach();
_LIBCPP_INLINE_VISIBILITY
@@ -409,10 +412,10 @@ inline
thread&
thread::operator=(thread&& __t) _NOEXCEPT
{
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
terminate();
__t_ = __t.__t_;
- __t.__t_ = 0;
+ __t.__t_ = _LIBCPP_NULL_THREAD;
return *this;
}
@@ -424,7 +427,7 @@ void swap(thread& __x, thread& __y) _NOEXCEPT {__x.swap(__y);}
namespace this_thread
{
-_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& ns);
+_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
template <class _Rep, class _Period>
void
diff --git a/include/tuple b/include/tuple
index cddb70954ee0..f2a74721921a 100644
--- a/include/tuple
+++ b/include/tuple
@@ -366,7 +366,7 @@ struct __all_default_constructible<__tuple_types<_Tp...>>
template<class _Indx, class ..._Tp> struct __tuple_impl;
template<size_t ..._Indx, class ..._Tp>
-struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
+struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
: public __tuple_leaf<_Indx, _Tp>...
{
_LIBCPP_INLINE_VISIBILITY
@@ -751,7 +751,7 @@ public:
_CheckArgsConstructor<
!_EnableImplicitReducedArityExtension
&& sizeof...(_Up) < sizeof...(_Tp)
- && !_PackExpandsToThisTuple<_Up...>()
+ && !_PackExpandsToThisTuple<_Up...>::value
>::template __enable_implicit<_Up...>(),
bool
>::type = false
@@ -1064,11 +1064,13 @@ template <class _Up>
struct __ignore_t
{
template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- const __ignore_t& operator=(_Tp&&) const {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ const __ignore_t& operator=(_Tp&&) const {return *this;}
};
-namespace { const __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>(); }
+namespace {
+ constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
+}
template <class _Tp>
struct __make_tuple_return_impl
diff --git a/include/type_traits b/include/type_traits
index 7862955605df..9db4d66145fc 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -97,6 +97,7 @@ namespace std
template <class T> struct is_polymorphic;
template <class T> struct is_abstract;
template <class T> struct is_final; // C++14
+ template <class T> struct is_aggregate; // C++17
template <class T, class... Args> struct is_constructible;
template <class T> struct is_default_constructible;
@@ -286,6 +287,8 @@ namespace std
= is_abstract<T>::value; // C++17
template <class T> constexpr bool is_final_v
= is_final<T>::value; // C++17
+ template <class T> constexpr bool is_aggregate_v
+ = is_aggregate<T>::value; // C++17
template <class T> constexpr bool is_signed_v
= is_signed<T>::value; // C++17
template <class T> constexpr bool is_unsigned_v
@@ -1272,11 +1275,13 @@ template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_T
// decay
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS decay
-{
-private:
- typedef typename remove_reference<_Tp>::type _Up;
+template <class _Up, bool>
+struct __decay {
+ typedef typename remove_cv<_Up>::type type;
+};
+
+template <class _Up>
+struct __decay<_Up, true> {
public:
typedef typename conditional
<
@@ -1291,24 +1296,23 @@ public:
>::type type;
};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS decay
+{
+private:
+ typedef typename remove_reference<_Tp>::type _Up;
+public:
+ typedef typename __decay<_Up, __is_referenceable<_Up>::value>::type type;
+};
+
#if _LIBCPP_STD_VER > 11
template <class _Tp> using decay_t = typename decay<_Tp>::type;
#endif
// is_abstract
-namespace __is_abstract_imp
-{
-template <class _Tp> char __test(_Tp (*)[1]);
-template <class _Tp> __two __test(...);
-}
-
-template <class _Tp, bool = is_class<_Tp>::value>
-struct __libcpp_abstract : public integral_constant<bool, sizeof(__is_abstract_imp::__test<_Tp>(0)) != 1> {};
-
-template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {};
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract : public __libcpp_abstract<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract
+ : public integral_constant<bool, __is_abstract(_Tp)> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v
@@ -1335,6 +1339,19 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_final_v
= is_final<_Tp>::value;
#endif
+// is_aggregate
+#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
+
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
+is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};
+
+#if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
+template <class _Tp>
+constexpr bool is_aggregate_v = is_aggregate<_Tp>::value;
+#endif
+
+#endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
+
// is_base_of
#ifdef _LIBCPP_HAS_IS_BASE_OF
@@ -1964,11 +1981,18 @@ public:
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp>::type type;
};
+template <>
+struct _LIBCPP_TEMPLATE_VIS common_type<void, void, void>
+{
+public:
+ typedef void type;
+};
+
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, void, void>
{
public:
- typedef typename decay<_Tp>::type type;
+ typedef typename common_type<_Tp, _Tp>::type type;
};
template <class _Tp, class _Up>
@@ -1990,9 +2014,7 @@ struct _LIBCPP_TEMPLATE_VIS common_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp>
-{
- typedef typename decay<_Tp>::type type;
-};
+ : public common_type<_Tp, _Tp> {};
// bullet 3 - sizeof...(Tp) == 2
@@ -4717,4 +4739,35 @@ struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy>
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+// std::byte
+namespace std // purposefully not versioned
+{
+template <class _Integer>
+ constexpr typename enable_if<is_integral_v<_Integer>, byte>::type &
+ operator<<=(byte& __lhs, _Integer __shift) noexcept
+ { return __lhs = byte(static_cast<unsigned char>(__lhs) << __shift); }
+
+template <class _Integer>
+ constexpr typename enable_if<is_integral_v<_Integer>, byte>::type
+ operator<< (byte __lhs, _Integer __shift) noexcept
+ { return byte(static_cast<unsigned char>(__lhs) << __shift); }
+
+template <class _Integer>
+ constexpr typename enable_if<is_integral_v<_Integer>, byte>::type &
+ operator>>=(byte& __lhs, _Integer __shift) noexcept
+ { return __lhs = byte(static_cast<unsigned char>(__lhs) >> __shift); }
+
+template <class _Integer>
+ constexpr typename enable_if<is_integral_v<_Integer>, byte>::type
+ operator>> (byte __lhs, _Integer __shift) noexcept
+ { return byte(static_cast<unsigned char>(__lhs) >> __shift); }
+
+template <class _Integer>
+ constexpr typename enable_if<is_integral_v<_Integer>, _Integer>::type
+ to_integer(byte __b) noexcept { return _Integer(__b); }
+
+}
+#endif
+
#endif // _LIBCPP_TYPE_TRAITS
diff --git a/include/typeinfo b/include/typeinfo
index fdc25c81e94f..4145ac1a3737 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -69,7 +69,9 @@ public:
#pragma GCC system_header
#endif
-#if defined(_LIBCPP_NONUNIQUE_RTTI_BIT)
+#if defined(_LIBCPP_ABI_MICROSOFT)
+#include <vcruntime_typeinfo.h>
+#elif defined(_LIBCPP_NONUNIQUE_RTTI_BIT)
#define _LIBCPP_HAS_NONUNIQUE_TYPEINFO
#else
#define _LIBCPP_HAS_UNIQUE_TYPEINFO
@@ -78,6 +80,7 @@ public:
namespace std // purposefully not using versioning namespace
{
+#if !defined(_LIBCPP_ABI_MICROSOFT)
class _LIBCPP_EXCEPTION_ABI type_info
{
type_info& operator=(const type_info&);
@@ -187,6 +190,8 @@ public:
virtual const char* what() const _NOEXCEPT;
};
+#endif // !_LIBCPP_ABI_MICROSOFT
+
} // std
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/include/unordered_map b/include/unordered_map
index 7baf638833f0..4fdac160f928 100644
--- a/include/unordered_map
+++ b/include/unordered_map
@@ -379,9 +379,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Key, class _Cp, class _Hash,
- bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value
- >
+template <class _Key, class _Cp, class _Hash, bool _IsEmpty>
class __unordered_map_hasher
: private _Hash
{
@@ -406,7 +404,7 @@ public:
_NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
{
using _VSTD::swap;
- swap(static_cast<const _Hash&>(*this), static_cast<const _Hash&>(__y));
+ swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
}
};
@@ -449,9 +447,7 @@ swap(__unordered_map_hasher<_Key, _Cp, _Hash, __b>& __x,
__x.swap(__y);
}
-template <class _Key, class _Cp, class _Pred,
- bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value
- >
+template <class _Key, class _Cp, class _Pred, bool _IsEmpty>
class __unordered_map_equal
: private _Pred
{
@@ -479,7 +475,7 @@ public:
_NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
{
using _VSTD::swap;
- swap(static_cast<const _Pred&>(*this), static_cast<const _Pred&>(__y));
+ swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
}
};
diff --git a/include/utility b/include/utility
index cc0646cbd270..1f41c0771128 100644
--- a/include/utility
+++ b/include/utility
@@ -198,6 +198,9 @@ template <size_t I>
#include <__tuple>
#include <type_traits>
#include <initializer_list>
+#include <cstddef>
+#include <cstring>
+#include <cstdint>
#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -930,6 +933,661 @@ using __is_inplace_type = __is_inplace_type_imp<__uncvref_t<_Tp>>;
#endif // _LIBCPP_STD_VER > 14
+template <class _Arg, class _Result>
+struct _LIBCPP_TEMPLATE_VIS unary_function
+{
+ typedef _Arg argument_type;
+ typedef _Result result_type;
+};
+
+template <class _Size>
+inline _LIBCPP_INLINE_VISIBILITY
+_Size
+__loadword(const void* __p)
+{
+ _Size __r;
+ std::memcpy(&__r, __p, sizeof(__r));
+ return __r;
+}
+
+// We use murmur2 when size_t is 32 bits, and cityhash64 when size_t
+// is 64 bits. This is because cityhash64 uses 64bit x 64bit
+// multiplication, which can be very slow on 32-bit systems.
+template <class _Size, size_t = sizeof(_Size)*__CHAR_BIT__>
+struct __murmur2_or_cityhash;
+
+template <class _Size>
+struct __murmur2_or_cityhash<_Size, 32>
+{
+ inline _Size operator()(const void* __key, _Size __len)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
+};
+
+// murmur2
+template <class _Size>
+_Size
+__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len)
+{
+ const _Size __m = 0x5bd1e995;
+ const _Size __r = 24;
+ _Size __h = __len;
+ const unsigned char* __data = static_cast<const unsigned char*>(__key);
+ for (; __len >= 4; __data += 4, __len -= 4)
+ {
+ _Size __k = __loadword<_Size>(__data);
+ __k *= __m;
+ __k ^= __k >> __r;
+ __k *= __m;
+ __h *= __m;
+ __h ^= __k;
+ }
+ switch (__len)
+ {
+ case 3:
+ __h ^= __data[2] << 16;
+ case 2:
+ __h ^= __data[1] << 8;
+ case 1:
+ __h ^= __data[0];
+ __h *= __m;
+ }
+ __h ^= __h >> 13;
+ __h *= __m;
+ __h ^= __h >> 15;
+ return __h;
+}
+
+template <class _Size>
+struct __murmur2_or_cityhash<_Size, 64>
+{
+ inline _Size operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
+
+ private:
+ // Some primes between 2^63 and 2^64.
+ static const _Size __k0 = 0xc3a5c85c97cb3127ULL;
+ static const _Size __k1 = 0xb492b66fbe98f273ULL;
+ static const _Size __k2 = 0x9ae16a3b2f90404fULL;
+ static const _Size __k3 = 0xc949d7c7509e6557ULL;
+
+ static _Size __rotate(_Size __val, int __shift) {
+ return __shift == 0 ? __val : ((__val >> __shift) | (__val << (64 - __shift)));
+ }
+
+ static _Size __rotate_by_at_least_1(_Size __val, int __shift) {
+ return (__val >> __shift) | (__val << (64 - __shift));
+ }
+
+ static _Size __shift_mix(_Size __val) {
+ return __val ^ (__val >> 47);
+ }
+
+ static _Size __hash_len_16(_Size __u, _Size __v)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ const _Size __mul = 0x9ddfea08eb382d69ULL;
+ _Size __a = (__u ^ __v) * __mul;
+ __a ^= (__a >> 47);
+ _Size __b = (__v ^ __a) * __mul;
+ __b ^= (__b >> 47);
+ __b *= __mul;
+ return __b;
+ }
+
+ static _Size __hash_len_0_to_16(const char* __s, _Size __len)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ if (__len > 8) {
+ const _Size __a = __loadword<_Size>(__s);
+ const _Size __b = __loadword<_Size>(__s + __len - 8);
+ return __hash_len_16(__a, __rotate_by_at_least_1(__b + __len, __len)) ^ __b;
+ }
+ if (__len >= 4) {
+ const uint32_t __a = __loadword<uint32_t>(__s);
+ const uint32_t __b = __loadword<uint32_t>(__s + __len - 4);
+ return __hash_len_16(__len + (__a << 3), __b);
+ }
+ if (__len > 0) {
+ const unsigned char __a = __s[0];
+ const unsigned char __b = __s[__len >> 1];
+ const unsigned char __c = __s[__len - 1];
+ const uint32_t __y = static_cast<uint32_t>(__a) +
+ (static_cast<uint32_t>(__b) << 8);
+ const uint32_t __z = __len + (static_cast<uint32_t>(__c) << 2);
+ return __shift_mix(__y * __k2 ^ __z * __k3) * __k2;
+ }
+ return __k2;
+ }
+
+ static _Size __hash_len_17_to_32(const char *__s, _Size __len)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ const _Size __a = __loadword<_Size>(__s) * __k1;
+ const _Size __b = __loadword<_Size>(__s + 8);
+ const _Size __c = __loadword<_Size>(__s + __len - 8) * __k2;
+ const _Size __d = __loadword<_Size>(__s + __len - 16) * __k0;
+ return __hash_len_16(__rotate(__a - __b, 43) + __rotate(__c, 30) + __d,
+ __a + __rotate(__b ^ __k3, 20) - __c + __len);
+ }
+
+ // Return a 16-byte hash for 48 bytes. Quick and dirty.
+ // Callers do best to use "random-looking" values for a and b.
+ static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
+ _Size __w, _Size __x, _Size __y, _Size __z, _Size __a, _Size __b)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ __a += __w;
+ __b = __rotate(__b + __a + __z, 21);
+ const _Size __c = __a;
+ __a += __x;
+ __a += __y;
+ __b += __rotate(__a, 44);
+ return pair<_Size, _Size>(__a + __z, __b + __c);
+ }
+
+ // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty.
+ static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
+ const char* __s, _Size __a, _Size __b)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ return __weak_hash_len_32_with_seeds(__loadword<_Size>(__s),
+ __loadword<_Size>(__s + 8),
+ __loadword<_Size>(__s + 16),
+ __loadword<_Size>(__s + 24),
+ __a,
+ __b);
+ }
+
+ // Return an 8-byte hash for 33 to 64 bytes.
+ static _Size __hash_len_33_to_64(const char *__s, size_t __len)
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+ {
+ _Size __z = __loadword<_Size>(__s + 24);
+ _Size __a = __loadword<_Size>(__s) +
+ (__len + __loadword<_Size>(__s + __len - 16)) * __k0;
+ _Size __b = __rotate(__a + __z, 52);
+ _Size __c = __rotate(__a, 37);
+ __a += __loadword<_Size>(__s + 8);
+ __c += __rotate(__a, 7);
+ __a += __loadword<_Size>(__s + 16);
+ _Size __vf = __a + __z;
+ _Size __vs = __b + __rotate(__a, 31) + __c;
+ __a = __loadword<_Size>(__s + 16) + __loadword<_Size>(__s + __len - 32);
+ __z += __loadword<_Size>(__s + __len - 8);
+ __b = __rotate(__a + __z, 52);
+ __c = __rotate(__a, 37);
+ __a += __loadword<_Size>(__s + __len - 24);
+ __c += __rotate(__a, 7);
+ __a += __loadword<_Size>(__s + __len - 16);
+ _Size __wf = __a + __z;
+ _Size __ws = __b + __rotate(__a, 31) + __c;
+ _Size __r = __shift_mix((__vf + __ws) * __k2 + (__wf + __vs) * __k0);
+ return __shift_mix(__r * __k0 + __vs) * __k2;
+ }
+};
+
+// cityhash64
+template <class _Size>
+_Size
+__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len)
+{
+ const char* __s = static_cast<const char*>(__key);
+ if (__len <= 32) {
+ if (__len <= 16) {
+ return __hash_len_0_to_16(__s, __len);
+ } else {
+ return __hash_len_17_to_32(__s, __len);
+ }
+ } else if (__len <= 64) {
+ return __hash_len_33_to_64(__s, __len);
+ }
+
+ // For strings over 64 bytes we hash the end first, and then as we
+ // loop we keep 56 bytes of state: v, w, x, y, and z.
+ _Size __x = __loadword<_Size>(__s + __len - 40);
+ _Size __y = __loadword<_Size>(__s + __len - 16) +
+ __loadword<_Size>(__s + __len - 56);
+ _Size __z = __hash_len_16(__loadword<_Size>(__s + __len - 48) + __len,
+ __loadword<_Size>(__s + __len - 24));
+ pair<_Size, _Size> __v = __weak_hash_len_32_with_seeds(__s + __len - 64, __len, __z);
+ pair<_Size, _Size> __w = __weak_hash_len_32_with_seeds(__s + __len - 32, __y + __k1, __x);
+ __x = __x * __k1 + __loadword<_Size>(__s);
+
+ // Decrease len to the nearest multiple of 64, and operate on 64-byte chunks.
+ __len = (__len - 1) & ~static_cast<_Size>(63);
+ do {
+ __x = __rotate(__x + __y + __v.first + __loadword<_Size>(__s + 8), 37) * __k1;
+ __y = __rotate(__y + __v.second + __loadword<_Size>(__s + 48), 42) * __k1;
+ __x ^= __w.second;
+ __y += __v.first + __loadword<_Size>(__s + 40);
+ __z = __rotate(__z + __w.first, 33) * __k1;
+ __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
+ __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
+ __y + __loadword<_Size>(__s + 16));
+ std::swap(__z, __x);
+ __s += 64;
+ __len -= 64;
+ } while (__len != 0);
+ return __hash_len_16(
+ __hash_len_16(__v.first, __w.first) + __shift_mix(__y) * __k1 + __z,
+ __hash_len_16(__v.second, __w.second) + __x);
+}
+
+template <class _Tp, size_t = sizeof(_Tp) / sizeof(size_t)>
+struct __scalar_hash;
+
+template <class _Tp>
+struct __scalar_hash<_Tp, 0>
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp __t;
+ size_t __a;
+ } __u;
+ __u.__a = 0;
+ __u.__t = __v;
+ return __u.__a;
+ }
+};
+
+template <class _Tp>
+struct __scalar_hash<_Tp, 1>
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp __t;
+ size_t __a;
+ } __u;
+ __u.__t = __v;
+ return __u.__a;
+ }
+};
+
+template <class _Tp>
+struct __scalar_hash<_Tp, 2>
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp __t;
+ struct
+ {
+ size_t __a;
+ size_t __b;
+ } __s;
+ } __u;
+ __u.__t = __v;
+ return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
+ }
+};
+
+template <class _Tp>
+struct __scalar_hash<_Tp, 3>
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp __t;
+ struct
+ {
+ size_t __a;
+ size_t __b;
+ size_t __c;
+ } __s;
+ } __u;
+ __u.__t = __v;
+ return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
+ }
+};
+
+template <class _Tp>
+struct __scalar_hash<_Tp, 4>
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp __t;
+ struct
+ {
+ size_t __a;
+ size_t __b;
+ size_t __c;
+ size_t __d;
+ } __s;
+ } __u;
+ __u.__t = __v;
+ return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
+ }
+};
+
+struct _PairT {
+ size_t first;
+ size_t second;
+};
+
+_LIBCPP_INLINE_VISIBILITY
+inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
+ typedef __scalar_hash<_PairT> _HashT;
+ const _PairT __p = {__lhs, __rhs};
+ return _HashT()(__p);
+}
+
+template<class _Tp>
+struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
+ : public unary_function<_Tp*, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp* __v) const _NOEXCEPT
+ {
+ union
+ {
+ _Tp* __t;
+ size_t __a;
+ } __u;
+ __u.__t = __v;
+ return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
+ }
+};
+
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<bool>
+ : public unary_function<bool, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(bool __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<char>
+ : public unary_function<char, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<signed char>
+ : public unary_function<signed char, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(signed char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
+ : public unary_function<unsigned char, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
+ : public unary_function<char16_t, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(char16_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<char32_t>
+ : public unary_function<char32_t, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<wchar_t>
+ : public unary_function<wchar_t, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(wchar_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<short>
+ : public unary_function<short, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
+ : public unary_function<unsigned short, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(unsigned short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<int>
+ : public unary_function<int, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
+ : public unary_function<unsigned int, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(unsigned int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<long>
+ : public unary_function<long, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
+ : public unary_function<unsigned long, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(unsigned long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<long long>
+ : public __scalar_hash<long long>
+{
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long>
+ : public __scalar_hash<unsigned long long>
+{
+};
+
+#ifndef _LIBCPP_HAS_NO_INT128
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<__int128_t>
+ : public __scalar_hash<__int128_t>
+{
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
+ : public __scalar_hash<__uint128_t>
+{
+};
+
+#endif
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<float>
+ : public __scalar_hash<float>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(float __v) const _NOEXCEPT
+ {
+ // -0.0 and 0.0 should return same hash
+ if (__v == 0)
+ return 0;
+ return __scalar_hash<float>::operator()(__v);
+ }
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<double>
+ : public __scalar_hash<double>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(double __v) const _NOEXCEPT
+ {
+ // -0.0 and 0.0 should return same hash
+ if (__v == 0)
+ return 0;
+ return __scalar_hash<double>::operator()(__v);
+ }
+};
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<long double>
+ : public __scalar_hash<long double>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(long double __v) const _NOEXCEPT
+ {
+ // -0.0 and 0.0 should return same hash
+ if (__v == 0)
+ return 0;
+#if defined(__i386__)
+ // Zero out padding bits
+ union
+ {
+ long double __t;
+ struct
+ {
+ size_t __a;
+ size_t __b;
+ size_t __c;
+ size_t __d;
+ } __s;
+ } __u;
+ __u.__s.__a = 0;
+ __u.__s.__b = 0;
+ __u.__s.__c = 0;
+ __u.__s.__d = 0;
+ __u.__t = __v;
+ return __u.__s.__a ^ __u.__s.__b ^ __u.__s.__c ^ __u.__s.__d;
+#elif defined(__x86_64__)
+ // Zero out padding bits
+ union
+ {
+ long double __t;
+ struct
+ {
+ size_t __a;
+ size_t __b;
+ } __s;
+ } __u;
+ __u.__s.__a = 0;
+ __u.__s.__b = 0;
+ __u.__t = __v;
+ return __u.__s.__a ^ __u.__s.__b;
+#else
+ return __scalar_hash<long double>::operator()(__v);
+#endif
+ }
+};
+
+#if _LIBCPP_STD_VER > 11
+
+template <class _Tp, bool = is_enum<_Tp>::value>
+struct _LIBCPP_TEMPLATE_VIS __enum_hash
+ : public unary_function<_Tp, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(_Tp __v) const _NOEXCEPT
+ {
+ typedef typename underlying_type<_Tp>::type type;
+ return hash<type>{}(static_cast<type>(__v));
+ }
+};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
+ __enum_hash() = delete;
+ __enum_hash(__enum_hash const&) = delete;
+ __enum_hash& operator=(__enum_hash const&) = delete;
+};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
+{
+};
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
+ : public unary_function<nullptr_t, size_t>
+{
+ _LIBCPP_INLINE_VISIBILITY
+ size_t operator()(nullptr_t) const _NOEXCEPT {
+ return 662607004ull;
+ }
+};
+#endif
+
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Key, class _Hash>
+using __check_hash_requirements = integral_constant<bool,
+ is_copy_constructible<_Hash>::value &&
+ is_move_constructible<_Hash>::value &&
+ __invokable_r<size_t, _Hash, _Key const&>::value
+>;
+
+template <class _Key, class _Hash = std::hash<_Key> >
+using __has_enabled_hash = integral_constant<bool,
+ __check_hash_requirements<_Key, _Hash>::value &&
+ is_default_constructible<_Hash>::value
+>;
+
+#if _LIBCPP_STD_VER > 14
+template <class _Type, class>
+using __enable_hash_helper_imp = _Type;
+
+template <class _Type, class ..._Keys>
+using __enable_hash_helper = __enable_hash_helper_imp<_Type,
+ typename enable_if<__all<__has_enabled_hash<_Keys>::value...>::value>::type
+>;
+#else
+template <class _Type, class ...>
+using __enable_hash_helper = _Type;
+#endif
+
+#endif // !_LIBCPP_CXX03_LANG
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_UTILITY
diff --git a/include/variant b/include/variant
index bbd4bf4895ad..88f7b240d029 100644
--- a/include/variant
+++ b/include/variant
@@ -53,16 +53,16 @@ namespace std {
// 20.7.2.4, modifiers
template <class T, class... Args>
- void emplace(Args&&...);
+ T& emplace(Args&&...);
template <class T, class U, class... Args>
- void emplace(initializer_list<U>, Args&&...);
+ T& emplace(initializer_list<U>, Args&&...);
template <size_t I, class... Args>
- void emplace(Args&&...);
+ variant_alternative_t<I, variant>& emplace(Args&&...);
template <size_t I, class U, class... Args>
- void emplace(initializer_list<U>, Args&&...);
+ variant_alternative_t<I, variant>& emplace(initializer_list<U>, Args&&...);
// 20.7.2.5, value status
constexpr bool valueless_by_exception() const noexcept;
@@ -466,17 +466,21 @@ private:
return __result{{_VSTD::forward<_Fs>(__fs)...}};
}
- template <class _Fp, class... _Vs, size_t... _Is>
- inline _LIBCPP_INLINE_VISIBILITY
- static constexpr auto __make_dispatch(index_sequence<_Is...>) {
- struct __dispatcher {
- static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) {
+ template <std::size_t... _Is>
+ struct __dispatcher {
+ template <class _Fp, class... _Vs>
+ inline _LIBCPP_INLINE_VISIBILITY
+ static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) {
return __invoke_constexpr(
static_cast<_Fp>(__f),
__access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...);
- }
- };
- return _VSTD::addressof(__dispatcher::__dispatch);
+ }
+ };
+
+ template <class _Fp, class... _Vs, size_t... _Is>
+ inline _LIBCPP_INLINE_VISIBILITY
+ static constexpr auto __make_dispatch(index_sequence<_Is...>) {
+ return __dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>;
}
template <size_t _Ip, class _Fp, class... _Vs>
@@ -760,9 +764,10 @@ public:
protected:
template <size_t _Ip, class _Tp, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
- static void __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
- ::new (_VSTD::addressof(__a))
+ static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
+ ::new ((void*)_VSTD::addressof(__a))
__alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...);
+ return __a.__value;
}
template <class _Rhs>
@@ -872,11 +877,12 @@ public:
template <size_t _Ip, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
- void __emplace(_Args&&... __args) {
+ auto& __emplace(_Args&&... __args) {
this->__destroy();
- this->__construct_alt(__access::__base::__get_alt<_Ip>(*this),
+ auto& __res = this->__construct_alt(__access::__base::__get_alt<_Ip>(*this),
_VSTD::forward<_Args>(__args)...);
this->__index = _Ip;
+ return __res;
}
protected:
@@ -1214,8 +1220,8 @@ public:
class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
- void emplace(_Args&&... __args) {
- __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+ _Tp& emplace(_Args&&... __args) {
+ return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
}
template <
@@ -1227,8 +1233,8 @@ public:
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
- void emplace(initializer_list<_Up> __il, _Args&&... __args) {
- __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+ _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
+ return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
}
template <
@@ -1238,8 +1244,8 @@ public:
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
- void emplace(_Args&&... __args) {
- __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+ _Tp& emplace(_Args&&... __args) {
+ return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
}
template <
@@ -1251,8 +1257,8 @@ public:
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
- void emplace(initializer_list<_Up> __il, _Args&&... __args) {
- __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+ _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
+ return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
}
inline _LIBCPP_INLINE_VISIBILITY
@@ -1529,7 +1535,8 @@ auto swap(variant<_Types...>& __lhs,
}
template <class... _Types>
-struct _LIBCPP_TEMPLATE_VIS hash<variant<_Types...>> {
+struct _LIBCPP_TEMPLATE_VIS hash<
+ __enable_hash_helper<variant<_Types...>, remove_const_t<_Types>...>> {
using argument_type = variant<_Types...>;
using result_type = size_t;
@@ -1542,7 +1549,8 @@ struct _LIBCPP_TEMPLATE_VIS hash<variant<_Types...>> {
: __variant::__visit_alt(
[](const auto& __alt) {
using __alt_type = decay_t<decltype(__alt)>;
- using __value_type = typename __alt_type::__value_type;
+ using __value_type = remove_const_t<
+ typename __alt_type::__value_type>;
return hash<__value_type>{}(__alt.__value);
},
__v);
@@ -1556,7 +1564,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
using result_type = size_t;
inline _LIBCPP_INLINE_VISIBILITY
- result_type operator()(const argument_type&) const {
+ result_type operator()(const argument_type&) const _NOEXCEPT {
return 66740831; // return a fundamentally attractive random value.
}
};
diff --git a/include/vector b/include/vector
index ded057b10c8b..6759dbd8a584 100644
--- a/include/vector
+++ b/include/vector
@@ -413,8 +413,10 @@ inline _LIBCPP_INLINE_VISIBILITY
void
__vector_base<_Tp, _Allocator>::__destruct_at_end(pointer __new_last) _NOEXCEPT
{
- while (__new_last != __end_)
- __alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(--__end_));
+ pointer __soon_to_be_end = __end_;
+ while (__new_last != __soon_to_be_end)
+ __alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(--__soon_to_be_end));
+ __end_ = __new_last;
}
template <class _Tp, class _Allocator>
@@ -525,12 +527,7 @@ public:
is_constructible<
value_type,
typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- vector(initializer_list<value_type> __il);
- _LIBCPP_INLINE_VISIBILITY
- vector(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_INLINE_VISIBILITY
~vector()
@@ -543,7 +540,14 @@ public:
vector(const vector& __x, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
vector& operator=(const vector& __x);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_INLINE_VISIBILITY
+ vector(initializer_list<value_type> __il);
+
+ _LIBCPP_INLINE_VISIBILITY
+ vector(initializer_list<value_type> __il, const allocator_type& __a);
+
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __x)
#if _LIBCPP_STD_VER > 14
@@ -551,17 +555,18 @@ public:
#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
#endif
+
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __x, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
vector& operator=(vector&& __x)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#endif // !_LIBCPP_CXX03_LANG
template <class _InputIterator>
typename enable_if
@@ -586,11 +591,12 @@ public:
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const_reference __u);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -674,9 +680,10 @@ public:
{return _VSTD::__to_raw_pointer(this->__begin_);}
_LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+
template <class... _Args>
_LIBCPP_INLINE_VISIBILITY
#if _LIBCPP_STD_VER > 14
@@ -684,19 +691,19 @@ public:
#else
void emplace_back(_Args&&... __args);
#endif
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
+
_LIBCPP_INLINE_VISIBILITY
void pop_back();
iterator insert(const_iterator __position, const_reference __x);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#ifndef _LIBCPP_CXX03_LANG
iterator insert(const_iterator __position, value_type&& __x);
-#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class... _Args>
iterator emplace(const_iterator __position, _Args&&... __args);
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
+
iterator insert(const_iterator __position, size_type __n, const_reference __x);
template <class _InputIterator>
typename enable_if
@@ -719,11 +726,12 @@ public:
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif
_LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
iterator erase(const_iterator __first, const_iterator __last);
@@ -796,18 +804,16 @@ private:
__base::__destruct_at_end(__new_last);
__annotate_shrink(__old_size);
}
- template <class _Up>
- void
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- __push_back_slow_path(_Up&& __x);
-#else
- __push_back_slow_path(_Up& __x);
-#endif
-#if !defined(_LIBCPP_HAS_NO_VARIADICS) && !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
+
+#ifndef _LIBCPP_CXX03_LANG
+ template <class _Up> void __push_back_slow_path(_Up&& __x);
+
template <class... _Args>
- void
- __emplace_back_slow_path(_Args&&... __args);
+ void __emplace_back_slow_path(_Args&&... __args);
+#else
+ template <class _Up> void __push_back_slow_path(_Up& __x);
#endif
+
// The following functions are no-ops outside of AddressSanitizer mode.
// We call annotatations only for the default Allocator because other allocators
// may not meet the AddressSanitizer alignment constraints.
@@ -1217,7 +1223,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
}
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1264,8 +1270,6 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a)
}
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
@@ -1295,8 +1299,6 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
}
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
vector<_Tp, _Allocator>&
@@ -1338,7 +1340,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
#endif
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1560,7 +1562,7 @@ vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
template <class _Tp, class _Allocator>
template <class _Up>
void
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x)
#else
vector<_Tp, _Allocator>::__push_back_slow_path(_Up& __x)
@@ -1591,7 +1593,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
__push_back_slow_path(__x);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1611,8 +1613,6 @@ vector<_Tp, _Allocator>::push_back(value_type&& __x)
__push_back_slow_path(_VSTD::move(__x));
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Allocator>
template <class... _Args>
void
@@ -1652,8 +1652,7 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
inline
@@ -1758,7 +1757,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
return __make_iter(__p);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
@@ -1797,8 +1796,6 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
return __make_iter(__p);
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Allocator>
template <class... _Args>
typename vector<_Tp, _Allocator>::iterator
@@ -1838,8 +1835,7 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
return __make_iter(__p);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
@@ -2036,7 +2032,7 @@ vector<_Tp, _Allocator>::swap(vector& __x)
_VSTD::swap(this->__begin_, __x.__begin_);
_VSTD::swap(this->__end_, __x.__end_);
_VSTD::swap(this->__end_cap(), __x.__end_cap());
- __swap_allocator(this->__alloc(), __x.__alloc(),
+ __swap_allocator(this->__alloc(), __x.__alloc(),
integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>());
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->swap(this, &__x);
@@ -2231,12 +2227,11 @@ public:
vector(const vector& __v);
vector(const vector& __v, const allocator_type& __a);
vector& operator=(const vector& __v);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#ifndef _LIBCPP_CXX03_LANG
vector(initializer_list<value_type> __il);
vector(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
vector(vector&& __v)
#if _LIBCPP_STD_VER > 14
@@ -2248,12 +2243,12 @@ public:
_LIBCPP_INLINE_VISIBILITY
vector& operator=(vector&& __v)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#endif // !_LIBCPP_CXX03_LANG
template <class _InputIterator>
typename enable_if
@@ -2272,11 +2267,12 @@ public:
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const value_type& __x);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif
_LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT
{return allocator_type(this->__alloc());}
@@ -2385,11 +2381,12 @@ public:
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif
_LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
iterator erase(const_iterator __first, const_iterator __last);
@@ -2749,7 +2746,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
}
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Allocator>
vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
@@ -2779,7 +2776,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const alloca
}
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template <class _Allocator>
vector<bool, _Allocator>::~vector()
@@ -2836,7 +2833,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
return *this;
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
@@ -2911,7 +2908,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
__c.__cap() = __c.__size_ = 0;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // !_LIBCPP_CXX03_LANG
template <class _Allocator>
void
@@ -3201,7 +3198,7 @@ vector<bool, _Allocator>::swap(vector& __x)
_VSTD::swap(this->__begin_, __x.__begin_);
_VSTD::swap(this->__size_, __x.__size_);
_VSTD::swap(this->__cap(), __x.__cap());
- __swap_allocator(this->__alloc(), __x.__alloc(),
+ __swap_allocator(this->__alloc(), __x.__alloc(),
integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>());
}
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index cc3ed16b9b72..8f1d57158028 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -32,6 +32,10 @@ endif()
add_link_flags_if(LIBCXX_CXX_ABI_LIBRARY_PATH
"${CMAKE_LIBRARY_PATH_FLAG}${LIBCXX_CXX_ABI_LIBRARY_PATH}")
+
+if (LIBCXX_GENERATE_COVERAGE AND NOT LIBCXX_COVERAGE_LIBRARY)
+ find_compiler_rt_library(profile LIBCXX_COVERAGE_LIBRARY)
+endif()
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
if (APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
@@ -62,12 +66,7 @@ if (APPLE AND LLVM_USE_SANITIZER)
message(WARNING "LLVM_USE_SANITIZER=${LLVM_USE_SANITIZER} is not supported on OS X")
endif()
if (LIBFILE)
- execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=lib OUTPUT_VARIABLE LIBDIR RESULT_VARIABLE Result)
- if (NOT ${Result} EQUAL "0")
- message(FATAL "Failed to find library resource directory")
- endif()
- string(STRIP "${LIBDIR}" LIBDIR)
- set(LIBDIR "${LIBDIR}/darwin/")
+ find_compiler_rt_dir(LIBDIR)
if (NOT IS_DIRECTORY "${LIBDIR}")
message(FATAL_ERROR "Cannot find compiler-rt directory on OS X required for LLVM_USE_SANITIZER")
endif()
@@ -84,14 +83,19 @@ add_library_flags_if(LIBCXX_HAS_PTHREAD_LIB pthread)
add_library_flags_if(LIBCXX_HAS_C_LIB c)
add_library_flags_if(LIBCXX_HAS_M_LIB m)
add_library_flags_if(LIBCXX_HAS_RT_LIB rt)
-add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)
+if (LIBCXX_USE_COMPILER_RT)
+ find_compiler_rt_library(builtins LIBCXX_BUILTINS_LIBRARY)
+ add_library_flags_if(LIBCXX_BUILTINS_LIBRARY "${LIBCXX_BUILTINS_LIBRARY}")
+else()
+ add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)
+endif()
add_library_flags_if(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB atomic)
# Add the unwinder library.
if (LIBCXXABI_USE_LLVM_UNWINDER)
- if (TARGET unwind_shared)
+ if (NOT LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_shared OR HAVE_LIBUNWIND))
add_interface_library(unwind_shared)
- elseif (TARGET unwind_static)
+ elseif (LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_static OR HAVE_LIBUNWIND))
add_interface_library(unwind_static)
else()
add_interface_library(unwind)
@@ -102,8 +106,26 @@ endif()
if (NOT WIN32)
add_flags_if_supported(-fPIC)
endif()
+
add_link_flags_if_supported(-nodefaultlibs)
+if (LIBCXX_TARGETING_MSVC)
+ if (LIBCXX_DEBUG_BUILD)
+ set(LIB_SUFFIX "d")
+ else()
+ set(LIB_SUFFIX "")
+ endif()
+ add_compile_flags(/Zl)
+ add_link_flags(/nodefaultlib)
+
+ 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
+ # Required for standards-complaint wide character formatting functions
+ # (e.g. `printfw`/`scanfw`)
+ add_library_flags(iso_stdio_wide_specifiers)
+endif()
+
if (LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY)
if (NOT DEFINED LIBCXX_LIBCPPABI_VERSION)
set(LIBCXX_LIBCPPABI_VERSION "2") # Default value
@@ -133,7 +155,7 @@ if (LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY)
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
"/usr/lib/libSystem.B.dylib")
else()
- if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
+ if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
list(FIND CMAKE_OSX_ARCHITECTURES "armv7" OSX_HAS_ARMV7)
if (NOT OSX_HAS_ARMV7 EQUAL -1)
set(OSX_RE_EXPORT_LINE
@@ -145,8 +167,10 @@ if (LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY)
endif()
else()
set(OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
+ if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
+ add_link_flags("/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi-new-delete.exp")
+ endif()
endif()
-
add_link_flags(
"-compatibility_version 1"
"-install_name /usr/lib/libc++.1.dylib"
@@ -160,7 +184,7 @@ endif()
split_list(LIBCXX_COMPILE_FLAGS)
split_list(LIBCXX_LINK_FLAGS)
-# Add a object library that contains the compiled source files.
+# Add an object library that contains the compiled source files.
add_library(cxx_objects OBJECT ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
if(WIN32 AND NOT MINGW)
target_compile_definitions(cxx_objects
@@ -229,7 +253,8 @@ if (LIBCXX_ENABLE_STATIC)
if (LIBCXX_CXX_ABI_LIBRARY_PATH)
set(MERGE_ARCHIVES_SEARCH_PATHS "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
endif()
- if (TARGET ${LIBCXX_CXX_ABI_LIBRARY})
+ if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR
+ (${LIBCXX_CXX_ABI_LIBRARY} STREQUAL "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))
set(MERGE_ARCHIVES_ABI_TARGET "$<TARGET_LINKER_FILE:${LIBCXX_CXX_ABI_LIBRARY}>")
else()
set(MERGE_ARCHIVES_ABI_TARGET
@@ -300,7 +325,9 @@ if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
set(LIBCXX_INTERFACE_LIBRARY_NAMES)
foreach(lib ${LIBCXX_INTERFACE_LIBRARIES})
# FIXME: Handle cxxabi_static and unwind_static.
- if (TARGET ${lib})
+ if (TARGET ${lib} OR
+ (${lib} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI) OR
+ (${lib} MATCHES "unwind(_static|_shared)?" AND HAVE_LIBUNWIND))
list(APPEND LIBCXX_INTERFACE_LIBRARY_NAMES "$<TARGET_PROPERTY:${lib},OUTPUT_NAME>")
else()
list(APPEND LIBCXX_INTERFACE_LIBRARY_NAMES "${lib}")
@@ -311,7 +338,7 @@ if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
# after cxx builds.
add_custom_command(TARGET cxx_shared POST_BUILD
COMMAND
- ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/gen_link_script/gen_link_script.py
+ ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/gen_link_script.py
ARGS
"$<TARGET_LINKER_FILE:cxx_shared>"
${LIBCXX_INTERFACE_LIBRARY_NAMES}
diff --git a/lib/abi/3.9/x86_64-apple-darwin16.0.abilist b/lib/abi/3.9/x86_64-apple-darwin16.abilist
index ea361e9fc44b..ea361e9fc44b 100644
--- a/lib/abi/3.9/x86_64-apple-darwin16.0.abilist
+++ b/lib/abi/3.9/x86_64-apple-darwin16.abilist
diff --git a/lib/abi/4.0/x86_64-apple-darwin16.0.0.abilist b/lib/abi/4.0/x86_64-apple-darwin16.abilist
index 5d91c4b62783..5d91c4b62783 100644
--- a/lib/abi/4.0/x86_64-apple-darwin16.0.0.abilist
+++ b/lib/abi/4.0/x86_64-apple-darwin16.abilist
diff --git a/lib/abi/CHANGELOG.TXT b/lib/abi/CHANGELOG.TXT
index fa9b2add2711..b979b46945b9 100644
--- a/lib/abi/CHANGELOG.TXT
+++ b/lib/abi/CHANGELOG.TXT
@@ -13,6 +13,42 @@ Afterwards the ABI list should be updated to include the new changes.
New entries should be added directly below the "Version" header.
-----------
+Version 5.0
+-----------
+
+* r296729 - Remove std::num_get template methods which should be inline
+
+ These functions should never have had visible definitions in the dylib but
+ since they were previously not specified with 'inline' they accidentally
+ got emitted. This change is non-ABI breaking because every "linkage unit"
+ must contain its own definition.
+
+ x86_64-linux-gnu
+ ----------------
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_
+ SYMBOL REMOVED: _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_
+
+ x86_64-apple-darwin16.0
+ -----------------------
+ No changes
+
+-----------
Version 4.0
-----------
@@ -134,4 +170,17 @@ Version 4.0
Symbol added: _ZTSSt12bad_any_cast
Symbol added: _ZTVSt12bad_any_cast
-
+* r295398 - Remove basic_string::insert and basic_string::replace template methods
+ which should be inline.
+
+ These functions should never have had visible definitions in the dylib but
+ since they were previously not specified with 'inline' they accidentally
+ got emitted. This change is non-ABI breaking because every "linkage unit"
+ must contain its own definition.
+
+ x86_64-linux-gnu
+ ----------------
+ SYMBOL REMOVED: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_
+ SYMBOL REMOVED: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceIPKcEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_
+ SYMBOL REMOVED: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertIPKwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPwEEE4typeENSB_IS8_EESA_SA_
+ SYMBOL REMOVED: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceIPKwEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_
diff --git a/lib/abi/CMakeLists.txt b/lib/abi/CMakeLists.txt
index e3eb3bf39942..c207674258a1 100644
--- a/lib/abi/CMakeLists.txt
+++ b/lib/abi/CMakeLists.txt
@@ -1,8 +1,15 @@
+if (DEFINED TARGET_TRIPLE)
+ # Ignore the minor and patchlevel versions of the darwin
+ # target.
+ string(REGEX REPLACE "darwin16\\.[0-9]\\.[0-9]" "darwin16"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+endif()
+
# Detect if we are building in the same configuration used to generate
# the abilist files.
-if (DEFINED TARGET_TRIPLE
- AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist"
+if (DEFINED GENERIC_TARGET_TRIPLE
+ AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist"
AND TARGET cxx_shared
AND ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi" OR
(APPLE AND "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default"))
@@ -19,10 +26,11 @@ endif()
if (LIBCXX_HAS_ABILIST_CONFIGURATION)
- set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist")
- set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_check/sym_diff.py")
+ set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist")
+ set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_diff.py")
add_custom_target(check-cxx-abilist
- ${SYMDIFF_EXE} --only-stdlib-symbols ${ABILIST_FILE} $<TARGET_SONAME_FILE:cxx_shared>
+ ${SYMDIFF_EXE} --only-stdlib-symbols --strict ${ABILIST_FILE}
+ $<TARGET_SONAME_FILE:cxx_shared>
DEPENDS cxx_shared
COMMENT "Testing ABI compatibility...")
endif()
diff --git a/lib/abi/x86_64-apple-darwin16.0.0.abilist b/lib/abi/x86_64-apple-darwin16.abilist
index 5d91c4b62783..5d91c4b62783 100644
--- a/lib/abi/x86_64-apple-darwin16.0.0.abilist
+++ b/lib/abi/x86_64-apple-darwin16.abilist
diff --git a/lib/abi/x86_64-unknown-linux-gnu.abilist b/lib/abi/x86_64-unknown-linux-gnu.abilist
index 70ac59443564..d6fd52488a6f 100644
--- a/lib/abi/x86_64-unknown-linux-gnu.abilist
+++ b/lib/abi/x86_64-unknown-linux-gnu.abilist
@@ -1,1905 +1,1883 @@
-{'name': '_ZNKSt11logic_error4whatEv', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNKSt12bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt13runtime_error4whatEv', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNKSt16nested_exception14rethrow_nestedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt18bad_variant_access4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt19bad_optional_access4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110error_code7messageEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db15__decrementableEPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db8__find_cEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__111__libcpp_db9__addableEPKvl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112bad_weak_ptr4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__112strstreambuf6pcountEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__113random_device7entropyEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__114error_category23default_error_conditionEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__115error_condition7messageEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE3__XEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE3__cEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE3__rEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE3__xEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE3__XEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE3__cEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE3__rEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE3__xEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__124__libcpp_debug_exception4whatEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE10do_tolowerEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE10do_toupperEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE8do_widenEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIcE9do_narrowEcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE10do_tolowerEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE10do_toupperEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE5do_isEtw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE8do_widenEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__15ctypeIwE9do_narrowEwc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__16locale4nameEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__16locale9has_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__16locale9use_facetERNS0_2idE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__16localeeqERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIcE12do_transformEPKcS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIcE7do_hashEPKcS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIwE12do_transformEPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17collateIwE7do_hashEPKwS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18ios_base6getlocEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIcE8do_closeEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18messagesIwE8do_closeEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIcE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIcE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIcE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIwE11do_groupingEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIwE11do_truenameEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIwE12do_falsenameEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_errorD2Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt11logic_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt12experimental19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt12experimental19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt12experimental19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt12length_errorD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt12out_of_rangeD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt13exception_ptrC1ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13exception_ptrC2ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13exception_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13exception_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13exception_ptraSERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC1ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorC2ERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_errorD2Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt13runtime_erroraSERKS_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt14overflow_errorD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt16invalid_argumentD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt16nested_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt16nested_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt16nested_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt16nested_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt16nested_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt19bad_optional_accessD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt19bad_optional_accessD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt19bad_optional_accessD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_getD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110__time_putD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110adopt_lockE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5alnumE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5alphaE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5blankE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5cntrlE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5digitE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5graphE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5lowerE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5printE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5punctE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5spaceE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base5upperE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ctype_base6xdigitE', 'size': 2, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110defer_lockE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110istrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110moneypunctIcLb0EE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIcLb0EE4intlE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIcLb1EE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIcLb1EE4intlE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIwLb0EE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIwLb0EE4intlE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIwLb1EE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110moneypunctIwLb1EE4intlE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110ostrstreamD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__110to_wstringEy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__call_onceERVmPvPFvS2_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db10__insert_cEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db10__insert_iEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db16__invalidate_allEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db4swapEPvS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db9__erase_cEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_db9__erase_iEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_dbC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_dbC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_dbD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__libcpp_dbD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111regex_errorD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111regex_errorD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111regex_errorD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__111try_to_lockE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112__do_nothingEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__get_sp_mutEPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__next_primeEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_default4__c_E', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112__rs_defaultC1ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultC2ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112__rs_defaultclEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'size': 8, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceIPKcEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'size': 8, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertIPKwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPwEEE4typeENSB_IS8_EESA_SA_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceIPKwEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112future_errorD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112future_errorD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112future_errorD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112placeholders2_1E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_2E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_3E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_4E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_5E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_6E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_7E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_8E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders2_9E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112placeholders3_10E', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__112strstreambuf3strEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf4swapERS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf6__initEPclS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf6freezeEb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf8overflowEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf9pbackfailEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambuf9underflowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPKal', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPKcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPKhl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPalS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPclS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1EPhlS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC1El', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPKal', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPKcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPKhl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPalS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPclS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2EPhlS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufC2El', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112strstreambufD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2ENS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__112system_errorD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113allocator_argE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113random_deviceD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113random_deviceD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113random_deviceclEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113shared_futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113shared_futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__get_const_dbEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__num_get_base5__srcE', 'size': 33, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__shared_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__shared_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__shared_countD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__shared_countD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114__shared_countD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114collate_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114error_categoryC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114error_categoryD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114error_categoryD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__114error_categoryD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__get_classnameEPKcb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_structC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_structC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_structD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115__thread_structD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115future_categoryEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcE6__initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwE6__initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115numpunct_bynameIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115recursive_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__115system_categoryEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__116generic_categoryEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state12__make_readyEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state4copyEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state4waitEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state9__executeEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__assoc_sub_state9set_valueEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117declare_reachableEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117iostream_categoryEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcEC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcEC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwEC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwEC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variable10notify_allEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variable10notify_oneEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variableD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118condition_variableD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118get_pointer_safetyEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__118shared_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base11lock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_count16__release_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_count4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_countD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_countD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__shared_weak_countD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119__start_std_streamsE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__119__thread_local_dataEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119declare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__119piecewise_constructE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__120__get_collation_nameEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__120__throw_system_errorEiPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE16__at_thread_exitEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121__undeclare_reachableEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutex4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutexC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__121undeclare_no_pointersEPcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__123__libcpp_debug_functionE', 'size': 8, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__125__num_get_signed_integralIlEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__125__num_get_signed_integralIxEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__num_get_unsigned_integralIjEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__num_get_unsigned_integralImEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__num_get_unsigned_integralItEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__127__num_get_unsigned_integralIyEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__13cinE', 'size': 168, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__14cerrE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__14clogE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__14coutE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__14wcinE', 'size': 168, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__15alignEmmRPvRm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcE13classic_tableEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcE21__classic_lower_tableEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcE21__classic_upper_tableEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__15ctypeIcEC1EPKtbm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcEC2EPKtbm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIwE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__15ctypeIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15ctypeIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15mutex4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15mutex6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15mutex8try_lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15mutexD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15mutexD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__15wcerrE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__15wclogE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__15wcoutE', 'size': 160, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16__clocEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16chrono12steady_clock3nowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16chrono12steady_clock9is_steadyE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16chrono12system_clock11from_time_tEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16chrono12system_clock3nowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16chrono12system_clock9is_steadyE', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16futureIvE3getEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16futureIvED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16futureIvED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16gslice6__initEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale2id5__getEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale2id6__initEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale2id9__next_idE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale3allE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale4noneE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale4timeE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale5ctypeE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale5facet16__on_zero_sharedEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale5facetD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale5facetD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale5facetD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale6globalERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale7classicEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale7collateE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale7numericE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale8__globalEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16locale8messagesE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16locale8monetaryE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__16localeC1EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2EPKc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2ERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2ERKS0_PKci', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2ERKS0_S2_i', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16localeaSERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16thread20hardware_concurrencyEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16thread4joinEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16thread6detachEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16threadD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__16threadD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17__sort5IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIcE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17collateIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIwE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17collateIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17collateIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__17promiseIvE10get_futureEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvE9set_valueEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvEC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvEC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__17promiseIvED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__c_nodeD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__c_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__c_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__get_dbEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__i_nodeD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__i_nodeD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__rs_getEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__sp_mut4lockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18__sp_mut6unlockEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base10floatfieldE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base10scientificE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base11adjustfieldE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base15sync_with_stdioEb', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base2inE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base3appE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base3ateE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base3decE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base3hexE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base3octE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base3outE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base4InitC1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4InitC2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4InitD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4InitD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4initEPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4leftE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base4moveERS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base4swapERS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base5clearEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base5fixedE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base5imbueERKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base5iwordEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base5pwordEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base5rightE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base5truncE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base6badbitE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base6binaryE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base6eofbitE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base6skipwsE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base6xallocEv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7copyfmtERKS0_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failbitE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7failureD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_base7goodbitE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base7showposE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base7unitbufE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base8internalE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base8showbaseE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base9__xindex_E', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base9basefieldE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base9boolalphaE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base9showpointE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_base9uppercaseE', 'size': 4, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18ios_baseD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_baseD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18ios_baseD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18messagesIcE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18messagesIwE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18numpunctIcE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18numpunctIcEC1Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIcEC2Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIcED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIcED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIcED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIwE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18numpunctIwEC1Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIwEC2Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIwED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIwED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18numpunctIwED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__18valarrayImE6resizeEmm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18valarrayImEC1Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18valarrayImEC2Em', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18valarrayImED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__18valarrayImED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZNSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19strstreamD2Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEd', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEe', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEf', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEi', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEj', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEl', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEx', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__19to_stringEy', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZNSt8bad_castC1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt8bad_castD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt8bad_castD2Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt9bad_allocC1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt9bad_allocD1Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZNSt9exceptionD2Ev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZSt15get_new_handlerv', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZSt17__throw_bad_allocv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt17current_exceptionv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt18uncaught_exceptionv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt19uncaught_exceptionsv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZSt7nothrow', 'size': 1, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZSt9terminatev', 'is_defined': False, 'type': 'FUNC'}
-{'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 120, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt12experimental19bad_optional_accessE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110__time_getE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110__time_putE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110ctype_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110istrstreamE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110money_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110moneypunctIcLb0EEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110moneypunctIcLb1EEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110moneypunctIwLb0EEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110moneypunctIwLb1EEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__110ostrstreamE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__111__money_getIcEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__111__money_getIwEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__111__money_putIcEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__111__money_putIwEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__111regex_errorE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112bad_weak_ptrE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112codecvt_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112ctype_bynameIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112ctype_bynameIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112future_errorE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112strstreambufE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__112system_errorE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__113messages_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__codecvt_utf8IDiEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__codecvt_utf8IDsEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__codecvt_utf8IwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__num_get_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__num_put_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114__shared_countE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114collate_bynameIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114collate_bynameIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__114error_categoryE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IwLb0EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115__codecvt_utf16IwLb1EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115messages_bynameIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115messages_bynameIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115numpunct_bynameIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115numpunct_bynameIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__116__narrow_to_utf8ILm16EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__116__narrow_to_utf8ILm32EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117__assoc_sub_stateE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117__widen_from_utf8ILm16EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117__widen_from_utf8ILm32EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117moneypunct_bynameIcLb0EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117moneypunct_bynameIcLb1EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117moneypunct_bynameIwLb0EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__117moneypunct_bynameIwLb1EEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__118__time_get_storageIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__118__time_get_storageIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__119__shared_weak_countE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__120__codecvt_utf8_utf16IwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__120__time_get_c_storageIcEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__120__time_get_c_storageIwEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__124__libcpp_debug_exceptionE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__15ctypeIcEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__15ctypeIwEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__16locale5facetE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17codecvtIDic11__mbstate_tEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17codecvtIcc11__mbstate_tEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17codecvtIwc11__mbstate_tEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17collateIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17collateIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18__c_nodeE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18ios_base7failureE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18ios_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18messagesIcEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18messagesIwEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18numpunctIcEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18numpunctIwEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 72, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 72, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19__num_getIcEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19__num_getIwEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19__num_putIcEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19__num_putIwEE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19strstreamE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTINSt3__19time_baseE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTISt11logic_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt12bad_any_cast', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTISt12length_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt12out_of_range', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt13runtime_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt14overflow_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt16invalid_argument', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt16nested_exception', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTISt18bad_variant_access', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTISt19bad_optional_access', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTISt8bad_cast', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt9bad_alloc', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTISt9exception', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 50, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt12experimental19bad_optional_accessE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110__time_getE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110__time_putE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110ctype_baseE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110istrstreamE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110money_baseE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110moneypunctIcLb0EEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110moneypunctIcLb1EEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110moneypunctIwLb0EEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110moneypunctIwLb1EEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__110ostrstreamE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__111__money_getIcEE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__111__money_getIwEE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__111__money_putIcEE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__111__money_putIwEE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__111regex_errorE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112bad_weak_ptrE', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112codecvt_baseE', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112ctype_bynameIcEE', 'size': 26, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112ctype_bynameIwEE', 'size': 26, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112future_errorE', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112strstreambufE', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__112system_errorE', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 47, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 47, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 47, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 47, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__113messages_baseE', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__codecvt_utf8IDiEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__codecvt_utf8IDsEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__codecvt_utf8IwEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__num_get_baseE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__num_put_baseE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114__shared_countE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 43, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 43, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 42, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 42, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114collate_bynameIcEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114collate_bynameIwEE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__114error_categoryE', 'size': 25, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IwLb0EEE', 'size': 33, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115__codecvt_utf16IwLb1EEE', 'size': 33, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 49, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 49, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115messages_bynameIcEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115messages_bynameIwEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115numpunct_bynameIcEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115numpunct_bynameIwEE', 'size': 29, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 77, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 77, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 77, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 77, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__116__narrow_to_utf8ILm16EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__116__narrow_to_utf8ILm32EEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117__assoc_sub_stateE', 'size': 28, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117__widen_from_utf8ILm16EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117__widen_from_utf8ILm32EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__118__time_get_storageIcEE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__118__time_get_storageIwEE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__119__shared_weak_countE', 'size': 30, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__120__codecvt_utf8_utf16IwEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__120__time_get_c_storageIcEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__120__time_get_c_storageIwEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__124__libcpp_debug_exceptionE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__15ctypeIcEE', 'size': 18, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__15ctypeIwEE', 'size': 18, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__16locale5facetE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 35, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'size': 34, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17collateIcEE', 'size': 20, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17collateIwEE', 'size': 20, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 68, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 68, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 68, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 68, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18__c_nodeE', 'size': 18, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18ios_base7failureE', 'size': 26, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18ios_baseE', 'size': 18, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18messagesIcEE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18messagesIwEE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18numpunctIcEE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18numpunctIwEE', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 69, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 69, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 69, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 69, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19__num_getIcEE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19__num_getIwEE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19__num_putIcEE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19__num_putIwEE', 'size': 22, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 42, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 42, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 70, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 70, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 70, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 70, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19strstreamE', 'size': 19, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSNSt3__19time_baseE', 'size': 19, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSSt12bad_any_cast', 'size': 17, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSSt16nested_exception', 'size': 21, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSSt18bad_variant_access', 'size': 23, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTSSt19bad_optional_access', 'size': 24, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__110istrstreamE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__110ostrstreamE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 16, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTTNSt3__19strstreamE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVN10__cxxabiv117__class_type_infoE', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVN10__cxxabiv120__si_class_type_infoE', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVN10__cxxabiv121__vmi_class_type_infoE', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt12experimental19bad_optional_accessE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110istrstreamE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110moneypunctIwLb0EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110moneypunctIwLb1EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__110ostrstreamE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__111regex_errorE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112bad_weak_ptrE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112ctype_bynameIcEE', 'size': 104, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112ctype_bynameIwEE', 'size': 136, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112future_errorE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112strstreambufE', 'size': 128, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__112system_errorE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114__codecvt_utf8IDiEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114__codecvt_utf8IDsEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114__codecvt_utf8IwEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114__shared_countE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 120, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114collate_bynameIcEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114collate_bynameIwEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__114error_categoryE', 'size': 72, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'size': 128, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'size': 128, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115messages_bynameIcEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115messages_bynameIwEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115numpunct_bynameIcEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115numpunct_bynameIwEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 224, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 224, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117__assoc_sub_stateE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117__widen_from_utf8ILm16EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117__widen_from_utf8ILm32EEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'size': 112, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__119__shared_weak_countE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__124__libcpp_debug_exceptionE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__15ctypeIcEE', 'size': 104, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__15ctypeIwEE', 'size': 136, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__16locale5facetE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'size': 96, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17collateIcEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17collateIwEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 128, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 128, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 104, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 104, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18__c_nodeE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18ios_base7failureE', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18ios_baseE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18messagesIcEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18messagesIwEE', 'size': 64, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18numpunctIcEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18numpunctIwEE', 'size': 80, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 168, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 168, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 48, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 56, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVNSt3__19strstreamE', 'size': 120, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVSt11logic_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt12bad_any_cast', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVSt12length_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt12out_of_range', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt13runtime_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt14overflow_error', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt16invalid_argument', 'size': 0, 'is_defined': False, 'type': 'OBJECT'}
-{'name': '_ZTVSt16nested_exception', 'size': 32, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVSt18bad_variant_access', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZTVSt19bad_optional_access', 'size': 40, 'is_defined': True, 'type': 'OBJECT'}
-{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZThn16_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZThn16_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__110istrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__110istrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__110ostrstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__110ostrstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__19strstreamD0Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZTv0_n24_NSt3__19strstreamD1Ev', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPvm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdaPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPv', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPvRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPvSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPvSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPvm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZdlPvmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_Znam', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnamRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnamSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnamSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_Znwm', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnwmRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnwmSt11align_val_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '_ZnwmSt11align_val_tRKSt9nothrow_t', 'is_defined': True, 'type': 'FUNC'}
-{'name': '__cxa_allocate_exception', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_begin_catch', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_current_primary_exception', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_decrement_exception_refcount', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_end_catch', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_free_exception', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_guard_abort', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_guard_acquire', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_guard_release', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_increment_exception_refcount', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_pure_virtual', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_rethrow', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_rethrow_primary_exception', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_throw', 'is_defined': False, 'type': 'FUNC'}
-{'name': '__cxa_uncaught_exception', 'is_defined': False, 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNKSt11logic_error4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt12experimental15fundamentals_v112bad_any_cast4whatEv', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNKSt13runtime_error4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt16nested_exception14rethrow_nestedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt18bad_variant_access4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt19bad_optional_access4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110error_code7messageEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__decrementableEPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__find_c_from_iEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db15__subscriptableEPKvl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db17__dereferenceableEPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db17__find_c_and_lockEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db8__find_cEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__111__libcpp_db9__addableEPKvl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112bad_weak_ptr4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_tolowerEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIcE10do_toupperEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_tolowerEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE10do_toupperEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE5do_isEtw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE8do_widenEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112ctype_bynameIwE9do_narrowEwc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__112strstreambuf6pcountEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__113random_device7entropyEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114__codecvt_utf8IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114error_category10equivalentERKNS_10error_codeEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__114error_category23default_error_conditionEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER11__mbstate_tPKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER11__mbstate_tPKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER11__mbstate_tPKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER11__mbstate_tPKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER11__mbstate_tPcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER11__mbstate_tPKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__XEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__cEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__rEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE3__xEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE7__am_pmEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE7__weeksEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIcE8__monthsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__XEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__cEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__rEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE3__xEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE7__am_pmEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE7__weeksEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__time_get_c_storageIwE8__monthsEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__124__libcpp_debug_exception4whatEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_tolowerEPcPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_tolowerEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_toupperEPcPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE10do_toupperEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE8do_widenEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIcE9do_narrowEcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_tolowerEPwPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_tolowerEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_toupperEPwPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE10do_toupperEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE5do_isEtw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE8do_widenEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__15ctypeIwE9do_narrowEwc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__16locale4nameEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__16locale9has_facetERNS0_2idE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__16locale9use_facetERNS0_2idE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__16localeeqERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDic11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIDsc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIcc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE10do_unshiftERS1_PcS4_RS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE11do_encodingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE13do_max_lengthEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE16do_always_noconvEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17codecvtIwc11__mbstate_tE9do_lengthERS1_PKcS5_m', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIcE12do_transformEPKcS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIcE7do_hashEPKcS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIwE12do_transformEPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17collateIwE7do_hashEPKwS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18ios_base6getlocEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIcE8do_closeEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18messagesIwE8do_closeEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE11do_truenameEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE12do_falsenameEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIcE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE11do_groupingEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE11do_truenameEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE12do_falsenameEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE16do_decimal_pointEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18numpunctIwE16do_thousands_sepEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC1ERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_errorC2ERKS_', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt11logic_errorD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt11logic_erroraSERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt12experimental19bad_optional_accessD2Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt12length_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt12out_of_rangeD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13exception_ptrC1ERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13exception_ptrC2ERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13exception_ptrD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13exception_ptrD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13exception_ptraSERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC1ERKS_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_errorC2ERKS_', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt13runtime_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt13runtime_errorD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt13runtime_erroraSERKS_', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt14overflow_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt16invalid_argumentD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt16nested_exceptionC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt16nested_exceptionC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt16nested_exceptionD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt16nested_exceptionD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt16nested_exceptionD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt19bad_optional_accessD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_getD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110__time_putD2Ev', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110adopt_lockE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5alnumE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5alphaE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5blankE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5cntrlE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5digitE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5graphE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5lowerE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5printE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5punctE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5spaceE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base5upperE', 'type': 'OBJECT'}
+{'size': 2, 'is_defined': True, 'name': '_ZNSt3__110ctype_base6xdigitE', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110defer_lockE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__110istrstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110istrstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110istrstreamD2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb0EE2idE', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb0EE4intlE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb1EE2idE', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIcLb1EE4intlE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb0EE2idE', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb0EE4intlE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb1EE2idE', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__110moneypunctIwLb1EE4intlE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110ostrstreamD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__110to_wstringEy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__call_onceERVmPvPFvS2_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db10__insert_cEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db10__insert_iEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db11__insert_icEPvPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db15__iterator_copyEPvPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db16__invalidate_allEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db4swapEPvS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db9__erase_cEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_db9__erase_iEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__libcpp_dbD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111regex_errorD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111regex_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111regex_errorD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutex4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutex6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutex8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutexC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutexC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutexD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__111timed_mutexD2Ev', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__111try_to_lockE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__112__do_nothingEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__get_sp_mutEPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__next_primeEm', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__112__rs_default4__c_E', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC1ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC2ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112__rs_defaultclEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm', 'type': 'FUNC'}
+{'size': 8, 'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm', 'type': 'FUNC'}
+{'size': 8, 'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIcED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112future_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112future_errorD2Ev', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_1E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_2E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_3E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_4E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_5E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_6E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_7E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_8E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders2_9E', 'type': 'OBJECT'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__112placeholders3_10E', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf3strEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf4swapERS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf6__initEPclS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf6freezeEb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf8overflowEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf9pbackfailEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambuf9underflowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPFPvmEPFvS1_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKal', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPKhl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPalS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPclS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1EPhlS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC1El', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPFPvmEPFvS1_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKal', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPKhl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPalS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPclS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2EPhlS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufC2El', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112strstreambufD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__113allocator_argE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113random_deviceD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113random_deviceD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113random_deviceclEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__get_const_dbEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'}
+{'size': 33, 'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__num_put_base14__format_floatEPcPKcj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__shared_count12__add_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__shared_count16__release_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__shared_countD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__shared_countD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114__shared_countD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDic11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIDsc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIcc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114codecvt_bynameIwc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIcED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114collate_bynameIwED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114error_categoryC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114error_categoryD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114error_categoryD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__114error_categoryD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__get_classnameEPKcb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_structC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_structC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_structD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115__thread_structD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115future_categoryEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcE6__initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIcED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwE6__initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115numpunct_bynameIwED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutex8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115recursive_mutexD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__115system_categoryEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm16EED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116__narrow_to_utf8ILm32EED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__116generic_categoryEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state12__make_readyEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state16__on_zero_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state4copyEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state4waitEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state9__executeEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__assoc_sub_state9set_valueEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm16EED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117__widen_from_utf8ILm32EED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117declare_reachableEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variable10notify_allEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variable10notify_oneEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variableD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118condition_variableD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118get_pointer_safetyEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex11lock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex13unlock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex15try_lock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutex8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutexC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__118shared_timed_mutexC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base11lock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base13unlock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base15try_lock_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count16__release_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD2Ev', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__119__start_std_streamsE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE16__at_thread_exitEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutex8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__121undeclare_no_pointersEPcm', 'type': 'FUNC'}
+{'size': 8, 'is_defined': True, 'name': '_ZNSt3__123__libcpp_debug_functionE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__125__num_get_signed_integralIlEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__125__num_get_signed_integralIxEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__num_get_unsigned_integralIjEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__num_get_unsigned_integralImEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__num_get_unsigned_integralItEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__127__num_get_unsigned_integralIyEET_PKcS3_Rji', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'type': 'FUNC'}
+{'size': 168, 'is_defined': True, 'name': '_ZNSt3__13cinE', 'type': 'OBJECT'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__14cerrE', 'type': 'OBJECT'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__14clogE', 'type': 'OBJECT'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__14coutE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'}
+{'size': 168, 'is_defined': True, 'name': '_ZNSt3__14wcinE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__15alignEmmRPvRm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE13classic_tableEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE21__classic_lower_tableEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcE21__classic_upper_tableEv', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__15ctypeIcE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcEC1EPKtbm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcEC2EPKtbm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIcED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__15ctypeIwE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15ctypeIwED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15mutex4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15mutex6unlockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15mutex8try_lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15mutexD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15mutexD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__15wcerrE', 'type': 'OBJECT'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__15wclogE', 'type': 'OBJECT'}
+{'size': 160, 'is_defined': True, 'name': '_ZNSt3__15wcoutE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16__clocEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16chrono12steady_clock3nowEv', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__16chrono12steady_clock9is_steadyE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock11from_time_tEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock3nowEv', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock9is_steadyE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16futureIvE3getEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16futureIvED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16futureIvED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16gslice6__initEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale2id5__getEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale2id6__initEv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale2id9__next_idE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale3allE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale4noneE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale4timeE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale5ctypeE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16locale5facet16__on_zero_sharedEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale5facetD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale5facetD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale5facetD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale6globalERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16locale7classicEv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale7collateE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale7numericE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16locale8__globalEv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale8messagesE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__16locale8monetaryE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_PKci', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1ERKS0_S2_i', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2EPKc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_PKci', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2ERKS0_S2_i', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16localeaSERKS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16thread20hardware_concurrencyEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16thread4joinEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16thread6detachEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16threadD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__16threadD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17__sort5IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_S5_T_', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDic11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIDsc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIcc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC1Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2EPKcm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tEC2Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17codecvtIwc11__mbstate_tED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17collateIcE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIcED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17collateIwE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17collateIwED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvE10get_futureEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvE24set_value_at_thread_exitEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvE9set_valueEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvEC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvEC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__17promiseIvED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__c_node5__addEPNS_8__i_nodeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__c_nodeD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__get_dbEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__i_nodeD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__i_nodeD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__rs_getEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__sp_mut4lockEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18__sp_mut6unlockEv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base10floatfieldE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base10scientificE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base11adjustfieldE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base15sync_with_stdioEb', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base16__call_callbacksENS0_5eventE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base2inE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3appE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3ateE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3decE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3hexE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3octE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base3outE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitC1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitC2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4InitD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4initEPv', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base4leftE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4moveERS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base4swapERS0_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base5clearEj', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base5fixedE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base5imbueERKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base5iwordEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base5pwordEi', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base5rightE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base5truncE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base6badbitE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base6binaryE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base6eofbitE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base6skipwsE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base6xallocEv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7copyfmtERKS0_', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base7failbitE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_base7failureD2Ev', 'type': 'FUNC'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base7goodbitE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base7showposE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'type': 'OBJECT'}
+{'size': 4, 'is_defined': True, 'name': '_ZNSt3__18ios_base9uppercaseE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_baseD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_baseD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18ios_baseD2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18messagesIcE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18messagesIwE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18numpunctIcE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIcEC1Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIcEC2Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIcED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18numpunctIwE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIwEC1Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIwEC2Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18numpunctIwED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__18valarrayImE6resizeEmm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18valarrayImEC1Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18valarrayImEC2Em', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18valarrayImED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__18valarrayImED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_', 'type': 'FUNC'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__19strstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19strstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19strstreamD2Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEd', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEe', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEf', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEj', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEl', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__19to_stringEy', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt8bad_castC1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt8bad_castD1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt8bad_castD2Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt9bad_allocC1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt9bad_allocD1Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNSt9exceptionD2Ev', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZSt15get_new_handlerv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt17__throw_bad_allocv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt17current_exceptionv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt18uncaught_exceptionv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZSt19uncaught_exceptionsv', 'type': 'FUNC'}
+{'size': 1, 'is_defined': True, 'name': '_ZSt7nothrow', 'type': 'OBJECT'}
+{'is_defined': False, 'name': '_ZSt9terminatev', 'type': 'FUNC'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 120, 'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt12experimental19bad_optional_accessE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__110__time_getE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__110__time_putE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__110ctype_baseE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__110istrstreamE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__110money_baseE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__110moneypunctIcLb0EEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__110moneypunctIcLb1EEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__110moneypunctIwLb0EEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__110moneypunctIwLb1EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__110ostrstreamE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__111__money_getIcEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__111__money_getIwEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__111__money_putIcEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__111__money_putIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__111regex_errorE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112bad_weak_ptrE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__112codecvt_baseE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__113messages_baseE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IDiEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IDsEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114__codecvt_utf8IwEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__114__num_get_baseE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__114__num_put_baseE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__114__shared_countE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114codecvt_bynameIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114collate_bynameIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__114collate_bynameIwEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__114error_categoryE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDiLb0EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDiLb1EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDsLb0EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IDsLb1EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IwLb0EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115__codecvt_utf16IwLb1EEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115messages_bynameIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115messages_bynameIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115numpunct_bynameIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115numpunct_bynameIwEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__116__narrow_to_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__116__narrow_to_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117__assoc_sub_stateE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117__widen_from_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117__widen_from_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIcLb0EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIcLb1EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIwLb0EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__117moneypunct_bynameIwLb1EEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__118__time_get_storageIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__118__time_get_storageIwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__119__shared_weak_countE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IDiEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IDsEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__120__codecvt_utf8_utf16IwEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__120__time_get_c_storageIcEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__120__time_get_c_storageIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__124__libcpp_debug_exceptionE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__15ctypeIcEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__15ctypeIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__16locale5facetE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17codecvtIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17codecvtIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17codecvtIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17codecvtIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__17collateIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__17collateIwEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__18__c_nodeE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__18ios_base7failureE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__18ios_baseE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__18messagesIcEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__18messagesIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__18numpunctIcEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__18numpunctIwEE', 'type': 'OBJECT'}
+{'size': 72, 'is_defined': True, 'name': '_ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 72, 'is_defined': True, 'name': '_ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__19__num_getIcEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__19__num_getIwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__19__num_putIcEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTINSt3__19__num_putIwEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTINSt3__19strstreamE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTINSt3__19time_baseE', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt11logic_error', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTISt12bad_any_cast', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt12length_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt12out_of_range', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt13runtime_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt14overflow_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt16invalid_argument', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTISt16nested_exception', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTISt18bad_variant_access', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTISt19bad_optional_access', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt8bad_cast', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt9bad_alloc', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTISt9exception', 'type': 'OBJECT'}
+{'size': 50, 'is_defined': True, 'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTSNSt12experimental19bad_optional_accessE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110__time_getE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110__time_putE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110ctype_baseE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110istrstreamE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110money_baseE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIcLb0EEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIcLb1EEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIwLb0EEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__110moneypunctIwLb1EEE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__110ostrstreamE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__111__money_getIcEE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__111__money_getIwEE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__111__money_putIcEE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__111__money_putIwEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__111regex_errorE', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSNSt3__112bad_weak_ptrE', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSNSt3__112codecvt_baseE', 'type': 'OBJECT'}
+{'size': 26, 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'type': 'OBJECT'}
+{'size': 26, 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'type': 'OBJECT'}
+{'size': 47, 'is_defined': True, 'name': '_ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 47, 'is_defined': True, 'name': '_ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 47, 'is_defined': True, 'name': '_ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 47, 'is_defined': True, 'name': '_ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTSNSt3__113messages_baseE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IDiEE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IDsEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__114__codecvt_utf8IwEE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__114__num_get_baseE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__114__num_put_baseE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__114__shared_countE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 43, 'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 43, 'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 42, 'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 42, 'is_defined': True, 'name': '_ZTSNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__114collate_bynameIcEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__114collate_bynameIwEE', 'type': 'OBJECT'}
+{'size': 25, 'is_defined': True, 'name': '_ZTSNSt3__114error_categoryE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDiLb0EEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDiLb1EEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDsLb0EEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IDsLb1EEE', 'type': 'OBJECT'}
+{'size': 33, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IwLb0EEE', 'type': 'OBJECT'}
+{'size': 33, 'is_defined': True, 'name': '_ZTSNSt3__115__codecvt_utf16IwLb1EEE', 'type': 'OBJECT'}
+{'size': 49, 'is_defined': True, 'name': '_ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 49, 'is_defined': True, 'name': '_ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__115messages_bynameIcEE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__115messages_bynameIwEE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__115numpunct_bynameIcEE', 'type': 'OBJECT'}
+{'size': 29, 'is_defined': True, 'name': '_ZTSNSt3__115numpunct_bynameIwEE', 'type': 'OBJECT'}
+{'size': 77, 'is_defined': True, 'name': '_ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 77, 'is_defined': True, 'name': '_ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 77, 'is_defined': True, 'name': '_ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 77, 'is_defined': True, 'name': '_ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__116__narrow_to_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__116__narrow_to_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 28, 'is_defined': True, 'name': '_ZTSNSt3__117__assoc_sub_stateE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117__widen_from_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117__widen_from_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIcLb0EEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIcLb1EEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIwLb0EEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__117moneypunct_bynameIwLb1EEE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTSNSt3__118__time_get_storageIcEE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTSNSt3__118__time_get_storageIwEE', 'type': 'OBJECT'}
+{'size': 30, 'is_defined': True, 'name': '_ZTSNSt3__119__shared_weak_countE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDiEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IDsEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__120__codecvt_utf8_utf16IwEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__120__time_get_c_storageIcEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__120__time_get_c_storageIwEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__124__libcpp_debug_exceptionE', 'type': 'OBJECT'}
+{'size': 18, 'is_defined': True, 'name': '_ZTSNSt3__15ctypeIcEE', 'type': 'OBJECT'}
+{'size': 18, 'is_defined': True, 'name': '_ZTSNSt3__15ctypeIwEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__16locale5facetE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__17codecvtIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 35, 'is_defined': True, 'name': '_ZTSNSt3__17codecvtIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__17codecvtIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 34, 'is_defined': True, 'name': '_ZTSNSt3__17codecvtIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 20, 'is_defined': True, 'name': '_ZTSNSt3__17collateIcEE', 'type': 'OBJECT'}
+{'size': 20, 'is_defined': True, 'name': '_ZTSNSt3__17collateIwEE', 'type': 'OBJECT'}
+{'size': 68, 'is_defined': True, 'name': '_ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 68, 'is_defined': True, 'name': '_ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 68, 'is_defined': True, 'name': '_ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 68, 'is_defined': True, 'name': '_ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 18, 'is_defined': True, 'name': '_ZTSNSt3__18__c_nodeE', 'type': 'OBJECT'}
+{'size': 26, 'is_defined': True, 'name': '_ZTSNSt3__18ios_base7failureE', 'type': 'OBJECT'}
+{'size': 18, 'is_defined': True, 'name': '_ZTSNSt3__18ios_baseE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__18messagesIcEE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__18messagesIwEE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__18numpunctIcEE', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSNSt3__18numpunctIwEE', 'type': 'OBJECT'}
+{'size': 69, 'is_defined': True, 'name': '_ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 69, 'is_defined': True, 'name': '_ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 69, 'is_defined': True, 'name': '_ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 69, 'is_defined': True, 'name': '_ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__19__num_getIcEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__19__num_getIwEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__19__num_putIcEE', 'type': 'OBJECT'}
+{'size': 22, 'is_defined': True, 'name': '_ZTSNSt3__19__num_putIwEE', 'type': 'OBJECT'}
+{'size': 42, 'is_defined': True, 'name': '_ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 42, 'is_defined': True, 'name': '_ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 70, 'is_defined': True, 'name': '_ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 70, 'is_defined': True, 'name': '_ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 70, 'is_defined': True, 'name': '_ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 70, 'is_defined': True, 'name': '_ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 19, 'is_defined': True, 'name': '_ZTSNSt3__19strstreamE', 'type': 'OBJECT'}
+{'size': 19, 'is_defined': True, 'name': '_ZTSNSt3__19time_baseE', 'type': 'OBJECT'}
+{'size': 17, 'is_defined': True, 'name': '_ZTSSt12bad_any_cast', 'type': 'OBJECT'}
+{'size': 21, 'is_defined': True, 'name': '_ZTSSt16nested_exception', 'type': 'OBJECT'}
+{'size': 23, 'is_defined': True, 'name': '_ZTSSt18bad_variant_access', 'type': 'OBJECT'}
+{'size': 24, 'is_defined': True, 'name': '_ZTSSt19bad_optional_access', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTTNSt3__110istrstreamE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTTNSt3__110ostrstreamE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 16, 'is_defined': True, 'name': '_ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTTNSt3__19strstreamE', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVN10__cxxabiv117__class_type_infoE', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVN10__cxxabiv120__si_class_type_infoE', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVN10__cxxabiv121__vmi_class_type_infoE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt12experimental19bad_optional_accessE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__110istrstreamE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIwLb0EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIwLb1EEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__110ostrstreamE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__111regex_errorE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'type': 'OBJECT'}
+{'size': 104, 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'type': 'OBJECT'}
+{'size': 136, 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'type': 'OBJECT'}
+{'size': 128, 'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IDiEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IDsEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114__codecvt_utf8IwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__114__shared_countE', 'type': 'OBJECT'}
+{'size': 120, 'is_defined': True, 'name': '_ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__114codecvt_bynameIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__114collate_bynameIcEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__114collate_bynameIwEE', 'type': 'OBJECT'}
+{'size': 72, 'is_defined': True, 'name': '_ZTVNSt3__114error_categoryE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDiLb0EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDiLb1EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDsLb0EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IDsLb1EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IwLb0EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__115__codecvt_utf16IwLb1EEE', 'type': 'OBJECT'}
+{'size': 128, 'is_defined': True, 'name': '_ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 128, 'is_defined': True, 'name': '_ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__115messages_bynameIcEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__115messages_bynameIwEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__115numpunct_bynameIcEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__115numpunct_bynameIwEE', 'type': 'OBJECT'}
+{'size': 224, 'is_defined': True, 'name': '_ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 224, 'is_defined': True, 'name': '_ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__116__narrow_to_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__116__narrow_to_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTVNSt3__117__assoc_sub_stateE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__117__widen_from_utf8ILm16EEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__117__widen_from_utf8ILm32EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIcLb0EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIcLb1EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIwLb0EEE', 'type': 'OBJECT'}
+{'size': 112, 'is_defined': True, 'name': '_ZTVNSt3__117moneypunct_bynameIwLb1EEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTVNSt3__119__shared_weak_countE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__124__libcpp_debug_exceptionE', 'type': 'OBJECT'}
+{'size': 104, 'is_defined': True, 'name': '_ZTVNSt3__15ctypeIcEE', 'type': 'OBJECT'}
+{'size': 136, 'is_defined': True, 'name': '_ZTVNSt3__15ctypeIwEE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__16locale5facetE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__17codecvtIDic11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__17codecvtIDsc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__17codecvtIcc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 96, 'is_defined': True, 'name': '_ZTVNSt3__17codecvtIwc11__mbstate_tEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__17collateIcEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__17collateIwEE', 'type': 'OBJECT'}
+{'size': 128, 'is_defined': True, 'name': '_ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 128, 'is_defined': True, 'name': '_ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 104, 'is_defined': True, 'name': '_ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 104, 'is_defined': True, 'name': '_ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__18__c_nodeE', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVNSt3__18ios_base7failureE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTVNSt3__18ios_baseE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__18messagesIcEE', 'type': 'OBJECT'}
+{'size': 64, 'is_defined': True, 'name': '_ZTVNSt3__18messagesIwEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__18numpunctIcEE', 'type': 'OBJECT'}
+{'size': 80, 'is_defined': True, 'name': '_ZTVNSt3__18numpunctIwEE', 'type': 'OBJECT'}
+{'size': 168, 'is_defined': True, 'name': '_ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 168, 'is_defined': True, 'name': '_ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 48, 'is_defined': True, 'name': '_ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'type': 'OBJECT'}
+{'size': 56, 'is_defined': True, 'name': '_ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'type': 'OBJECT'}
+{'size': 120, 'is_defined': True, 'name': '_ZTVNSt3__19strstreamE', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt11logic_error', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVSt12bad_any_cast', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt12length_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt12out_of_range', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt13runtime_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt14overflow_error', 'type': 'OBJECT'}
+{'size': 0, 'is_defined': False, 'name': '_ZTVSt16invalid_argument', 'type': 'OBJECT'}
+{'size': 32, 'is_defined': True, 'name': '_ZTVSt16nested_exception', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVSt18bad_variant_access', 'type': 'OBJECT'}
+{'size': 40, 'is_defined': True, 'name': '_ZTVSt19bad_optional_access', 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZThn16_NSt3__19strstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZThn16_NSt3__19strstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110istrstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110istrstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110ostrstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__110ostrstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__19strstreamD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZTv0_n24_NSt3__19strstreamD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPvRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPvSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPvm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdaPvmSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPvRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPvSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPvm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_Znam', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnamRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnamSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnamSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_Znwm', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnwmRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnwmSt11align_val_t', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZnwmSt11align_val_tRKSt9nothrow_t', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_allocate_exception', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_begin_catch', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_current_primary_exception', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_decrement_exception_refcount', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_end_catch', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_free_exception', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_guard_abort', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_guard_acquire', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_guard_release', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_increment_exception_refcount', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_pure_virtual', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_rethrow', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_rethrow_primary_exception', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_throw', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_uncaught_exception', 'type': 'FUNC'}
diff --git a/lib/buildit b/lib/buildit
deleted file mode 100755
index 6c28f7525a60..000000000000
--- a/lib/buildit
+++ /dev/null
@@ -1,179 +0,0 @@
-#! /bin/sh
-#
-# Set the $TRIPLE environment variable to your system's triple before
-# running this script. If you set $CXX, that will be used to compile
-# the library. Otherwise we'll use clang++.
-
-set -e
-
-if [ `basename $(pwd)` != "lib" ]
-then
- echo "current directory must be lib"
- exit 1
-fi
-
-if [ -z "$CXX" ]
-then
- CXX=clang++
-fi
-
-if [ -z "$CXX_LANG" ]
-then
- CXX_LANG=c++11
-fi
-
-if [ -z "$CC" ]
-then
- CC=clang
-fi
-
-if [ -z "$MACOSX_DEPLOYMENT_TARGET" ]
-then
- if [ -z "$IPHONEOS_DEPLOYMENT_TARGET" ]
- then
- MACOSX_DEPLOYMENT_TARGET=10.7
- fi
-fi
-
-if [ -z "$RC_ProjectSourceVersion" ]
-then
- RC_ProjectSourceVersion=1
-fi
-
-EXTRA_FLAGS="-nostdinc++ -std=${CXX_LANG} -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion \
- -Wstrict-aliasing=2 -Wstrict-overflow=4 -D_LIBCPP_BUILDING_LIBRARY "
-
-case $TRIPLE in
- *-apple-*)
- if [ -z $RC_XBS ]
- then
- RC_CFLAGS="-arch i386 -arch x86_64"
- fi
- SOEXT=dylib
- if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.6" ]
- then
- EXTRA_FLAGS="-nostdinc++ -std=c++11 -U__STRICT_ANSI__"
- LDSHARED_FLAGS="-o libc++.1.dylib \
- -dynamiclib -nodefaultlibs -current_version 1 \
- -compatibility_version 1 \
- -install_name /usr/lib/libc++.1.dylib \
- -Wl,-reexport_library,/usr/lib/libc++abi.dylib \
- -Wl,-unexported_symbols_list,libc++unexp.exp \
- /usr/lib/libSystem.B.dylib"
- else
- if [ -n "$SDKROOT" ]
- then
- EXTRA_FLAGS+="-isysroot ${SDKROOT} "
- if echo "${RC_ARCHS}" | grep -q "armv7"
- then
- RE_EXPORT_LINE="${SDKROOT}/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,libc++sjlj-abi.exp"
- else
- RE_EXPORT_LINE="-Wl,-reexport_library,${SDKROOT}/usr/lib/libc++abi.dylib"
- fi
- CXX=`xcrun -sdk "${SDKROOT}" -find clang++`
- CC=`xcrun -sdk "${SDKROOT}" -find clang`
- else
- # Check if we have _LIBCPPABI_VERSION, to determine the reexport list to use.
- if (echo "#include <cxxabi.h>" | $CXX -E -dM -x c++ - | \
- grep _LIBCPPABI_VERSION > /dev/null)
- then
- RE_EXPORT_LINE="/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,libc++abi2.exp"
- else
- RE_EXPORT_LINE="/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,libc++abi.exp"
- fi
- fi
- LDSHARED_FLAGS="-o libc++.1.dylib \
- -dynamiclib -nodefaultlibs \
- -current_version ${RC_ProjectSourceVersion} \
- -compatibility_version 1 \
- -install_name /usr/lib/libc++.1.dylib \
- -lSystem \
- -Wl,-unexported_symbols_list,libc++unexp.exp \
- ${RE_EXPORT_LINE} \
- -Wl,-force_symbols_not_weak_list,notweak.exp \
- -Wl,-force_symbols_weak_list,weak.exp"
- fi
- ;;
- *-*-mingw*)
- # FIXME: removing libgcc and libsupc++ dependencies means porting libcxxrt and LLVM/compiler-rt
- SOEXT=dll
- LDSHARED_FLAGS="-o libc++.dll \
- -shared -nodefaultlibs -Wl,--export-all-symbols -Wl,--allow-multiple-definition -Wl,--out-implib,libc++.dll.a \
- -lsupc++ -lpthread -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcr100 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt"
- ;;
- *-ibm-*)
- hostOS=`uname`
- hostOS=`echo $hostOS | sed -e "s/\s+$//"`
- hostOS=`echo $hostOS | tr '[A-Z]' '[a-z]'`
-
- if [ $hostOS = "linux" ]
- then
- LDSHARED_FLAGS="-o libc++.so.1 \
- -qmkshrobj -Wl,-soname,libc++.so.1 \
- -lpthread -lrt -lc -lstdc++"
- EXTRA_FLAGS="-qlanglvl=extended0x -D__GLIBCXX__=1"
- else
- LDSHARED_FLAGS="-o shr.o -qmkshrobj -lpthread -bnoquiet"
- EXTRA_FLAGS="-qlanglvl=extended0x"
- fi
- RC_CFLAGS="-qpic=large"
- ;;
- *)
- RC_CFLAGS="-fPIC"
- SOEXT=so
- LDSHARED_FLAGS="-o libc++.so.1.0 \
- -shared -nodefaultlibs -Wl,-soname,libc++.so.1 \
- -lpthread -lrt -lc -lstdc++"
- ;;
-esac
-
-if [ -z "$RC_XBS" ]
-then
- rm -f libc++.1.$SOEXT*
-fi
-
-set -x
-
-for FILE in ../src/*.cpp; do
- $CXX -c -g -Os $RC_CFLAGS $EXTRA_FLAGS -I../include $FILE
-done
-case $TRIPLE in
- *-*-mingw*)
- for FILE in ../src/support/win32/*.cpp; do
- $CXX -c -g -Os $RC_CFLAGS $EXTRA_FLAGS -I../include $FILE
- done
- ;;
-esac
-$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
-
-#libtool -static -o libc++.a *.o
-
-# Create the link for the final library name, so that we can use this directory
-# as a link target for the tests.
-case $TRIPLE in
- *-apple-*)
- rm -f libc++.dylib
- ln -s libc++.1.dylib libc++.dylib
- ;;
- *-*-mingw*)
- ;;
- *-ibm-*)
- if [ $hostOS = "linux" ]
- then
- rm -f libc++.so
- ln -s libc++.so.1 libc++.so
- else #AIX
- rm -f libc++.a
- ar r libc++.a shr.o
- fi
- ;;
- *)
- rm -f libc++.so
- ln -s libc++.so.1 libc++.so
- ;;
-esac
-
-if [ -z "$RC_XBS" ]
-then
- rm *.o
-fi
diff --git a/lib/libc++abi-new-delete.exp b/lib/libc++abi-new-delete.exp
new file mode 100644
index 000000000000..a9e651dd67e9
--- /dev/null
+++ b/lib/libc++abi-new-delete.exp
@@ -0,0 +1,8 @@
+__ZdaPv
+__ZdlPv
+__ZdlPvRKSt9nothrow_t
+__Znam
+__ZdaPvRKSt9nothrow_t
+__Znwm
+__ZnwmRKSt9nothrow_t
+__ZnamRKSt9nothrow_t
diff --git a/lib/libc++abi2.exp b/lib/libc++abi2.exp
index 47dcbbb88fcd..eb088f37057d 100644
--- a/lib/libc++abi2.exp
+++ b/lib/libc++abi2.exp
@@ -209,14 +209,6 @@ __ZNSt20bad_array_new_lengthC2Ev
__ZNSt20bad_array_new_lengthD0Ev
__ZNSt20bad_array_new_lengthD2Ev
__ZSt10unexpectedv
-# __ZdaPv
-# __ZdlPv
-# __ZdlPvRKSt9nothrow_t
-# __Znam
-# __ZdaPvRKSt9nothrow_t
-# __Znwm
-# __ZnwmRKSt9nothrow_t
-# __ZnamRKSt9nothrow_t
__ZTISt10bad_typeid
__ZTISt8bad_cast
___cxa_bad_typeid
diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp
index 25e66038eec0..3f607271b9eb 100644
--- a/src/condition_variable.cpp
+++ b/src/condition_variable.cpp
@@ -14,7 +14,6 @@
#include "condition_variable"
#include "thread"
#include "system_error"
-#include "cassert"
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/src/exception.cpp b/src/exception.cpp
index f25041d83427..0b502cd134c0 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -6,328 +6,31 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#include <stdlib.h>
-#include <stdio.h>
#include "exception"
#include "new"
+#include "typeinfo"
-#if defined(_LIBCPP_ABI_MICROSOFT)
-#include <eh.h>
-#include <corecrt_terminate.h>
-#elif defined(__APPLE__) && !defined(LIBCXXRT) && \
- !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || \
+ (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY))
#include <cxxabi.h>
-
using namespace __cxxabiv1;
#define HAVE_DEPENDENT_EH_ABI 1
- #ifndef _LIBCPPABI_VERSION
- using namespace __cxxabiapple;
- // On Darwin, there are two STL shared libraries and a lower level ABI
- // shared library. The globals holding the current terminate handler and
- // current unexpected handler are in the ABI library.
- #define __terminate_handler __cxxabiapple::__cxa_terminate_handler
- #define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler
- #endif // _LIBCPPABI_VERSION
-#elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
- #include <cxxabi.h>
- using namespace __cxxabiv1;
- #if defined(LIBCXXRT) || defined(_LIBCPPABI_VERSION)
- #define HAVE_DEPENDENT_EH_ABI 1
- #endif
-#elif !defined(__GLIBCXX__) // defined(LIBCXX_BUILDING_LIBCXXABI)
- _LIBCPP_SAFE_STATIC static std::terminate_handler __terminate_handler;
- _LIBCPP_SAFE_STATIC static std::unexpected_handler __unexpected_handler;
-#endif // defined(LIBCXX_BUILDING_LIBCXXABI)
-
-namespace std
-{
-
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
-
-// libcxxrt provides implementations of these functions itself.
-unexpected_handler
-set_unexpected(unexpected_handler func) _NOEXCEPT
-{
-#if defined(_LIBCPP_ABI_MICROSOFT)
- return ::set_unexpected(func);
-#else
- return __sync_lock_test_and_set(&__unexpected_handler, func);
-#endif
-}
-
-unexpected_handler
-get_unexpected() _NOEXCEPT
-{
-#if defined(_LIBCPP_ABI_MICROSOFT)
- return ::_get_unexpected();
-#else
- return __sync_fetch_and_add(&__unexpected_handler, (unexpected_handler)0);
-#endif
-}
-
-_LIBCPP_NORETURN
-void
-unexpected()
-{
- (*get_unexpected())();
- // unexpected handler should not return
- terminate();
-}
-
-terminate_handler
-set_terminate(terminate_handler func) _NOEXCEPT
-{
-#if defined(_LIBCPP_ABI_MICROSOFT)
- return ::set_terminate(func);
-#else
- return __sync_lock_test_and_set(&__terminate_handler, func);
#endif
-}
-terminate_handler
-get_terminate() _NOEXCEPT
-{
#if defined(_LIBCPP_ABI_MICROSOFT)
- return ::_get_terminate();
-#else
- return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
-#endif
-}
-
-#ifndef __EMSCRIPTEN__ // We provide this in JS
-_LIBCPP_NORETURN
-void
-terminate() _NOEXCEPT
-{
-#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
-#endif // _LIBCPP_NO_EXCEPTIONS
- (*get_terminate())();
- // handler should not return
- fprintf(stderr, "terminate_handler unexpectedly returned\n");
- ::abort();
-#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
- // handler should not throw exception
- fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
- ::abort();
- }
-#endif // _LIBCPP_NO_EXCEPTIONS
-}
-#endif // !__EMSCRIPTEN__
-#endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
-
-#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__)
-
-bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
-
-int uncaught_exceptions() _NOEXCEPT
-{
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
- (defined(__APPLE__) || defined(_LIBCPPABI_VERSION))
- // on Darwin, there is a helper function so __cxa_get_globals is private
-# if _LIBCPPABI_VERSION > 1101
- return __cxa_uncaught_exceptions();
-# else
- return __cxa_uncaught_exception() ? 1 : 0;
-# endif
-#elif defined(_LIBCPP_ABI_MICROSOFT)
- return __uncaught_exceptions();
-#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING("uncaught_exceptions not yet implemented")
-# else
-# warning uncaught_exception not yet implemented
-# endif
- fprintf(stderr, "uncaught_exceptions not yet implemented\n");
- ::abort();
-#endif // __APPLE__
-}
-
-
-#ifndef _LIBCPPABI_VERSION
-
-exception::~exception() _NOEXCEPT
-{
-}
-
-const char* exception::what() const _NOEXCEPT
-{
- return "std::exception";
-}
-
-#endif // _LIBCPPABI_VERSION
-#endif //LIBCXXRT
-#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
-
-bad_exception::~bad_exception() _NOEXCEPT
-{
-}
-
-const char* bad_exception::what() const _NOEXCEPT
-{
- return "std::bad_exception";
-}
-
-#endif
-
-#if defined(__GLIBCXX__)
-
-// libsupc++ does not implement the dependent EH ABI and the functionality
-// it uses to implement std::exception_ptr (which it declares as an alias of
-// std::__exception_ptr::exception_ptr) is not directly exported to clients. So
-// we have little choice but to hijack std::__exception_ptr::exception_ptr's
-// (which fortunately has the same layout as our std::exception_ptr) copy
-// constructor, assignment operator and destructor (which are part of its
-// stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr)
-// function.
-
-namespace __exception_ptr
-{
-
-struct exception_ptr
-{
- void* __ptr_;
-
- exception_ptr(const exception_ptr&) _NOEXCEPT;
- exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
- ~exception_ptr() _NOEXCEPT;
-};
-
-}
-
-_LIBCPP_NORETURN void rethrow_exception(__exception_ptr::exception_ptr);
-
-#endif
-
-exception_ptr::~exception_ptr() _NOEXCEPT
-{
-#if HAVE_DEPENDENT_EH_ABI
- __cxa_decrement_exception_refcount(__ptr_);
-#elif defined(__GLIBCXX__)
- reinterpret_cast<__exception_ptr::exception_ptr*>(this)->~exception_ptr();
-#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING("exception_ptr not yet implemented")
-# else
-# warning exception_ptr not yet implemented
-# endif
- fprintf(stderr, "exception_ptr not yet implemented\n");
- ::abort();
-#endif
-}
-
-exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
- : __ptr_(other.__ptr_)
-{
-#if HAVE_DEPENDENT_EH_ABI
- __cxa_increment_exception_refcount(__ptr_);
-#elif defined(__GLIBCXX__)
- new (reinterpret_cast<void*>(this)) __exception_ptr::exception_ptr(
- reinterpret_cast<const __exception_ptr::exception_ptr&>(other));
-#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING("exception_ptr not yet implemented")
-# else
-# warning exception_ptr not yet implemented
-# endif
- fprintf(stderr, "exception_ptr not yet implemented\n");
- ::abort();
-#endif
-}
-
-exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
-{
-#if HAVE_DEPENDENT_EH_ABI
- if (__ptr_ != other.__ptr_)
- {
- __cxa_increment_exception_refcount(other.__ptr_);
- __cxa_decrement_exception_refcount(__ptr_);
- __ptr_ = other.__ptr_;
- }
- return *this;
-#elif defined(__GLIBCXX__)
- *reinterpret_cast<__exception_ptr::exception_ptr*>(this) =
- reinterpret_cast<const __exception_ptr::exception_ptr&>(other);
- return *this;
-#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING("exception_ptr not yet implemented")
-# else
-# warning exception_ptr not yet implemented
-# endif
- fprintf(stderr, "exception_ptr not yet implemented\n");
- ::abort();
-#endif
-}
-
-nested_exception::nested_exception() _NOEXCEPT
- : __ptr_(current_exception())
-{
-}
-
-#if !defined(__GLIBCXX__)
-
-nested_exception::~nested_exception() _NOEXCEPT
-{
-}
-
-#endif
-
-_LIBCPP_NORETURN
-void
-nested_exception::rethrow_nested() const
-{
- if (__ptr_ == nullptr)
- terminate();
- rethrow_exception(__ptr_);
-}
-
-#if !defined(__GLIBCXX__)
-
-exception_ptr current_exception() _NOEXCEPT
-{
-#if HAVE_DEPENDENT_EH_ABI
- // be nicer if there was a constructor that took a ptr, then
- // this whole function would be just:
- // return exception_ptr(__cxa_current_primary_exception());
- exception_ptr ptr;
- ptr.__ptr_ = __cxa_current_primary_exception();
- return ptr;
-#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING( "exception_ptr not yet implemented" )
-# else
-# warning exception_ptr not yet implemented
-# endif
- fprintf(stderr, "exception_ptr not yet implemented\n");
- ::abort();
-#endif
-}
-
-#endif // !__GLIBCXX__
-
-_LIBCPP_NORETURN
-void rethrow_exception(exception_ptr p)
-{
-#if HAVE_DEPENDENT_EH_ABI
- __cxa_rethrow_primary_exception(p.__ptr_);
- // if p.__ptr_ is NULL, above returns so we terminate
- terminate();
+#include "support/runtime/exception_msvc.ipp"
+#include "support/runtime/exception_pointer_unimplemented.ipp"
+#elif defined(_LIBCPPABI_VERSION)
+#include "support/runtime/exception_libcxxabi.ipp"
+#include "support/runtime/exception_pointer_cxxabi.ipp"
+#elif defined(LIBCXXRT)
+#include "support/runtime/exception_libcxxrt.ipp"
+#include "support/runtime/exception_pointer_cxxabi.ipp"
#elif defined(__GLIBCXX__)
- rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p));
+#include "support/runtime/exception_glibcxx.ipp"
+#include "support/runtime/exception_pointer_glibcxx.ipp"
#else
-# if defined(_MSC_VER) && ! defined(__clang__)
- _LIBCPP_WARNING("exception_ptr not yet implemented")
-# else
-# warning exception_ptr not yet implemented
-# endif
- fprintf(stderr, "exception_ptr not yet implemented\n");
- ::abort();
+#include "support/runtime/exception_fallback.ipp"
+#include "support/runtime/exception_pointer_unimplemented.ipp"
#endif
-}
-} // std
diff --git a/src/experimental/filesystem/directory_iterator.cpp b/src/experimental/filesystem/directory_iterator.cpp
index a888dcfa1190..25135857d40c 100644
--- a/src/experimental/filesystem/directory_iterator.cpp
+++ b/src/experimental/filesystem/directory_iterator.cpp
@@ -1,28 +1,32 @@
+//===------------------ directory_iterator.cpp ----------------------------===//
+//
+// 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 "experimental/filesystem"
+#include "__config"
+#if defined(_LIBCPP_WIN32API)
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#else
#include <dirent.h>
+#endif
#include <errno.h>
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM
namespace { namespace detail {
+#if !defined(_LIBCPP_WIN32API)
inline error_code capture_errno() {
_LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
return error_code{errno, std::generic_category()};
}
-
-template <class ...Args>
-inline bool capture_error_or_throw(std::error_code* user_ec,
- const char* msg, Args&&... args)
-{
- std::error_code my_ec = capture_errno();
- if (user_ec) {
- *user_ec = my_ec;
- return true;
- }
- __throw_filesystem_error(msg, std::forward<Args>(args)..., my_ec);
- return false;
-}
+#endif
template <class ...Args>
inline bool set_or_throw(std::error_code& my_ec,
@@ -37,25 +41,87 @@ inline bool set_or_throw(std::error_code& my_ec,
return false;
}
-typedef path::string_type string_type;
-
-
-inline string_type posix_readdir(DIR *dir_stream, error_code& ec) {
+#if !defined(_LIBCPP_WIN32API)
+inline path::string_type posix_readdir(DIR *dir_stream, error_code& ec) {
struct dirent* dir_entry_ptr = nullptr;
errno = 0; // zero errno in order to detect errors
+ ec.clear();
if ((dir_entry_ptr = ::readdir(dir_stream)) == nullptr) {
- ec = capture_errno();
+ if (errno)
+ ec = capture_errno();
return {};
} else {
- ec.clear();
return dir_entry_ptr->d_name;
}
}
+#endif
}} // namespace detail
using detail::set_or_throw;
+#if defined(_LIBCPP_WIN32API)
+class __dir_stream {
+public:
+ __dir_stream() = delete;
+ __dir_stream& operator=(const __dir_stream&) = delete;
+
+ __dir_stream(__dir_stream&& __ds) noexcept
+ : __stream_(__ds.__stream_), __root_(std::move(__ds.__root_)),
+ __entry_(std::move(__ds.__entry_)) {
+ __ds.__stream_ = INVALID_HANDLE_VALUE;
+ }
+
+ __dir_stream(const path& root, directory_options opts, error_code& ec)
+ : __stream_(INVALID_HANDLE_VALUE), __root_(root) {
+ __stream_ = ::FindFirstFile(root.c_str(), &__data_);
+ if (__stream_ == INVALID_HANDLE_VALUE) {
+ ec = error_code(::GetLastError(), std::generic_category());
+ const bool ignore_permission_denied =
+ bool(opts & directory_options::skip_permission_denied);
+ if (ignore_permission_denied && ec.value() == ERROR_ACCESS_DENIED)
+ ec.clear();
+ return;
+ }
+ }
+
+ ~__dir_stream() noexcept {
+ if (__stream_ == INVALID_HANDLE_VALUE)
+ return;
+ close();
+ }
+
+ bool good() const noexcept { return __stream_ != INVALID_HANDLE_VALUE; }
+
+ bool advance(error_code& ec) {
+ while (::FindNextFile(__stream_, &__data_)) {
+ if (!strcmp(__data_.cFileName, ".") || strcmp(__data_.cFileName, ".."))
+ continue;
+ __entry_.assign(__root_ / __data_.cFileName);
+ return true;
+ }
+ ec = error_code(::GetLastError(), std::generic_category());
+ close();
+ return false;
+ }
+
+private:
+ std::error_code close() noexcept {
+ std::error_code ec;
+ if (!::FindClose(__stream_))
+ ec = error_code(::GetLastError(), std::generic_category());
+ __stream_ = INVALID_HANDLE_VALUE;
+ return ec;
+ }
+
+ HANDLE __stream_{INVALID_HANDLE_VALUE};
+ WIN32_FIND_DATA __data_;
+
+public:
+ path __root_;
+ directory_entry __entry_;
+};
+#else
class __dir_stream {
public:
__dir_stream() = delete;
@@ -117,6 +183,7 @@ public:
path __root_;
directory_entry __entry_;
};
+#endif
// directory_iterator
@@ -149,7 +216,7 @@ directory_iterator& directory_iterator::__increment(error_code *ec)
}
-directory_entry const& directory_iterator::__deref() const {
+directory_entry const& directory_iterator::__dereference() const {
_LIBCPP_ASSERT(__imp_, "Attempting to dereference an invalid iterator");
return __imp_->__entry_;
}
@@ -195,7 +262,7 @@ int recursive_directory_iterator::depth() const {
return __imp_->__stack_.size() - 1;
}
-const directory_entry& recursive_directory_iterator::__deref() const {
+const directory_entry& recursive_directory_iterator::__dereference() const {
return __imp_->__stack_.top().__entry_;
}
diff --git a/src/experimental/filesystem/operations.cpp b/src/experimental/filesystem/operations.cpp
index 6c7e4cf24888..bd7685819eca 100644
--- a/src/experimental/filesystem/operations.cpp
+++ b/src/experimental/filesystem/operations.cpp
@@ -35,12 +35,9 @@ namespace detail { namespace {
using value_type = path::value_type;
using string_type = path::string_type;
-
-
inline std::error_code capture_errno() {
- _LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
- std::error_code m_ec(errno, std::generic_category());
- return m_ec;
+ _LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
+ return std::error_code(errno, std::generic_category());
}
void set_or_throw(std::error_code const& m_ec, std::error_code* ec,
@@ -886,23 +883,28 @@ path __system_complete(const path& p, std::error_code *ec) {
return absolute(p, current_path());
}
-path __temp_directory_path(std::error_code *ec) {
- const char* env_paths[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR"};
- const char* ret = nullptr;
- for (auto & ep : env_paths) {
- if ((ret = std::getenv(ep)))
- break;
- }
- path p(ret ? ret : "/tmp");
- std::error_code m_ec;
- if (is_directory(p, m_ec)) {
- if (ec) ec->clear();
- return p;
- }
+path __temp_directory_path(std::error_code* ec) {
+ const char* env_paths[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR"};
+ const char* ret = nullptr;
+
+ for (auto& ep : env_paths)
+ if ((ret = std::getenv(ep)))
+ break;
+ if (ret == nullptr)
+ ret = "/tmp";
+
+ path p(ret);
+ std::error_code m_ec;
+ if (!exists(p, m_ec) || !is_directory(p, m_ec)) {
if (!m_ec || m_ec == make_error_code(errc::no_such_file_or_directory))
- m_ec = make_error_code(errc::not_a_directory);
+ m_ec = make_error_code(errc::not_a_directory);
set_or_throw(m_ec, ec, "temp_directory_path");
return {};
+ }
+
+ if (ec)
+ ec->clear();
+ return p;
}
// An absolute path is composed according to the table in [fs.op.absolute].
diff --git a/src/experimental/filesystem/path.cpp b/src/experimental/filesystem/path.cpp
index 96b81f7b0a70..f49d4cd2d418 100644
--- a/src/experimental/filesystem/path.cpp
+++ b/src/experimental/filesystem/path.cpp
@@ -6,11 +6,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#undef NDEBUG
#include "experimental/filesystem"
#include "string_view"
#include "utility"
-#include "cassert"
namespace { namespace parser
{
@@ -58,13 +56,13 @@ public:
}
PosPtr peek() const noexcept {
- auto End = &Path.back() + 1;
auto TkEnd = getNextTokenStartPos();
+ auto End = getAfterBack();
return TkEnd == End ? nullptr : TkEnd;
}
void increment() noexcept {
- const PosPtr End = &Path.back() + 1;
+ const PosPtr End = getAfterBack();
const PosPtr Start = getNextTokenStartPos();
if (Start == End)
return makeState(PS_AtEnd);
@@ -111,9 +109,8 @@ public:
}
void decrement() noexcept {
- const PosPtr REnd = &Path.front() - 1;
+ const PosPtr REnd = getBeforeFront();
const PosPtr RStart = getCurrentTokenStartPos() - 1;
- assert(RStart != REnd);
switch (State) {
case PS_AtEnd: {
@@ -198,19 +195,27 @@ private:
RawEntry = {};
}
+ PosPtr getAfterBack() const noexcept {
+ return Path.data() + Path.size();
+ }
+
+ PosPtr getBeforeFront() const noexcept {
+ return Path.data() - 1;
+ }
+
/// \brief Return a pointer to the first character after the currently
/// lexed element.
PosPtr getNextTokenStartPos() const noexcept {
switch (State) {
case PS_BeforeBegin:
- return &Path.front();
+ return Path.data();
case PS_InRootName:
case PS_InRootDir:
case PS_InFilenames:
return &RawEntry.back() + 1;
case PS_InTrailingSep:
case PS_AtEnd:
- return &Path.back() + 1;
+ return getAfterBack();
}
_LIBCPP_UNREACHABLE();
}
@@ -322,7 +327,6 @@ string_view_t path::__root_path_raw() const
auto NextCh = PP.peek();
if (NextCh && *NextCh == '/') {
++PP;
- assert(PP.State == PathParser::PS_InRootDir);
return createView(__pn_.data(), &PP.RawEntry.back());
}
return PP.RawEntry;
diff --git a/src/functional.cpp b/src/functional.cpp
new file mode 100644
index 000000000000..5c2646f01b2e
--- /dev/null
+++ b/src/functional.cpp
@@ -0,0 +1,26 @@
+//===----------------------- functional.cpp -------------------------------===//
+//
+// 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 "functional"
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+bad_function_call::~bad_function_call() _NOEXCEPT
+{
+}
+
+const char*
+bad_function_call::what() const _NOEXCEPT
+{
+ return "std::bad_function_call";
+}
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
diff --git a/src/include/atomic_support.h b/src/include/atomic_support.h
index af0f5f505ea5..378541b23256 100644
--- a/src/include/atomic_support.h
+++ b/src/include/atomic_support.h
@@ -29,7 +29,7 @@
#endif
#if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
-# if defined(_MSC_VER) && !defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
# else
# warning Building libc++ without __atomic builtins is unsupported
diff --git a/src/locale.cpp b/src/locale.cpp
index 338ffde3f5b7..1460f9662e35 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -579,10 +579,8 @@ locale::global(const locale& loc)
locale& g = __global();
locale r = g;
g = loc;
-#ifndef __CloudABI__
if (g.name() != "*")
setlocale(LC_ALL, g.name().c_str());
-#endif
return r;
}
@@ -1111,13 +1109,7 @@ ctype<char>::classic_table() _NOEXCEPT
#elif __sun__
return __ctype_mask;
#elif defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-#if _VC_CRT_MAJOR_VERSION < 14
- // This is assumed to be safe, which is a nonsense assumption because we're
- // going to end up dereferencing it later...
- return _ctype+1; // internal ctype mask table defined in msvcrt.dll
-#else
return __pctype_func();
-#endif
#elif defined(__EMSCRIPTEN__)
return *__ctype_b_loc();
#elif defined(_NEWLIB_VERSION)
diff --git a/src/memory.cpp b/src/memory.cpp
index 8569fafb337c..f6f6fe8da628 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -17,28 +17,6 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-namespace
-{
-
-// NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)
-// should be sufficient for thread safety.
-// See https://llvm.org/bugs/show_bug.cgi?id=22803
-template <class T>
-inline T
-increment(T& t) _NOEXCEPT
-{
- return __libcpp_atomic_add(&t, 1, _AO_Relaxed);
-}
-
-template <class T>
-inline T
-decrement(T& t) _NOEXCEPT
-{
- return __libcpp_atomic_add(&t, -1, _AO_Acq_Rel);
-}
-
-} // namespace
-
const allocator_arg_t allocator_arg = allocator_arg_t();
bad_weak_ptr::~bad_weak_ptr() _NOEXCEPT {}
@@ -53,16 +31,21 @@ __shared_count::~__shared_count()
{
}
+__shared_weak_count::~__shared_weak_count()
+{
+}
+
+#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
void
__shared_count::__add_shared() _NOEXCEPT
{
- increment(__shared_owners_);
+ __libcpp_atomic_refcount_increment(__shared_owners_);
}
bool
__shared_count::__release_shared() _NOEXCEPT
{
- if (decrement(__shared_owners_) == -1)
+ if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1)
{
__on_zero_shared();
return true;
@@ -70,10 +53,6 @@ __shared_count::__release_shared() _NOEXCEPT
return false;
}
-__shared_weak_count::~__shared_weak_count()
-{
-}
-
void
__shared_weak_count::__add_shared() _NOEXCEPT
{
@@ -83,7 +62,7 @@ __shared_weak_count::__add_shared() _NOEXCEPT
void
__shared_weak_count::__add_weak() _NOEXCEPT
{
- increment(__shared_weak_owners_);
+ __libcpp_atomic_refcount_increment(__shared_weak_owners_);
}
void
@@ -93,6 +72,8 @@ __shared_weak_count::__release_shared() _NOEXCEPT
__release_weak();
}
+#endif // _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
+
void
__shared_weak_count::__release_weak() _NOEXCEPT
{
@@ -124,7 +105,7 @@ __shared_weak_count::__release_weak() _NOEXCEPT
//__libcpp_atomic_store(&__shared_weak_owners_, -1, _AO_Release);
__on_zero_shared_weak();
}
- else if (decrement(__shared_weak_owners_) == -1)
+ else if (__libcpp_atomic_refcount_decrement(__shared_weak_owners_) == -1)
__on_zero_shared_weak();
}
diff --git a/src/mutex.cpp b/src/mutex.cpp
index 9397ae73ca4f..b858e8877ae5 100644
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -11,7 +11,6 @@
#include "mutex"
#include "limits"
#include "system_error"
-#include "cassert"
#include "include/atomic_support.h"
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -37,7 +36,7 @@ mutex::lock()
bool
mutex::try_lock() _NOEXCEPT
{
- return __libcpp_mutex_trylock(&__m_) == 0;
+ return __libcpp_mutex_trylock(&__m_);
}
void
@@ -45,7 +44,7 @@ mutex::unlock() _NOEXCEPT
{
int ec = __libcpp_mutex_unlock(&__m_);
(void)ec;
- assert(ec == 0);
+ _LIBCPP_ASSERT(ec == 0, "call to mutex::unlock failed");
}
// recursive_mutex
@@ -61,7 +60,7 @@ recursive_mutex::~recursive_mutex()
{
int e = __libcpp_recursive_mutex_destroy(&__m_);
(void)e;
- assert(e == 0);
+ _LIBCPP_ASSERT(e == 0, "call to ~recursive_mutex() failed");
}
void
@@ -77,13 +76,13 @@ recursive_mutex::unlock() _NOEXCEPT
{
int e = __libcpp_recursive_mutex_unlock(&__m_);
(void)e;
- assert(e == 0);
+ _LIBCPP_ASSERT(e == 0, "call to recursive_mutex::unlock() failed");
}
bool
recursive_mutex::try_lock() _NOEXCEPT
{
- return __libcpp_recursive_mutex_trylock(&__m_) == 0;
+ return __libcpp_recursive_mutex_trylock(&__m_);
}
// timed_mutex
diff --git a/src/new.cpp b/src/new.cpp
index b1e8ee324d84..21b30740196b 100644
--- a/src/new.cpp
+++ b/src/new.cpp
@@ -13,27 +13,48 @@
#include "new"
-#if defined(__APPLE__) && !defined(LIBCXXRT) && \
- !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
- #include <cxxabi.h>
-
- #ifndef _LIBCPPABI_VERSION
- // On Darwin, there are two STL shared libraries and a lower level ABI
- // shared library. The global holding the current new handler is
- // in the ABI library and named __cxa_new_handler.
- #define __new_handler __cxxabiapple::__cxa_new_handler
- #endif
-#else // __APPLE__
- #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
- #include <cxxabi.h>
- #endif // defined(LIBCXX_BUILDING_LIBCXXABI)
- #if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) || \
- (!defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__))
- static std::new_handler __new_handler;
- #endif // _LIBCPPABI_VERSION
+#if defined(_LIBCPP_ABI_MICROSOFT)
+// nothing todo
+#elif defined(LIBCXX_BUILDING_LIBCXXABI)
+#include <cxxabi.h>
+#elif defined(LIBCXXRT)
+#include <cxxabi.h>
+#include "support/runtime/new_handler_fallback.ipp"
+#elif defined(__GLIBCXX__)
+// nothing todo
+#else
+# if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+# include <cxxabi.h> // FIXME: remove this once buildit is gone.
+# else
+# include "support/runtime/new_handler_fallback.ipp"
+# endif
#endif
+namespace std
+{
+
#ifndef __GLIBCXX__
+const nothrow_t nothrow = {};
+#endif
+
+#ifndef LIBSTDCXX
+
+void
+__throw_bad_alloc()
+{
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ throw bad_alloc();
+#else
+ _VSTD::abort();
+#endif
+}
+
+#endif // !LIBSTDCXX
+
+} // std
+
+#if !defined(__GLIBCXX__) && !defined(_LIBCPP_ABI_MICROSOFT) && \
+ !defined(_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS)
// Implement all new and delete operators as weak definitions
// in this shared library, so that they can be overridden by programs
@@ -277,107 +298,5 @@ operator delete[] (void* ptr, size_t, std::align_val_t alignment) _NOEXCEPT
::operator delete[](ptr, alignment);
}
-#endif // !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
-
-#endif // !__GLIBCXX__
-
-namespace std
-{
-
-#ifndef __GLIBCXX__
-const nothrow_t nothrow = {};
-#endif
-
-#ifndef _LIBCPPABI_VERSION
-
-#ifndef __GLIBCXX__
-
-new_handler
-set_new_handler(new_handler handler) _NOEXCEPT
-{
- return __sync_lock_test_and_set(&__new_handler, handler);
-}
-
-new_handler
-get_new_handler() _NOEXCEPT
-{
- return __sync_fetch_and_add(&__new_handler, nullptr);
-}
-
-#endif // !__GLIBCXX__
-
-#ifndef LIBCXXRT
-
-bad_alloc::bad_alloc() _NOEXCEPT
-{
-}
-
-#ifndef __GLIBCXX__
-
-bad_alloc::~bad_alloc() _NOEXCEPT
-{
-}
-
-const char*
-bad_alloc::what() const _NOEXCEPT
-{
- return "std::bad_alloc";
-}
-
-#endif // !__GLIBCXX__
-
-bad_array_new_length::bad_array_new_length() _NOEXCEPT
-{
-}
-
-#ifndef __GLIBCXX__
-
-bad_array_new_length::~bad_array_new_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_new_length::what() const _NOEXCEPT
-{
- return "bad_array_new_length";
-}
-
-#endif // !__GLIBCXX__
-
-#endif //LIBCXXRT
-
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-#ifndef __GLIBCXX__
-
-bad_array_length::~bad_array_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_length::what() const _NOEXCEPT
-{
- return "bad_array_length";
-}
-
-#endif // !__GLIBCXX__
-
-#endif // _LIBCPPABI_VERSION
-
-#ifndef LIBSTDCXX
-
-void
-__throw_bad_alloc()
-{
-#ifndef _LIBCPP_NO_EXCEPTIONS
- throw bad_alloc();
-#else
- _VSTD::abort();
-#endif
-}
-
-#endif // !LIBSTDCXX
-
-} // std
+#endif // !_LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#endif // !__GLIBCXX__ && !_LIBCPP_ABI_MICROSOFT && !_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS
diff --git a/src/support/runtime/exception_fallback.ipp b/src/support/runtime/exception_fallback.ipp
new file mode 100644
index 000000000000..69c06a9ce3a8
--- /dev/null
+++ b/src/support/runtime/exception_fallback.ipp
@@ -0,0 +1,182 @@
+// -*- 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 <cstdio>
+
+namespace std {
+
+_LIBCPP_SAFE_STATIC static std::terminate_handler __terminate_handler;
+_LIBCPP_SAFE_STATIC static std::unexpected_handler __unexpected_handler;
+
+
+// libcxxrt provides implementations of these functions itself.
+unexpected_handler
+set_unexpected(unexpected_handler func) _NOEXCEPT
+{
+ return __sync_lock_test_and_set(&__unexpected_handler, func);
+}
+
+unexpected_handler
+get_unexpected() _NOEXCEPT
+{
+ return __sync_fetch_and_add(&__unexpected_handler, (unexpected_handler)0);
+
+}
+
+_LIBCPP_NORETURN
+void unexpected()
+{
+ (*get_unexpected())();
+ // unexpected handler should not return
+ terminate();
+}
+
+terminate_handler
+set_terminate(terminate_handler func) _NOEXCEPT
+{
+ return __sync_lock_test_and_set(&__terminate_handler, func);
+}
+
+terminate_handler
+get_terminate() _NOEXCEPT
+{
+ return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
+
+}
+
+#ifndef __EMSCRIPTEN__ // We provide this in JS
+_LIBCPP_NORETURN
+void
+terminate() _NOEXCEPT
+{
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ try
+ {
+#endif // _LIBCPP_NO_EXCEPTIONS
+ (*get_terminate())();
+ // handler should not return
+ fprintf(stderr, "terminate_handler unexpectedly returned\n");
+ ::abort();
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ }
+ catch (...)
+ {
+ // handler should not throw exception
+ fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
+ ::abort();
+ }
+#endif // _LIBCPP_NO_EXCEPTIONS
+}
+#endif // !__EMSCRIPTEN__
+
+#if !defined(__EMSCRIPTEN__)
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
+
+int uncaught_exceptions() _NOEXCEPT
+{
+#warning uncaught_exception not yet implemented
+ fprintf(stderr, "uncaught_exceptions not yet implemented\n");
+ ::abort();
+}
+#endif // !__EMSCRIPTEN__
+
+
+exception::~exception() _NOEXCEPT
+{
+}
+
+const char* exception::what() const _NOEXCEPT
+{
+ return "std::exception";
+}
+
+bad_exception::~bad_exception() _NOEXCEPT
+{
+}
+
+const char* bad_exception::what() const _NOEXCEPT
+{
+ return "std::bad_exception";
+}
+
+
+bad_alloc::bad_alloc() _NOEXCEPT
+{
+}
+
+bad_alloc::~bad_alloc() _NOEXCEPT
+{
+}
+
+const char*
+bad_alloc::what() const _NOEXCEPT
+{
+ return "std::bad_alloc";
+}
+
+bad_array_new_length::bad_array_new_length() _NOEXCEPT
+{
+}
+
+bad_array_new_length::~bad_array_new_length() _NOEXCEPT
+{
+}
+
+const char*
+bad_array_new_length::what() const _NOEXCEPT
+{
+ return "bad_array_new_length";
+}
+
+
+bad_array_length::bad_array_length() _NOEXCEPT
+{
+}
+
+bad_array_length::~bad_array_length() _NOEXCEPT
+{
+}
+
+const char*
+bad_array_length::what() const _NOEXCEPT
+{
+ return "bad_array_length";
+}
+
+
+bad_cast::bad_cast() _NOEXCEPT
+{
+}
+
+bad_typeid::bad_typeid() _NOEXCEPT
+{
+}
+
+bad_cast::~bad_cast() _NOEXCEPT
+{
+}
+
+const char*
+bad_cast::what() const _NOEXCEPT
+{
+ return "std::bad_cast";
+}
+
+bad_typeid::~bad_typeid() _NOEXCEPT
+{
+}
+
+const char*
+bad_typeid::what() const _NOEXCEPT
+{
+ return "std::bad_typeid";
+}
+
+} // namespace std
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default01.fail.cpp b/src/support/runtime/exception_glibcxx.ipp
index 2ffe1be190e0..0f78932f6f98 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default01.fail.cpp
+++ b/src/support/runtime/exception_glibcxx.ipp
@@ -1,3 +1,4 @@
+// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
@@ -7,29 +8,31 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+#ifndef __GLIBCXX__
+#error header can only be used when targeting libstdc++ or libsupc++
+#endif
-// unique_ptr
+namespace std {
-// Test unique_ptr default ctor
-
-#include <memory>
-
-// default unique_ptr ctor should require default Deleter ctor
-class Deleter
+bad_alloc::bad_alloc() _NOEXCEPT
{
+}
- Deleter() {}
+bad_array_new_length::bad_array_new_length() _NOEXCEPT
+{
+}
-public:
+bad_array_length::bad_array_length() _NOEXCEPT
+{
+}
- Deleter(Deleter&) {}
- Deleter& operator=(Deleter&) {}
- void operator()(void*) const {}
-};
+bad_cast::bad_cast() _NOEXCEPT
+{
+}
-int main()
+bad_typeid::bad_typeid() _NOEXCEPT
{
- std::unique_ptr<int, Deleter> p;
}
+
+} // namespace std
diff --git a/src/support/runtime/exception_libcxxabi.ipp b/src/support/runtime/exception_libcxxabi.ipp
new file mode 100644
index 000000000000..c3dcf1ec591a
--- /dev/null
+++ b/src/support/runtime/exception_libcxxabi.ipp
@@ -0,0 +1,28 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPPABI_VERSION
+#error this header can only be used with libc++abi
+#endif
+
+namespace std {
+
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
+
+int uncaught_exceptions() _NOEXCEPT
+{
+# if _LIBCPPABI_VERSION > 1101
+ return __cxa_uncaught_exceptions();
+# else
+ return __cxa_uncaught_exception() ? 1 : 0;
+# endif
+}
+
+} // namespace std
diff --git a/src/support/runtime/exception_libcxxrt.ipp b/src/support/runtime/exception_libcxxrt.ipp
new file mode 100644
index 000000000000..6d9e0cff58dc
--- /dev/null
+++ b/src/support/runtime/exception_libcxxrt.ipp
@@ -0,0 +1,41 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LIBCXXRT
+#error this header may only be used when targeting libcxxrt
+#endif
+
+namespace std {
+
+bad_exception::~bad_exception() _NOEXCEPT
+{
+}
+
+const char* bad_exception::what() const _NOEXCEPT
+{
+ return "std::bad_exception";
+}
+
+
+bad_array_length::bad_array_length() _NOEXCEPT
+{
+}
+
+bad_array_length::~bad_array_length() _NOEXCEPT
+{
+}
+
+const char*
+bad_array_length::what() const _NOEXCEPT
+{
+ return "bad_array_length";
+}
+
+} // namespace std
diff --git a/src/support/runtime/exception_msvc.ipp b/src/support/runtime/exception_msvc.ipp
new file mode 100644
index 000000000000..950ec0cebfe7
--- /dev/null
+++ b/src/support/runtime/exception_msvc.ipp
@@ -0,0 +1,89 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_ABI_MICROSOFT
+#error this header can only be used when targeting the MSVC ABI
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <eh.h>
+#include <corecrt_terminate.h>
+
+namespace std {
+
+// libcxxrt provides implementations of these functions itself.
+unexpected_handler
+set_unexpected(unexpected_handler func) _NOEXCEPT {
+ return ::set_unexpected(func);
+}
+
+unexpected_handler get_unexpected() _NOEXCEPT {
+ return ::_get_unexpected();
+}
+
+_LIBCPP_NORETURN
+void unexpected() {
+ (*get_unexpected())();
+ // unexpected handler should not return
+ terminate();
+}
+
+terminate_handler set_terminate(terminate_handler func) _NOEXCEPT {
+ return ::set_terminate(func);
+}
+
+terminate_handler get_terminate() _NOEXCEPT {
+ return ::_get_terminate();
+}
+
+_LIBCPP_NORETURN
+void terminate() _NOEXCEPT
+{
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ try
+ {
+#endif // _LIBCPP_NO_EXCEPTIONS
+ (*get_terminate())();
+ // handler should not return
+ fprintf(stderr, "terminate_handler unexpectedly returned\n");
+ ::abort();
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ }
+ catch (...)
+ {
+ // handler should not throw exception
+ fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
+ ::abort();
+ }
+#endif // _LIBCPP_NO_EXCEPTIONS
+}
+
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
+
+int uncaught_exceptions() _NOEXCEPT {
+ return __uncaught_exceptions();
+}
+
+bad_array_length::bad_array_length() _NOEXCEPT
+{
+}
+
+bad_array_length::~bad_array_length() _NOEXCEPT
+{
+}
+
+const char*
+bad_array_length::what() const _NOEXCEPT
+{
+ return "bad_array_length";
+}
+
+} // namespace std
diff --git a/src/support/runtime/exception_pointer_cxxabi.ipp b/src/support/runtime/exception_pointer_cxxabi.ipp
new file mode 100644
index 000000000000..dfac8648c498
--- /dev/null
+++ b/src/support/runtime/exception_pointer_cxxabi.ipp
@@ -0,0 +1,74 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef HAVE_DEPENDENT_EH_ABI
+#error this header may only be used with libc++abi or libcxxrt
+#endif
+
+namespace std {
+
+exception_ptr::~exception_ptr() _NOEXCEPT {
+ __cxa_decrement_exception_refcount(__ptr_);
+}
+
+exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
+ : __ptr_(other.__ptr_)
+{
+ __cxa_increment_exception_refcount(__ptr_);
+}
+
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
+{
+ if (__ptr_ != other.__ptr_)
+ {
+ __cxa_increment_exception_refcount(other.__ptr_);
+ __cxa_decrement_exception_refcount(__ptr_);
+ __ptr_ = other.__ptr_;
+ }
+ return *this;
+}
+
+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_);
+}
+
+exception_ptr current_exception() _NOEXCEPT
+{
+ // be nicer if there was a constructor that took a ptr, then
+ // this whole function would be just:
+ // return exception_ptr(__cxa_current_primary_exception());
+ exception_ptr ptr;
+ ptr.__ptr_ = __cxa_current_primary_exception();
+ return ptr;
+}
+
+_LIBCPP_NORETURN
+void rethrow_exception(exception_ptr p)
+{
+ __cxa_rethrow_primary_exception(p.__ptr_);
+ // if p.__ptr_ is NULL, above returns so we terminate
+ terminate();
+}
+
+} // namespace std
diff --git a/src/support/runtime/exception_pointer_glibcxx.ipp b/src/support/runtime/exception_pointer_glibcxx.ipp
new file mode 100644
index 000000000000..9d20dfe48622
--- /dev/null
+++ b/src/support/runtime/exception_pointer_glibcxx.ipp
@@ -0,0 +1,78 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+// libsupc++ does not implement the dependent EH ABI and the functionality
+// it uses to implement std::exception_ptr (which it declares as an alias of
+// std::__exception_ptr::exception_ptr) is not directly exported to clients. So
+// we have little choice but to hijack std::__exception_ptr::exception_ptr's
+// (which fortunately has the same layout as our std::exception_ptr) copy
+// constructor, assignment operator and destructor (which are part of its
+// stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr)
+// function.
+
+namespace std {
+
+namespace __exception_ptr
+{
+
+struct exception_ptr
+{
+ void* __ptr_;
+
+ exception_ptr(const exception_ptr&) _NOEXCEPT;
+ exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
+ ~exception_ptr() _NOEXCEPT;
+};
+
+}
+
+_LIBCPP_NORETURN void rethrow_exception(__exception_ptr::exception_ptr);
+
+exception_ptr::~exception_ptr() _NOEXCEPT
+{
+ reinterpret_cast<__exception_ptr::exception_ptr*>(this)->~exception_ptr();
+}
+
+exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
+ : __ptr_(other.__ptr_)
+{
+ new (reinterpret_cast<void*>(this)) __exception_ptr::exception_ptr(
+ reinterpret_cast<const __exception_ptr::exception_ptr&>(other));
+}
+
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
+{
+ *reinterpret_cast<__exception_ptr::exception_ptr*>(this) =
+ reinterpret_cast<const __exception_ptr::exception_ptr&>(other);
+ return *this;
+}
+
+nested_exception::nested_exception() _NOEXCEPT
+ : __ptr_(current_exception())
+{
+}
+
+
+_LIBCPP_NORETURN
+void
+nested_exception::rethrow_nested() const
+{
+ if (__ptr_ == nullptr)
+ terminate();
+ rethrow_exception(__ptr_);
+}
+
+_LIBCPP_NORETURN
+void rethrow_exception(exception_ptr p)
+{
+ rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p));
+}
+
+} // namespace std
diff --git a/src/support/runtime/exception_pointer_unimplemented.ipp b/src/support/runtime/exception_pointer_unimplemented.ipp
new file mode 100644
index 000000000000..21c182c85974
--- /dev/null
+++ b/src/support/runtime/exception_pointer_unimplemented.ipp
@@ -0,0 +1,80 @@
+// -*- 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>
+
+namespace std {
+
+exception_ptr::~exception_ptr() _NOEXCEPT
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+}
+
+exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
+ : __ptr_(other.__ptr_)
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+}
+
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+}
+
+nested_exception::nested_exception() _NOEXCEPT
+ : __ptr_(current_exception())
+{
+}
+
+#if !defined(__GLIBCXX__)
+
+nested_exception::~nested_exception() _NOEXCEPT
+{
+}
+
+#endif
+
+_LIBCPP_NORETURN
+void
+nested_exception::rethrow_nested() const
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+#if 0
+ if (__ptr_ == nullptr)
+ terminate();
+ rethrow_exception(__ptr_);
+#endif // FIXME
+}
+
+exception_ptr current_exception() _NOEXCEPT
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+}
+
+_LIBCPP_NORETURN
+void rethrow_exception(exception_ptr p)
+{
+# warning exception_ptr not yet implemented
+ fprintf(stderr, "exception_ptr not yet implemented\n");
+ ::abort();
+}
+
+} // namespace std
diff --git a/src/support/runtime/new_handler_fallback.ipp b/src/support/runtime/new_handler_fallback.ipp
new file mode 100644
index 000000000000..b7092d542d97
--- /dev/null
+++ b/src/support/runtime/new_handler_fallback.ipp
@@ -0,0 +1,27 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+
+namespace std {
+
+_LIBCPP_SAFE_STATIC static std::new_handler __new_handler;
+
+new_handler
+set_new_handler(new_handler handler) _NOEXCEPT
+{
+ return __sync_lock_test_and_set(&__new_handler, handler);
+}
+
+new_handler
+get_new_handler() _NOEXCEPT
+{
+ return __sync_fetch_and_add(&__new_handler, nullptr);
+}
+
+} // namespace std
diff --git a/src/support/win32/locale_win32.cpp b/src/support/win32/locale_win32.cpp
index ee1381117155..acbf79ac197c 100644
--- a/src/support/win32/locale_win32.cpp
+++ b/src/support/win32/locale_win32.cpp
@@ -13,8 +13,6 @@
#include <memory>
#include <type_traits>
-#include <crtversion.h>
-
typedef _VSTD::remove_pointer<locale_t>::type __locale_struct;
typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii;
@@ -31,9 +29,8 @@ locale_t uselocale( locale_t newloc )
// uselocale sets the thread's locale by definition, so unconditionally use thread-local locale
_configthreadlocale( _ENABLE_PER_THREAD_LOCALE );
// uselocale sets all categories
-#if _VC_CRT_MAJOR_VERSION < 14
- setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale );
-#endif
+ // disable setting locale on Windows temporarily because the structure is opaque (PR31516)
+ //setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale );
// uselocale returns the old locale_t
return old_locale;
}
diff --git a/src/system_error.cpp b/src/system_error.cpp
index c54712476828..cbbbb5dcd15c 100644
--- a/src/system_error.cpp
+++ b/src/system_error.cpp
@@ -17,9 +17,9 @@
#include "cstring"
#include "cstdio"
#include "cstdlib"
-#include "cassert"
#include "string"
#include "string.h"
+#include "__debug"
#if defined(__ANDROID__)
#include <android/api-level.h>
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// class error_category
-#if defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
+#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
error_category::error_category() _NOEXCEPT
{
}
@@ -96,7 +96,7 @@ string do_strerror_r(int ev) {
std::snprintf(buffer, strerror_buff_size, "Unknown error %d", ev);
return string(buffer);
} else {
- assert(new_errno == ERANGE);
+ _LIBCPP_ASSERT(new_errno == ERANGE, "unexpected error from ::strerr_r");
// FIXME maybe? 'strerror_buff_size' is likely to exceed the
// maximum error size so ERANGE shouldn't be returned.
std::abort();
diff --git a/src/thread.cpp b/src/thread.cpp
index 5ccf829fb864..3f283c385b76 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -24,9 +24,9 @@
# endif // defined(BSD)
#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
-#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__)
# include <unistd.h>
-#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__)
#if defined(__NetBSD__)
#pragma weak pthread_create // Do not create libpthread dependency
@@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
thread::~thread()
{
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
terminate();
}
@@ -48,11 +48,11 @@ void
thread::join()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_join(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)
@@ -63,11 +63,11 @@ void
thread::detach()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_detach(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)
@@ -99,7 +99,7 @@ thread::hardware_concurrency() _NOEXCEPT
#else // defined(CTL_HW) && defined(HW_NCPU)
// TODO: grovel through /proc or check cpuid on x86 and similar
// instructions on other architectures.
-# if defined(_MSC_VER) && ! defined(__clang__)
+# if defined(_LIBCPP_MSVC)
_LIBCPP_WARNING("hardware_concurrency not yet implemented")
# else
# warning hardware_concurrency not yet implemented
@@ -114,33 +114,9 @@ namespace this_thread
void
sleep_for(const chrono::nanoseconds& ns)
{
- using namespace chrono;
- if (ns > nanoseconds::zero())
+ if (ns > chrono::nanoseconds::zero())
{
-#if defined(_LIBCPP_WIN32API)
- milliseconds ms = duration_cast<milliseconds>(ns);
- if (ms.count() == 0 || ns > duration_cast<nanoseconds>(ms))
- ++ms;
- Sleep(ms.count());
-#else
- seconds s = duration_cast<seconds>(ns);
- timespec ts;
- typedef decltype(ts.tv_sec) ts_sec;
- _LIBCPP_CONSTEXPR ts_sec ts_sec_max = numeric_limits<ts_sec>::max();
- if (s.count() < ts_sec_max)
- {
- ts.tv_sec = static_cast<ts_sec>(s.count());
- ts.tv_nsec = static_cast<decltype(ts.tv_nsec)>((ns-s).count());
- }
- else
- {
- ts.tv_sec = ts_sec_max;
- ts.tv_nsec = giga::num - 1;
- }
-
- while (nanosleep(&ts, &ts) == -1 && errno == EINTR)
- ;
-#endif
+ __libcpp_thread_sleep_for(ns);
}
}
diff --git a/src/typeinfo.cpp b/src/typeinfo.cpp
index d0a7dae38025..02778f368704 100644
--- a/src/typeinfo.cpp
+++ b/src/typeinfo.cpp
@@ -6,73 +6,15 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#include <stdlib.h>
-
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
- (defined(__APPLE__) || defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI))
-#include <cxxabi.h>
-#endif
#include "typeinfo"
-#if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+// FIXME: Remove __APPLE__ default here once buildit is gone.
+#if (!defined(_LIBCPP_ABI_MICROSOFT) && !defined(LIBCXX_BUILDING_LIBCXXABI) && \
+ !defined(LIBCXXRT) && !defined(__GLIBCXX__) && \
+ !defined(__APPLE__)) || \
+ defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) // FIXME: remove this configuration.
std::type_info::~type_info()
{
}
#endif
-
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
-
-std::bad_cast::bad_cast() _NOEXCEPT
-{
-}
-
-std::bad_typeid::bad_typeid() _NOEXCEPT
-{
-}
-
-#ifndef __GLIBCXX__
-
-std::bad_cast::~bad_cast() _NOEXCEPT
-{
-}
-
-const char*
-std::bad_cast::what() const _NOEXCEPT
-{
- return "std::bad_cast";
-}
-
-std::bad_typeid::~bad_typeid() _NOEXCEPT
-{
-}
-
-const char*
-std::bad_typeid::what() const _NOEXCEPT
-{
- return "std::bad_typeid";
-}
-
-#if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
- // On Darwin, the cxa_bad_* functions cannot be in the lower level library
- // because bad_cast and bad_typeid are defined in his higher level library
- void __cxxabiv1::__cxa_bad_typeid()
- {
-#ifndef _LIBCPP_NO_EXCEPTIONS
- throw std::bad_typeid();
-#else
- _VSTD::abort();
-#endif
- }
- void __cxxabiv1::__cxa_bad_cast()
- {
-#ifndef _LIBCPP_NO_EXCEPTIONS
- throw std::bad_cast();
-#else
- _VSTD::abort();
-#endif
- }
-#endif
-
-#endif // !__GLIBCXX__
-#endif // !LIBCXXRT && !_LIBCPPABI_VERSION
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ad110fbfb30b..6f2eac0546fc 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,3 @@
-include(AddLLVM) # for add_lit_testsuite
-
macro(pythonize_bool var)
if (${var})
set(${var} True)
@@ -35,6 +33,7 @@ pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
pythonize_bool(LIBCXX_HAS_ATOMIC_LIB)
pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
+pythonize_bool(LIBCXX_DEBUG_BUILD)
# By default, for non-standalone builds, libcxx and libcxxabi share a library
# directory.
@@ -61,21 +60,28 @@ if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
set(LIBCXX_TEST_DEPS cxx_experimental)
endif()
-if (LIBCXX_HAS_EXTERNAL_THREAD_API)
+if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
list(APPEND LIBCXX_TEST_DEPS cxx_external_threads)
endif()
-add_lit_testsuite(check-cxx
- "Running libcxx tests"
- ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS cxx ${LIBCXX_TEST_DEPS})
+if (LIBCXX_INCLUDE_TESTS)
+ include(AddLLVM) # for add_lit_testsuite
+ add_lit_testsuite(check-cxx
+ "Running libcxx tests"
+ ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS cxx ${LIBCXX_TEST_DEPS})
-add_custom_target(check-libcxx DEPENDS check-cxx)
+ add_custom_target(check-libcxx DEPENDS check-cxx)
+endif()
if (LIBCXX_GENERATE_COVERAGE)
include(CodeCoverage)
set(output_dir "${CMAKE_CURRENT_BINARY_DIR}/coverage")
- set(capture_dirs "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/;${LIBCXX_LIB_CMAKEFILES_DIR}/cxx_experimental.dir/;${CMAKE_CURRENT_BINARY_DIR}")
+ set(capture_dirs
+ "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx_objects.dir/"
+ "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/"
+ "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx_experimental.dir/"
+ "${CMAKE_CURRENT_BINARY_DIR}")
set(extract_dirs "${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")
setup_lcov_test_target_coverage("cxx" "${output_dir}" "${capture_dirs}" "${extract_dirs}")
endif()
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
new file mode 100644
index 000000000000..8214e1e20686
--- /dev/null
+++ b/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class RandomAccessIterator>
+// void
+// random_shuffle(RandomAccessIterator first, RandomAccessIterator last);
+//
+// template <class RandomAccessIterator, class RandomNumberGenerator>
+// void
+// random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
+// RandomNumberGenerator& rand);
+
+//
+// In C++17, random_shuffle has been removed.
+// However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+// is defined before including <algorithm>, then random_shuffle will be restored.
+
+#define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+
+#include <algorithm>
+#include <vector>
+
+struct gen
+{
+ std::ptrdiff_t operator()(std::ptrdiff_t n)
+ {
+ return n-1;
+ }
+};
+
+
+int main()
+{
+ std::vector<int> v;
+ std::random_shuffle(v.begin(), v.end());
+ gen r;
+ std::random_shuffle(v.begin(), v.end(), r);
+}
diff --git a/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp b/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp
new file mode 100644
index 000000000000..d8bb363d86b0
--- /dev/null
+++ b/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp
@@ -0,0 +1,124 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: verify-support, diagnose-if-support
+// UNSUPPORTED: libcpp-has-no-threads
+
+// <atomic>
+
+// Test that invalid memory order arguments are diagnosed where possible.
+
+#include <atomic>
+
+int main() {
+ std::atomic<int> x(42);
+ volatile std::atomic<int>& vx = x;
+ int val1 = 1; ((void)val1);
+ int val2 = 2; ((void)val2);
+ // load operations
+ {
+ x.load(std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ x.load(std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.load(std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.load(std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ x.load(std::memory_order_relaxed);
+ x.load(std::memory_order_consume);
+ x.load(std::memory_order_acquire);
+ x.load(std::memory_order_seq_cst);
+ }
+ {
+ std::atomic_load_explicit(&x, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_load_explicit(&x, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_load_explicit(&vx, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_load_explicit(&vx, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ std::atomic_load_explicit(&x, std::memory_order_relaxed);
+ std::atomic_load_explicit(&x, std::memory_order_consume);
+ std::atomic_load_explicit(&x, std::memory_order_acquire);
+ std::atomic_load_explicit(&x, std::memory_order_seq_cst);
+ }
+ // store operations
+ {
+ x.store(42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ x.store(42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ x.store(42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.store(42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.store(42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.store(42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ x.store(42, std::memory_order_relaxed);
+ x.store(42, std::memory_order_release);
+ x.store(42, std::memory_order_seq_cst);
+ }
+ {
+ std::atomic_store_explicit(&x, 42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_store_explicit(&x, 42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_store_explicit(&x, 42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_store_explicit(&vx, 42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_store_explicit(&vx, 42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_store_explicit(&vx, 42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ std::atomic_store_explicit(&x, 42, std::memory_order_relaxed);
+ std::atomic_store_explicit(&x, 42, std::memory_order_release);
+ std::atomic_store_explicit(&x, 42, std::memory_order_seq_cst);
+ }
+ // compare exchange weak
+ {
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed);
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_consume);
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acquire);
+ x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst);
+ // Test that the cmpxchg overload with only one memory order argument
+ // does not generate any diagnostics.
+ x.compare_exchange_weak(val1, val2, std::memory_order_release);
+ }
+ {
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_weak_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_weak_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed);
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_consume);
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acquire);
+ std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst);
+ }
+ // compare exchange strong
+ {
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ vx.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed);
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_consume);
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acquire);
+ x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst);
+ // Test that the cmpxchg overload with only one memory order argument
+ // does not generate any diagnostics.
+ x.compare_exchange_strong(val1, val2, std::memory_order_release);
+ }
+ {
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_strong_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ std::atomic_compare_exchange_strong_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ // valid memory orders
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed);
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_consume);
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acquire);
+ std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst);
+ }
+}
diff --git a/test/libcxx/containers/associative/non_const_comparator.fail.cpp b/test/libcxx/containers/associative/non_const_comparator.fail.cpp
new file mode 100644
index 000000000000..ea0d9ac09328
--- /dev/null
+++ b/test/libcxx/containers/associative/non_const_comparator.fail.cpp
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+// REQUIRES: diagnose-if-support, verify-support
+
+// Test that libc++ generates a warning diagnostic when the container is
+// provided a non-const callable comparator.
+
+#include <set>
+#include <map>
+
+struct BadCompare {
+ template <class T, class U>
+ bool operator()(T const& t, U const& u) {
+ return t < u;
+ }
+};
+
+int main() {
+ static_assert(!std::__invokable<BadCompare const&, int const&, int const&>::value, "");
+ static_assert(std::__invokable<BadCompare&, int const&, int const&>::value, "");
+
+ // expected-warning@__tree:* 4 {{the specified comparator type does not provide a const call operator}}
+ {
+ using C = std::set<int, BadCompare>;
+ C s;
+ }
+ {
+ using C = std::multiset<long, BadCompare>;
+ C s;
+ }
+ {
+ using C = std::map<int, int, BadCompare>;
+ C s;
+ }
+ {
+ using C = std::multimap<long, int, BadCompare>;
+ C s;
+ }
+}
diff --git a/test/libcxx/containers/associative/undef_min_max.pass.cpp b/test/libcxx/containers/associative/undef_min_max.pass.cpp
index b108f0ce5736..be5e110529e2 100644
--- a/test/libcxx/containers/associative/undef_min_max.pass.cpp
+++ b/test/libcxx/containers/associative/undef_min_max.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-W#warnings"
#endif
diff --git a/test/libcxx/containers/unord/non_const_comparator.fail.cpp b/test/libcxx/containers/unord/non_const_comparator.fail.cpp
new file mode 100644
index 000000000000..8adc67589ef8
--- /dev/null
+++ b/test/libcxx/containers/unord/non_const_comparator.fail.cpp
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+// REQUIRES: diagnose-if-support, verify-support
+
+// Test that libc++ generates a warning diagnostic when the container is
+// provided a non-const callable comparator.
+
+#include <unordered_set>
+#include <unordered_map>
+
+struct BadHash {
+ template <class T>
+ size_t operator()(T const& t) {
+ return std::hash<T>{}(t);
+ }
+};
+
+struct BadEqual {
+ template <class T, class U>
+ bool operator()(T const& t, U const& u) {
+ return t == u;
+ }
+};
+
+int main() {
+ static_assert(!std::__invokable<BadEqual const&, int const&, int const&>::value, "");
+ static_assert(std::__invokable<BadEqual&, int const&, int const&>::value, "");
+
+ // expected-warning@__hash_table:* 4 {{the specified comparator type does not provide a const call operator}}
+ // expected-warning@__hash_table:* 4 {{the specified hash functor does not provide a const call operator}}
+
+ {
+ using C = std::unordered_set<int, BadHash, BadEqual>;
+ C s;
+ }
+ {
+ using C = std::unordered_multiset<long, BadHash, BadEqual>;
+ C s;
+ }
+ {
+ using C = std::unordered_map<int, int, BadHash, BadEqual>;
+ C s;
+ }
+ {
+ using C = std::unordered_multimap<long, int, BadHash, BadEqual>;
+ C s;
+ }
+}
diff --git a/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp b/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp
new file mode 100644
index 000000000000..d6554a63c59c
--- /dev/null
+++ b/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: diagnose-if-support
+// UNSUPPORTED: c++98, c++03
+
+// Libc++ only provides a defined primary template for std::hash in C++14 and
+// newer.
+// UNSUPPORTED: c++11
+
+// <unordered_set>
+
+// Test that we generate a reasonable diagnostic when the specified hash is
+// not enabled.
+
+#include <unordered_set>
+#include <utility>
+
+using VT = std::pair<int, int>;
+
+struct BadHashNoCopy {
+ BadHashNoCopy() = default;
+ BadHashNoCopy(BadHashNoCopy const&) = delete;
+
+ template <class T>
+ size_t operator()(T const&) const { return 0; }
+};
+
+struct BadHashNoCall {
+
+};
+
+
+struct GoodHashNoDefault {
+ explicit GoodHashNoDefault(void*) {}
+ template <class T>
+ size_t operator()(T const&) const { return 0; }
+};
+
+int main() {
+
+ {
+ using Set = std::unordered_set<VT>;
+ Set s; // expected-error@__hash_table:* {{the specified hash does not meet the Hash requirements}}
+
+
+ // FIXME: It would be great to suppress the below diagnostic all together.
+ // but for now it's sufficient that it appears last. However there is
+ // currently no way to test the order diagnostics are issued.
+ // expected-error@memory:* {{call to implicitly-deleted default constructor of '__compressed_pair_elem}}
+ }
+ {
+ using Set = std::unordered_set<int, BadHashNoCopy>;
+ Set s; // expected-error@__hash_table:* {{the specified hash does not meet the Hash requirements}}
+ }
+ {
+ using Set = std::unordered_set<int, BadHashNoCall>;
+ Set s; // expected-error@__hash_table:* {{the specified hash does not meet the Hash requirements}}
+ }
+ {
+ using Set = std::unordered_set<int, GoodHashNoDefault>;
+ Set s(/*bucketcount*/42, GoodHashNoDefault(nullptr));
+ }
+}
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 c2c2d9221cf1..91cdf85b1586 100644
--- a/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
+++ b/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp
@@ -9,11 +9,14 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: libcpp-no-exceptions, libcpp-no-if-constexpr
+// MODULES_DEFINES: _LIBCPP_DEBUG=1
+// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
// test container debugging
#define _LIBCPP_DEBUG 1
#define _LIBCPP_DEBUG_USE_EXCEPTIONS
+
#include <map>
#include <set>
#include <utility>
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 46f960c15b1e..6e2fb7bf3d0c 100644
--- a/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
+++ b/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: libcpp-no-exceptions, libcpp-no-if-constexpr
+// MODULES_DEFINES: _LIBCPP_DEBUG=1
+// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
// test container debugging
diff --git a/test/libcxx/debug/containers/db_string.pass.cpp b/test/libcxx/debug/containers/db_string.pass.cpp
index ee1634140ff6..8d1a622b4ffe 100644
--- a/test/libcxx/debug/containers/db_string.pass.cpp
+++ b/test/libcxx/debug/containers/db_string.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: libcpp-no-exceptions, libcpp-no-if-constexpr
+// MODULES_DEFINES: _LIBCPP_DEBUG=1
+// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
// test container debugging
@@ -38,8 +40,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> {
public:
static void run() {
Base::run_iterator_tests();
- // FIXME: get these passing
- // Base::run_allocator_aware_tests();
+ Base::run_allocator_aware_tests();
try {
for (int N : {3, 128}) {
FrontOnEmptyContainer(N);
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 708fc7f8b950..5618607fbc25 100644
--- a/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
+++ b/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: libcpp-no-exceptions, libcpp-no-if-constexpr
+// MODULES_DEFINES: _LIBCPP_DEBUG=1
+// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
// test container debugging
diff --git a/test/libcxx/debug/debug_abort.pass.cpp b/test/libcxx/debug/debug_abort.pass.cpp
index cfe63202705d..b6e7b0bd805b 100644
--- a/test/libcxx/debug/debug_abort.pass.cpp
+++ b/test/libcxx/debug/debug_abort.pass.cpp
@@ -7,6 +7,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+
+// MODULES_DEFINES: _LIBCPP_DEBUG=0
+
// 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 bc5625c60093..716750c7859a 100644
--- a/test/libcxx/debug/debug_throw.pass.cpp
+++ b/test/libcxx/debug/debug_throw.pass.cpp
@@ -7,7 +7,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+
// UNSUPPORTED: libcpp-no-exceptions
+// MODULES_DEFINES: _LIBCPP_DEBUG=0
// 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 21b1d5255d3d..ec4be700e190 100644
--- a/test/libcxx/debug/debug_throw_register.pass.cpp
+++ b/test/libcxx/debug/debug_throw_register.pass.cpp
@@ -7,7 +7,10 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+
// UNSUPPORTED: libcpp-no-exceptions
+// MODULES_DEFINES: _LIBCPP_DEBUG=1
+// MODULES_DEFINES: _LIBCPP_DEBUG_USE_EXCEPTIONS
// Test that defining _LIBCPP_DEBUG_USE_EXCEPTIONS causes _LIBCPP_ASSERT
// to throw on failure.
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/pointer_type.pass.cpp b/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
index e7ad6ad7ef33..41ddb179ff94 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/pointer_type.pass.cpp
+++ b/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
@@ -9,26 +9,21 @@
// <memory>
-// unique_ptr
+// template <class X>
+// class auto_ptr;
+//
+// In C++17, auto_ptr has been removed.
+// However, for backwards compatibility, if _LIBCPP_NO_REMOVE_AUTOPTR
+// is defined before including <memory>, then auto_ptr will be restored.
+
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
-// Test unique_ptr<T[]>::pointer type
+#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
#include <memory>
#include <type_traits>
-struct Deleter
-{
- struct pointer {};
-};
-
int main()
{
- {
- typedef std::unique_ptr<int[]> P;
- static_assert((std::is_same<P::pointer, int*>::value), "");
- }
- {
- typedef std::unique_ptr<int[], Deleter> P;
- static_assert((std::is_same<P::pointer, Deleter::pointer>::value), "");
- }
+ std::auto_ptr<int> p;
}
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
new file mode 100644
index 000000000000..424fe52b3119
--- /dev/null
+++ b/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+
+// In C++17, the function adapters mem_fun/mem_fun_ref, etc have been removed.
+// However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// is defined before including <functional>, then they will be restored.
+
+#define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+
+#include <functional>
+#include <cassert>
+
+int identity(int v) { return v; }
+int sum(int a, int b) { return a + b; }
+
+struct Foo {
+ int zero() const { return 0; }
+ int identity(int v) const { return v; }
+ int sum(int a, int b) const { return a + b; }
+};
+
+int main()
+{
+ typedef std::pointer_to_unary_function<int, int> PUF;
+ 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/depr/enable_removed_cpp17_features.pass.cpp b/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
new file mode 100644
index 000000000000..9f8a9c0888ba
--- /dev/null
+++ b/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// Test that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES correctly defines
+// _LIBCPP_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
+
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
+#define _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
+#include <__config>
+
+#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
+#endif
+
+#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
+#error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
+#endif
+
+int main() {
+}
diff --git a/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp b/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
new file mode 100644
index 000000000000..55e23b9eda59
--- /dev/null
+++ b/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// test get_unexpected
+
+
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#include <exception>
+#include <cassert>
+#include <cstdlib>
+
+void f1() {}
+void f2() {}
+
+void f3()
+{
+ std::exit(0);
+}
+
+int main()
+{
+
+ std::unexpected_handler old = std::get_unexpected();
+ // verify there is a previous unexpected handler
+ assert(old);
+ std::set_unexpected(f1);
+ assert(std::get_unexpected() == f1);
+ // verify f1 was replace with f2
+ std::set_unexpected(f2);
+ assert(std::get_unexpected() == f2);
+ // verify calling original unexpected handler calls terminate
+ std::set_terminate(f3);
+ (*old)();
+ assert(0);
+}
diff --git a/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp b/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
new file mode 100644
index 000000000000..c4915dd10063
--- /dev/null
+++ b/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// test set_unexpected
+
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#include <exception>
+#include <cassert>
+#include <cstdlib>
+
+void f1() {}
+void f2() {}
+
+void f3()
+{
+ std::exit(0);
+}
+
+int main()
+{
+ std::unexpected_handler old = std::set_unexpected(f1);
+ // verify there is a previous unexpected handler
+ assert(old);
+ // verify f1 was replace with f2
+ assert(std::set_unexpected(f2) == f1);
+ // verify calling original unexpected handler calls terminate
+ std::set_terminate(f3);
+ (*old)();
+ assert(0);
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/op_arrow.fail.cpp b/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
index 1c90ba76af39..7a84b92ca98a 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/op_arrow.fail.cpp
+++ b/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
@@ -7,24 +7,22 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// test unexpected
-// unique_ptr
-
-// test op->()
-
-#include <memory>
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#include <exception>
+#include <cstdlib>
#include <cassert>
-struct A
+void fexit()
{
- int i_;
-
- A() : i_(7) {}
-};
+ std::exit(0);
+}
int main()
{
- std::unique_ptr<A[]> p(new A);
- assert(p->i_ == 7);
+ std::set_unexpected(fexit);
+ std::unexpected();
+ assert(false);
}
diff --git a/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp b/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp
new file mode 100644
index 000000000000..2a2917625fe5
--- /dev/null
+++ b/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.fail.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// test unexpected
+
+#include <exception>
+
+void f() {}
+
+int main() {
+ using T = std::unexpected_handler; // expected-error {{no type named 'unexpected_handler' in namespace 'std'}}
+ std::unexpected(); // expected-error {{no member named 'unexpected' in namespace 'std'}}
+ std::get_unexpected(); // expected-error {{no member named 'get_unexpected' in namespace 'std'}}
+ std::set_unexpected(f); // expected-error {{no type named 'set_unexpected' in namespace 'std'}}
+}
diff --git a/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp b/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp
new file mode 100644
index 000000000000..6f839befb5cf
--- /dev/null
+++ b/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <experimental/filesystem>
+
+// class path
+
+#include <experimental/filesystem>
+#include <iterator>
+
+
+namespace fs = std::experimental::filesystem;
+
+int main() {
+ using namespace fs;
+ using RIt = std::reverse_iterator<path::iterator>;
+
+ // expected-error@iterator:* {{static_assert failed "The specified iterator type cannot be used with reverse_iterator; Using stashing iterators with reverse_iterator causes undefined behavior"}}
+ {
+ RIt r;
+ ((void)r);
+ }
+}
diff --git a/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/max_size.pass.cpp b/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/max_size.pass.cpp
deleted file mode 100644
index ac685a99be49..000000000000
--- a/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/max_size.pass.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// REQUIRES: c++experimental
-// UNSUPPORTED: c++98, c++03
-
-// <experimental/memory_resource>
-
-// template <class T> class polymorphic_allocator
-
-// EXTENSION
-// std::size_t polymorphic_allocator<T>::max_size() const noexcept
-
-#include <experimental/memory_resource>
-#include <type_traits>
-#include <cassert>
-
-#include "test_memory_resource.hpp"
-
-namespace ex = std::experimental::pmr;
-
-template <std::size_t S>
-std::size_t getMaxSize() {
- using T = typename std::aligned_storage<S>::type;
- static_assert(sizeof(T) == S, "Required for test");
- return ex::polymorphic_allocator<T>{}.max_size();
-}
-
-template <std::size_t S, std::size_t A>
-std::size_t getMaxSize() {
- using T = typename std::aligned_storage<S, A>::type;
- static_assert(sizeof(T) == S, "Required for test");
- return ex::polymorphic_allocator<T>{}.max_size();
-}
-
-int main()
-{
- {
- using Alloc = ex::polymorphic_allocator<int>;
- using Traits = std::allocator_traits<Alloc>;
- const Alloc a;
- static_assert(std::is_same<decltype(a.max_size()), Traits::size_type>::value, "");
- static_assert(noexcept(a.max_size()), "");
- }
- {
- constexpr std::size_t Max = std::numeric_limits<std::size_t>::max();
- assert(getMaxSize<1>() == Max);
- assert(getMaxSize<2>() == Max / 2);
- assert(getMaxSize<4>() == Max / 4);
- assert(getMaxSize<8>() == Max / 8);
- assert(getMaxSize<16>() == Max / 16);
- assert(getMaxSize<32>() == Max / 32);
- assert(getMaxSize<64>() == Max / 64);
- assert(getMaxSize<1024>() == Max / 1024);
-
- assert((getMaxSize<6, 2>() == Max / 6));
- assert((getMaxSize<12, 4>() == Max / 12));
- }
-}
diff --git a/test/libcxx/test/__init__.py b/test/libcxx/test/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/libcxx/test/__init__.py
+++ /dev/null
diff --git a/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp b/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
index 6ebba1467db9..62e61818605b 100644
--- a/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
+++ b/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
@@ -9,6 +9,8 @@
//
// UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
+// XFAIL: windows
+
// <condition_variable>
// class condition_variable;
diff --git a/test/libcxx/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_mangling.pass.cpp b/test/libcxx/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_mangling.pass.cpp
deleted file mode 100644
index d3568caa81a3..000000000000
--- a/test/libcxx/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_mangling.pass.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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: libcpp-has-no-threads
-
-// TODO(EricWF) Investigate why typeid(...).name() returns a different string
-// on GCC 4.9 but not newer GCCs.
-// XFAIL: gcc-4.9
-
-// THIS TESTS C++03 EXTENSIONS.
-
-// <mutex>
-
-// template <class ...Mutex> class lock_guard;
-
-// Test that the the variadic lock guard implementation mangles the same in
-// C++11 and C++03. This is important since the mangling of `lock_guard` depends
-// on it being declared as a variadic template, even in C++03.
-
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#include <mutex>
-#include <string>
-#include <typeinfo>
-#include <cassert>
-
-int main() {
- const std::string expect = "NSt3__110lock_guardIJNS_5mutexEEEE";
- assert(typeid(std::lock_guard<std::mutex>).name() == expect);
-}
diff --git a/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp b/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
index c6ed66ce41d9..1618155008ab 100644
--- a/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
+++ b/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
@@ -9,6 +9,8 @@
//
// UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
+// XFAIL: windows
+
// <mutex>
// class mutex;
diff --git a/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp b/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
index 2031e4d7d4bb..f8f404080429 100644
--- a/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
+++ b/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
@@ -9,6 +9,8 @@
//
// UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
+// XFAIL: windows
+
// <mutex>
// class recursive_mutex;
diff --git a/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
index 1b1cbf89a099..c818474ba941 100644
--- a/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
+++ b/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
@@ -9,6 +9,8 @@
//
// UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
+// XFAIL: windows
+
// <thread>
// class thread
diff --git a/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp b/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
index e864af7f05b2..e801fc46a9e1 100644
--- a/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
+++ b/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
+// REQUIRES: libcpp-has-thread-api-pthread
// <thread>
diff --git a/test/libcxx/type_traits/convert_to_integral.pass.cpp b/test/libcxx/type_traits/convert_to_integral.pass.cpp
index 3fdc98f5468f..8cac0c7d8255 100644
--- a/test/libcxx/type_traits/convert_to_integral.pass.cpp
+++ b/test/libcxx/type_traits/convert_to_integral.pass.cpp
@@ -76,7 +76,7 @@ void check_enum_types()
enum enum1 { zero = 0, one = 1 };
-enum enum2 {
+enum enum2 : unsigned long {
value = std::numeric_limits<unsigned long>::max()
};
diff --git a/test/libcxx/util.py b/test/libcxx/util.py
deleted file mode 100644
index 8899ffaa4b26..000000000000
--- a/test/libcxx/util.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#===----------------------------------------------------------------------===##
-#
-# 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.
-#
-#===----------------------------------------------------------------------===##
-
-from contextlib import contextmanager
-import os
-import tempfile
-
-
-def cleanFile(filename):
- try:
- os.remove(filename)
- except OSError:
- pass
-
-
-@contextmanager
-def guardedTempFilename(suffix='', prefix='', dir=None):
- # Creates and yeilds a temporary filename within a with statement. The file
- # is removed upon scope exit.
- handle, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=dir)
- os.close(handle)
- yield name
- cleanFile(name)
-
-
-@contextmanager
-def guardedFilename(name):
- # yeilds a filename within a with statement. The file is removed upon scope
- # exit.
- yield name
- cleanFile(name)
-
-
-@contextmanager
-def nullContext(value):
- # yeilds a variable within a with statement. No action is taken upon scope
- # exit.
- yield value
-
-
-def makeReport(cmd, out, err, rc):
- report = "Command: %s\n" % cmd
- report += "Exit Code: %d\n" % rc
- if out:
- report += "Standard Output:\n--\n%s--\n" % out
- if err:
- report += "Standard Error:\n--\n%s--\n" % err
- report += '\n'
- return report
diff --git a/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h b/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
index 7e7a5fd24a62..f2a5b08da9ac 100644
--- a/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
+++ b/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
@@ -129,7 +129,7 @@ private:
};
//==============================================================================
-// DerivedFromBase - A type that derives from it's template argument 'Base'
+// DerivedFromBase - A type that derives from its template argument 'Base'
template <class Base>
struct DerivedFromType : public Base {
DerivedFromType() : Base() {}
@@ -138,7 +138,7 @@ struct DerivedFromType : public Base {
};
//==============================================================================
-// DerefToType - A type that dereferences to it's template argument 'To'.
+// DerefToType - A type that dereferences to its template argument 'To'.
// The cv-ref qualifiers of the 'DerefToType' object do not propagate
// to the resulting 'To' object.
template <class To>
@@ -154,7 +154,7 @@ struct DerefToType {
};
//==============================================================================
-// DerefPropToType - A type that dereferences to it's template argument 'To'.
+// DerefPropToType - A type that dereferences to its template argument 'To'.
// The cv-ref qualifiers of the 'DerefPropToType' object propagate
// to the resulting 'To' object.
template <class To>
diff --git a/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp b/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp
new file mode 100644
index 000000000000..319a78b0506c
--- /dev/null
+++ b/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// Test that UBSAN doesn't generate unsigned integer overflow diagnostics
+// from within the hashing internals.
+
+#include <utility>
+#include <cstdint>
+#include <limits>
+#include <string>
+
+#include "test_macros.h"
+
+typedef std::__murmur2_or_cityhash<uint32_t> Hash32;
+typedef std::__murmur2_or_cityhash<uint64_t> Hash64;
+
+void test(const void* key, int len) {
+ for (int i=1; i <= len; ++i) {
+ Hash32 h1;
+ Hash64 h2;
+ DoNotOptimize(h1(key, i));
+ DoNotOptimize(h2(key, i));
+ }
+}
+
+int main() {
+ const std::string TestCases[] = {
+ "abcdaoeuaoeclaoeoaeuaoeuaousaotehu]+}sthoasuthaoesutahoesutaohesutaoeusaoetuhasoetuhaoseutaoseuthaoesutaohes"
+ "00000000000000000000000000000000000000000000000000000000000000000000000",
+ "1237546895+54+4554985416849484213464984765465464654564565645645646546456546546"
+ };
+ const size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]);
+ for (size_t i=0; i < NumCases; ++i)
+ test(TestCases[i].data(), TestCases[i].length());
+}
diff --git a/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp b/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp
new file mode 100644
index 000000000000..e3e083bfb1e9
--- /dev/null
+++ b/test/libcxx/utilities/meta/meta.unary/meta.unary.prop/missing_is_aggregate_trait.fail.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// <type_traits>
+
+// template <class T> struct is_aggregate;
+// template <class T> constexpr bool is_aggregate_v = is_aggregate<T>::value;
+
+#include <type_traits>
+
+int main ()
+{
+#ifdef _LIBCPP_HAS_NO_IS_AGGREGATE
+ // This should not compile when _LIBCPP_HAS_NO_IS_AGGREGATE is defined.
+ bool b = __is_aggregate(void);
+ ((void)b);
+#else
+#error Forcing failure...
+#endif
+}
diff --git a/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp b/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
index a35dfd696259..c18822bbe811 100644
--- a/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
+++ b/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
@@ -30,4 +30,11 @@ int main() {
// bind rvalue to constructed non-rvalue
std::tuple<std::string &&> t2("hello"); // expected-note {{requested here}}
std::tuple<std::string &&> t3(std::allocator_arg, alloc, "hello"); // expected-note {{requested here}}
+
+ // FIXME: The below warnings may get emitted as an error, a warning, or not emitted at all
+ // depending on the flags used to compile this test.
+ {
+ // expected-warning@tuple:* 0+ {{binding reference member 'value' to a temporary value}}
+ // expected-error@tuple:* 0+ {{binding reference member 'value' to a temporary value}}
+ }
}
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
index cb17dfeb071a..26556c6eb047 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
@@ -12,7 +12,7 @@
// The following compilers don't generate constexpr special members correctly.
// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
-// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0
// <variant>
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
index 286a623882fe..fb6907dc5627 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
@@ -12,7 +12,7 @@
// The following compilers don't generate constexpr special members correctly.
// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
-// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0
// <variant>
diff --git a/test/lit.cfg b/test/lit.cfg
index eee17fdaa1c8..c54f0a01047c 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -3,7 +3,7 @@
import os
import site
-site.addsitedir(os.path.dirname(__file__))
+site.addsitedir(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'utils'))
# Tell pylint that we know config and lit_config exist somewhere.
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 0cccffcf5ec0..72dcc3aefda3 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -26,7 +26,7 @@ config.executor = "@LIBCXX_EXECUTOR@"
config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@"
config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@"
config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@"
-
+config.debug_build = "@LIBCXX_DEBUG_BUILD@"
config.libcxxabi_shared = "@LIBCXXABI_ENABLE_SHARED@"
config.cxx_ext_threads = "@LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@"
diff --git a/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
index e24598a9bc12..e2abf7cce42e 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <algorithm>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<RandomAccessIterator Iter>
// requires ShuffleIterator<Iter>
diff --git a/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
index c923d847f11e..313b6bac402e 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <algorithm>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<RandomAccessIterator Iter, Callable<auto, Iter::difference_type> Rand>
// requires ShuffleIterator<Iter>
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 de3f0a741045..1cf2d9e84562 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
@@ -21,6 +21,8 @@
#include "test_iterators.h"
+bool equalToTwo(int v) { return v == 2; }
+
template <class InIter, class OutIter>
void
test()
@@ -28,8 +30,8 @@ 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(ib),
- std::bind2nd(std::equal_to<int>(), 2));
+ OutIter r = std::remove_copy_if(InIter(ia), InIter(ia+sa),
+ OutIter(ib), equalToTwo);
assert(base(r) == ib + sa-3);
assert(ib[0] == 0);
assert(ib[1] == 1);
diff --git a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp
index 1eff3d39e20e..f2ffece12e8b 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp
@@ -23,6 +23,8 @@
#include "test_iterators.h"
+bool equalToTwo(int v) { return v == 2; }
+
template <class InIter, class OutIter>
void
test()
@@ -30,8 +32,8 @@ test()
int ia[] = {0, 1, 2, 3, 4};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
int ib[sa] = {0};
- OutIter r = std::replace_copy_if(InIter(ia), InIter(ia+sa), OutIter(ib),
- std::bind2nd(std::equal_to<int>(), 2), 5);
+ OutIter r = std::replace_copy_if(InIter(ia), InIter(ia+sa),
+ OutIter(ib), equalToTwo, 5);
assert(base(r) == ib + sa);
assert(ib[0] == 0);
assert(ib[1] == 1);
diff --git a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp
index 8d6ab04e14dd..ebb2945d7c43 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp
@@ -22,13 +22,15 @@
#include "test_iterators.h"
+bool equalToTwo(int v) { return v == 2; }
+
template <class Iter>
void
test()
{
int ia[] = {0, 1, 2, 3, 4};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
- std::replace_if(Iter(ia), Iter(ia+sa), std::bind2nd(std::equal_to<int>(), 2), 5);
+ std::replace_if(Iter(ia), Iter(ia+sa), equalToTwo, 5);
assert(ia[0] == 0);
assert(ia[1] == 1);
assert(ia[2] == 5);
diff --git a/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp
index 68556fd98817..6c5e621e4b20 100644
--- a/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp
+++ b/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp
@@ -21,6 +21,8 @@
#include "test_iterators.h"
+int plusOne(int v) { return v + 1; }
+
template <class InIter, class OutIter>
void
test()
@@ -28,8 +30,8 @@ test()
int ia[] = {0, 1, 2, 3, 4};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
int ib[sa] = {0};
- OutIter r = std::transform(InIter(ia), InIter(ia+sa), OutIter(ib),
- std::bind2nd(std::plus<int>(), 1));
+ OutIter r = std::transform(InIter(ia), InIter(ia+sa),
+ OutIter(ib), plusOne);
assert(base(r) == ib + sa);
assert(ib[0] == 1);
assert(ib[1] == 2);
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 025bc06a618d..0a05c6f659ca 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
@@ -20,17 +20,24 @@
#include "test_iterators.h"
+struct eq {
+ eq (int val) : v(val) {}
+ bool operator () (int v2) const { return v == v2; }
+ int v;
+ };
+
+
int main()
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
assert(std::count_if(input_iterator<const int*>(ia),
input_iterator<const int*>(ia + sa),
- std::bind2nd(std::equal_to<int>(),2)) == 3);
+ eq(2)) == 3);
assert(std::count_if(input_iterator<const int*>(ia),
input_iterator<const int*>(ia + sa),
- std::bind2nd(std::equal_to<int>(),7)) == 0);
+ eq(7)) == 0);
assert(std::count_if(input_iterator<const int*>(ia),
input_iterator<const int*>(ia),
- std::bind2nd(std::equal_to<int>(),2)) == 0);
+ eq(2)) == 0);
}
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 bde6ff389d0c..c942d2e38a58 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
@@ -20,16 +20,22 @@
#include "test_iterators.h"
+struct eq {
+ eq (int val) : v(val) {}
+ bool operator () (int v2) const { return v == v2; }
+ int v;
+ };
+
int main()
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
input_iterator<const int*> r = std::find_if(input_iterator<const int*>(ia),
input_iterator<const int*>(ia+s),
- std::bind2nd(std::equal_to<int>(), 3));
+ eq(3));
assert(*r == 3);
r = std::find_if(input_iterator<const int*>(ia),
input_iterator<const int*>(ia+s),
- std::bind2nd(std::equal_to<int>(), 10));
+ eq(10));
assert(r == input_iterator<const int*>(ia+s));
}
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 661e643f07d1..e68344b4b259 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
@@ -20,16 +20,23 @@
#include "test_iterators.h"
+struct ne {
+ ne (int val) : v(val) {}
+ bool operator () (int v2) const { return v != v2; }
+ int v;
+ };
+
+
int main()
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
input_iterator<const int*> r = std::find_if_not(input_iterator<const int*>(ia),
input_iterator<const int*>(ia+s),
- std::bind2nd(std::not_equal_to<int>(), 3));
+ ne(3));
assert(*r == 3);
r = std::find_if_not(input_iterator<const int*>(ia),
input_iterator<const int*>(ia+s),
- std::bind2nd(std::not_equal_to<int>(), 10));
+ ne(10));
assert(r == input_iterator<const int*>(ia+s));
}
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp
index 9da9356b0be1..082cad5f2d08 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp
@@ -15,14 +15,17 @@
// make_heap(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N);
assert(std::is_heap(ia, ia+N));
delete [] ia;
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
index 9d0545f0d9c5..01183d16c927 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
@@ -17,6 +17,7 @@
#include <algorithm>
#include <functional>
#include <memory>
+#include <random>
#include <cassert>
#include "test_macros.h"
@@ -29,6 +30,7 @@ struct indirect_less
{return *x < *y;}
};
+std::mt19937 randomness;
void test(int N)
{
@@ -36,7 +38,7 @@ void test(int N)
{
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, std::greater<int>());
assert(std::is_heap(ia, ia+N, std::greater<int>()));
}
@@ -64,7 +66,7 @@ void test(int N)
// Random
{
binary_counting_predicate<std::greater<int>, int, int> pred ((std::greater<int>()));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, std::ref(pred));
assert(pred.count() <= 3u*N);
assert(std::is_heap(ia, ia+N, pred));
@@ -90,7 +92,7 @@ int main()
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
for (int i = 0; i < N; ++i)
ia[i].reset(new int(i));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, indirect_less());
assert(std::is_heap(ia, ia+N, indirect_less()));
delete [] ia;
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp
index 252fc758cb1f..8ba0f7194062 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp
@@ -15,14 +15,17 @@
// pop_heap(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N);
for (int i = N; i > 0; --i)
{
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
index 0bfad61961ed..8e7931f7ea5d 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
@@ -16,10 +16,12 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
+
struct indirect_less
{
template <class P>
@@ -29,12 +31,14 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, std::greater<int>());
for (int i = N; i > 0; --i)
{
@@ -55,7 +59,7 @@ int main()
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
for (int i = 0; i < N; ++i)
ia[i].reset(new int(i));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, indirect_less());
for (int i = N; i > 0; --i)
{
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp
index d82896d6a916..38d7a425d82b 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp
@@ -16,14 +16,17 @@
// push_heap(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
for (int i = 0; i <= N; ++i)
{
std::push_heap(ia, ia+i);
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
index 5d2985cc07fa..38d09ceda6e2 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
@@ -17,6 +17,7 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
@@ -30,12 +31,14 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
for (int i = 0; i <= N; ++i)
{
std::push_heap(ia, ia+i, std::greater<int>());
@@ -54,7 +57,7 @@ int main()
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
for (int i = 0; i < N; ++i)
ia[i].reset(new int(i));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
for (int i = 0; i <= N; ++i)
{
std::push_heap(ia, ia+i, indirect_less());
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp
index c6eaa8ccec86..003138099f5a 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp
@@ -15,14 +15,17 @@
// sort_heap(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N);
std::sort_heap(ia, ia+N);
assert(std::is_sorted(ia, ia+N));
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
index 1c072c5a12ca..c0a05e4209b3 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
@@ -16,6 +16,7 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
@@ -29,12 +30,14 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
void test(int N)
{
int* ia = new int [N];
for (int i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, std::greater<int>());
std::sort_heap(ia, ia+N, std::greater<int>());
assert(std::is_sorted(ia, ia+N, std::greater<int>()));
@@ -56,7 +59,7 @@ int main()
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
for (int i = 0; i < N; ++i)
ia[i].reset(new int(i));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::make_heap(ia, ia+N, indirect_less());
std::sort_heap(ia, ia+N, indirect_less());
assert(std::is_sorted(ia, ia+N, indirect_less()));
diff --git a/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp b/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp
index 33a42a2f62a1..683b07d32089 100644
--- a/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp
@@ -16,6 +16,7 @@
// inplace_merge(Iter first, Iter middle, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
@@ -42,6 +43,8 @@ struct S {
};
#endif
+std::mt19937 randomness;
+
template <class Iter>
void
test_one(unsigned N, unsigned M)
@@ -51,7 +54,7 @@ test_one(unsigned N, unsigned M)
value_type* ia = new value_type[N];
for (unsigned i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::sort(ia, ia+M);
std::sort(ia+M, ia+N);
std::inplace_merge(Iter(ia), Iter(ia+M), Iter(ia+N));
diff --git a/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
index fd9e5f13c26a..3d8902ec2271 100644
--- a/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -17,6 +17,7 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_macros.h"
@@ -58,6 +59,8 @@ struct S {
#include "test_iterators.h"
#include "counting_predicates.hpp"
+std::mt19937 randomness;
+
template <class Iter>
void
test_one(unsigned N, unsigned M)
@@ -67,7 +70,7 @@ test_one(unsigned N, unsigned M)
value_type* ia = new value_type[N];
for (unsigned i = 0; i < N; ++i)
ia[i] = i;
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::sort(ia, ia+M, std::greater<value_type>());
std::sort(ia+M, ia+N, std::greater<value_type>());
binary_counting_predicate<std::greater<value_type>, value_type, value_type> pred((std::greater<value_type>()));
@@ -130,7 +133,7 @@ int main()
std::unique_ptr<int>* ia = new std::unique_ptr<int>[N];
for (int i = 0; i < N; ++i)
ia[i].reset(new int(i));
- std::random_shuffle(ia, ia+N);
+ std::shuffle(ia, ia+N, randomness);
std::sort(ia, ia+M, indirect_less());
std::sort(ia+M, ia+N, indirect_less());
std::inplace_merge(ia, ia+M, ia+N, indirect_less());
diff --git a/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp b/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
index 2a20cac0b79b..777461023e7d 100644
--- a/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
@@ -19,10 +19,13 @@
// merge(InIter1 first1, InIter1 last1, InIter2 first2, InIter2 last2, OutIter result);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class InIter1, class InIter2, class OutIter>
void
test()
@@ -53,7 +56,7 @@ test()
int* ic = new int[2*N];
for (unsigned i = 0; i < 2*N; ++i)
ic[i] = i;
- std::random_shuffle(ic, ic+2*N);
+ std::shuffle(ic, ic+2*N, randomness);
std::copy(ic, ic+N, ia);
std::copy(ic+N, ic+2*N, ib);
std::sort(ia, ia+N);
diff --git a/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
index 152c552381b9..3daaeebbeae9 100644
--- a/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
@@ -22,11 +22,14 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_iterators.h"
#include "counting_predicates.hpp"
+std::mt19937 randomness;
+
template <class InIter1, class InIter2, class OutIter>
void
test()
@@ -61,7 +64,7 @@ test()
int* ic = new int[2*N];
for (unsigned i = 0; i < 2*N; ++i)
ic[i] = i;
- std::random_shuffle(ic, ic+2*N);
+ std::shuffle(ic, ic+2*N, randomness);
std::copy(ic, ic+N, ia);
std::copy(ic+N, ic+2*N, ib);
std::sort(ia, ia+N, std::greater<int>());
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp
index e9cd086ab13d..471b08cc6e1f 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp
@@ -15,10 +15,13 @@
// max_element(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -40,7 +43,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
index e60e156455f3..95c7dee2cdb7 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
@@ -16,11 +16,14 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -42,7 +45,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp
index c41884220857..7cd41eaeae46 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp
@@ -15,10 +15,13 @@
// min_element(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -40,7 +43,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
index c4c6e31eb6dd..402d57dae69e 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
@@ -16,11 +16,14 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -42,7 +45,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
index c2805a656137..acede6ff7b56 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
@@ -15,10 +15,13 @@
// minmax_element(Iter first, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -46,7 +49,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
@@ -66,7 +69,7 @@ test()
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = 5;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
std::pair<Iter, Iter> p = std::minmax_element(Iter(a), Iter(a+N));
assert(base(p.first) == a);
assert(base(p.second) == a+N-1);
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
index 7840638f742c..ff83d7e55d3d 100644
--- a/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
@@ -16,11 +16,14 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test(Iter first, Iter last)
@@ -50,7 +53,7 @@ test(int N)
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = i;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
test(Iter(a), Iter(a+N));
delete [] a;
}
@@ -70,7 +73,7 @@ test()
int* a = new int[N];
for (int i = 0; i < N; ++i)
a[i] = 5;
- std::random_shuffle(a, a+N);
+ std::shuffle(a, a+N, randomness);
typedef std::greater<int> Compare;
Compare comp;
std::pair<Iter, Iter> p = std::minmax_element(Iter(a), Iter(a+N), comp);
diff --git a/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp b/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
index 560bc902b482..b43d88fe0cc6 100644
--- a/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
@@ -16,8 +16,11 @@
// nth_element(Iter first, Iter nth, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void
test_one(int N, int M)
{
@@ -26,7 +29,7 @@ test_one(int N, int M)
int* array = new int[N];
for (int i = 0; i < N; ++i)
array[i] = i;
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::nth_element(array, array+M, array+N);
assert(array[M] == M);
std::nth_element(array, array+N, array+N); // begin, end, end
diff --git a/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
index f2c962724f09..88249ed78d27 100644
--- a/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
@@ -18,6 +18,7 @@
#include <algorithm>
#include <functional>
#include <vector>
+#include <random>
#include <cassert>
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -32,6 +33,8 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
void
test_one(int N, int M)
{
@@ -40,7 +43,7 @@ test_one(int N, int M)
int* array = new int[N];
for (int i = 0; i < N; ++i)
array[i] = i;
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::nth_element(array, array+M, array+N, std::greater<int>());
assert(array[M] == N-M-1);
std::nth_element(array, array+N, array+N, std::greater<int>()); // begin, end, end
diff --git a/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
index 1d4ca9925a86..d0b41cca3ca6 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
@@ -18,10 +18,13 @@
// partial_sort_copy(InIter first, InIter last, RAIter result_first, RAIter result_last);
#include <algorithm>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test_larger_sorts(int N, int M)
@@ -30,7 +33,7 @@ test_larger_sorts(int N, int M)
int* output = new int[M];
for (int i = 0; i < N; ++i)
input[i] = i;
- std::random_shuffle(input, input+N);
+ std::shuffle(input, input+N, randomness);
int* r = std::partial_sort_copy(Iter(input), Iter(input+N), output, output+M);
int* e = output + std::min(N, M);
assert(r == e);
diff --git a/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
index 460ea4c08275..0ac2a86afce6 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
@@ -21,10 +21,13 @@
#include <algorithm>
#include <functional>
+#include <random>
#include <cassert>
#include "test_iterators.h"
+std::mt19937 randomness;
+
template <class Iter>
void
test_larger_sorts(int N, int M)
@@ -33,7 +36,7 @@ test_larger_sorts(int N, int M)
int* output = new int[M];
for (int i = 0; i < N; ++i)
input[i] = i;
- std::random_shuffle(input, input+N);
+ std::shuffle(input, input+N, randomness);
int* r = std::partial_sort_copy(Iter(input), Iter(input+N), output, output+M,
std::greater<int>());
int* e = output + std::min(N, M);
diff --git a/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
index 0d32ba898b8f..05a06a9c3357 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
@@ -16,8 +16,11 @@
// partial_sort(Iter first, Iter middle, Iter last);
#include <algorithm>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
void
test_larger_sorts(int N, int M)
{
@@ -26,7 +29,7 @@ test_larger_sorts(int N, int M)
int* array = new int[N];
for (int i = 0; i < N; ++i)
array[i] = i;
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::partial_sort(array, array+M, array+N);
for (int i = 0; i < M; ++i)
{
diff --git a/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
index a4fe1cc5e7ca..847a5829140a 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
@@ -18,6 +18,7 @@
#include <algorithm>
#include <vector>
#include <functional>
+#include <random>
#include <cassert>
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -32,6 +33,8 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
void
test_larger_sorts(int N, int M)
{
@@ -40,7 +43,7 @@ test_larger_sorts(int N, int M)
int* array = new int[N];
for (int i = 0; i < N; ++i)
array[i] = i;
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::partial_sort(array, array+M, array+N, std::greater<int>());
for (int i = 0; i < M; ++i)
{
diff --git a/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
index 689433f9e45b..6149a574b230 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
@@ -17,8 +17,11 @@
#include <algorithm>
#include <iterator>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
template <class RI>
void
test_sort_helper(RI f, RI l)
@@ -92,7 +95,7 @@ test_larger_sorts(int N, int M)
std::sort(array, array+N);
assert(std::is_sorted(array, array+N));
// test random pattern
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::sort(array, array+N);
assert(std::is_sorted(array, array+N));
// test sorted pattern
diff --git a/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
index 336fcd0b3dde..994d3a8c4a7c 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
@@ -17,8 +17,11 @@
#include <algorithm>
#include <iterator>
+#include <random>
#include <cassert>
+std::mt19937 randomness;
+
template <class RI>
void
test_sort_helper(RI f, RI l)
@@ -92,7 +95,7 @@ test_larger_sorts(int N, int M)
std::stable_sort(array, array+N);
assert(std::is_sorted(array, array+N));
// test random pattern
- std::random_shuffle(array, array+N);
+ std::shuffle(array, array+N, randomness);
std::stable_sort(array, array+N);
assert(std::is_sorted(array, array+N));
// test sorted pattern
diff --git a/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
index 49f7122cdb31..347711bf5e3a 100644
--- a/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
@@ -18,6 +18,7 @@
#include <algorithm>
#include <functional>
#include <vector>
+#include <random>
#include <cassert>
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -32,6 +33,8 @@ struct indirect_less
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+std::mt19937 randomness;
+
struct first_only
{
bool operator()(const std::pair<int, int>& x, const std::pair<int, int>& y)
@@ -59,7 +62,7 @@ void test()
}
for (int i = 0; i < N - M; i += M)
{
- std::random_shuffle(v.begin() + i, v.begin() + i + M);
+ std::shuffle(v.begin() + i, v.begin() + i + M, randomness);
}
std::stable_sort(v.begin(), v.end(), first_only());
assert(std::is_sorted(v.begin(), v.end()));
diff --git a/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp b/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
index 32d34d90d7f8..646c6be7da61 100644
--- a/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
+++ b/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
@@ -13,7 +13,7 @@
// <map>
// Previously this code caused a segfault when compiled at -O2 due to undefined
-// behavior in __tree. See https://llvm.org/bugs/show_bug.cgi?id=28469
+// behavior in __tree. See https://bugs.llvm.org/show_bug.cgi?id=28469
#include <functional>
#include <map>
diff --git a/test/std/containers/associative/map/compare.pass.cpp b/test/std/containers/associative/map/compare.pass.cpp
index 9d1c13d7b8e6..8c429cbd3c4b 100644
--- a/test/std/containers/associative/map/compare.pass.cpp
+++ b/test/std/containers/associative/map/compare.pass.cpp
@@ -13,8 +13,8 @@
// class Allocator = allocator<pair<const Key, T>>>
// class map
-// http://llvm.org/bugs/show_bug.cgi?id=16538
-// http://llvm.org/bugs/show_bug.cgi?id=16549
+// https://bugs.llvm.org/show_bug.cgi?id=16538
+// https://bugs.llvm.org/show_bug.cgi?id=16549
#include <map>
#include <utility>
diff --git a/test/std/containers/associative/map/incomplete_type.pass.cpp b/test/std/containers/associative/map/incomplete_type.pass.cpp
index 84c2451ce087..6acf83129e12 100644
--- a/test/std/containers/associative/map/incomplete_type.pass.cpp
+++ b/test/std/containers/associative/map/incomplete_type.pass.cpp
@@ -9,7 +9,7 @@
// <map>
-// Check that std::map and it's iterators can be instantiated with an incomplete
+// Check that std::map and its iterators can be instantiated with an incomplete
// type.
#include <map>
diff --git a/test/std/containers/associative/map/map.access/index_tuple.pass.cpp b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp
index 9a00829eadd6..f8fc21f1f2f5 100644
--- a/test/std/containers/associative/map/map.access/index_tuple.pass.cpp
+++ b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp
@@ -13,7 +13,7 @@
// mapped_type& operator[](const key_type& k);
-// http://llvm.org/bugs/show_bug.cgi?id=16542
+// https://bugs.llvm.org/show_bug.cgi?id=16542
#include <map>
diff --git a/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
index 817f1207ac94..e06410dcffa2 100644
--- a/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
@@ -37,14 +37,16 @@ struct some_comp
int main()
{
typedef std::pair<const MoveOnly, MoveOnly> V;
+#if defined(_LIBCPP_VERSION)
{
typedef std::map<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
index a0cf689ed909..7f563b7cf635 100644
--- a/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
@@ -43,8 +43,10 @@ int main()
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
index 705fb580487b..923a2124ece4 100644
--- a/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
@@ -92,7 +92,6 @@ int main()
V(3, 2),
};
{
- typedef std::pair<const int, double> V;
typedef min_allocator<V> A;
typedef test_compare<std::less<int> > C;
A a;
@@ -106,7 +105,6 @@ int main()
assert(m.get_allocator() == a);
}
{
- typedef std::pair<const int, double> V;
typedef explicit_allocator<V> A;
typedef test_compare<std::less<int> > C;
A a;
diff --git a/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
index 84f115f1958e..b45e821ad0f9 100644
--- a/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
@@ -45,10 +45,12 @@ int main()
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
index b5301418e85a..84a9609742d3 100644
--- a/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
@@ -34,19 +34,21 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
typedef std::pair<const MoveOnly, MoveOnly> V;
{
typedef std::map<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp b/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
index 84907945a90e..c1aa033845ec 100644
--- a/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
@@ -99,14 +99,16 @@ int main()
typedef std::map<MoveOnly, MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -129,11 +131,12 @@ int main()
typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for comp
typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/associative/multimap/incomplete_type.pass.cpp b/test/std/containers/associative/multimap/incomplete_type.pass.cpp
index c461eb38139d..306f3d9761f1 100644
--- a/test/std/containers/associative/multimap/incomplete_type.pass.cpp
+++ b/test/std/containers/associative/multimap/incomplete_type.pass.cpp
@@ -9,7 +9,7 @@
// <map>
-// Check that std::multimap and it's iterators can be instantiated with an incomplete
+// Check that std::multimap and its iterators can be instantiated with an incomplete
// type.
#include <map>
diff --git a/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
index 6f97a5f3e756..6020334ed26b 100644
--- a/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
@@ -37,14 +37,16 @@ struct some_comp
int main()
{
typedef std::pair<const MoveOnly, MoveOnly> V;
+#if defined(_LIBCPP_VERSION)
{
typedef std::multimap<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
index 669d23db57cd..2486e8f243cf 100644
--- a/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
@@ -43,8 +43,10 @@ int main()
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
index 7637885c81e1..549c1210b6f2 100644
--- a/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
@@ -45,10 +45,12 @@ int main()
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
index e42251527eb3..fdcdffbedb4b 100644
--- a/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
@@ -34,19 +34,21 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
typedef std::pair<const MoveOnly, MoveOnly> V;
{
typedef std::multimap<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp
index df46d376e028..9e67f97f9ac0 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp
@@ -183,7 +183,6 @@ int main()
#endif
#if TEST_STD_VER > 11
{
- typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;
typedef std::pair<M::iterator, M::iterator> R;
diff --git a/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp
index f5295e52d192..474b7b6ac59c 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find.pass.cpp
@@ -147,7 +147,6 @@ int main()
#endif
#if TEST_STD_VER > 11
{
- typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;
typedef M::iterator R;
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp
index 8a650fa55975..28ff332542b4 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp
@@ -155,7 +155,6 @@ int main()
#endif
#if TEST_STD_VER > 11
{
- typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;
typedef M::iterator R;
V ar[] =
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp
index 05760dc0e751..4f4b3884f28e 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp
@@ -155,7 +155,6 @@ int main()
#endif
#if TEST_STD_VER > 11
{
- typedef std::pair<const int, double> V;
typedef std::multimap<int, double, std::less<>> M;
typedef M::iterator R;
V ar[] =
diff --git a/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp b/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
index ecc9c7ef5fd4..8148ea5b27ed 100644
--- a/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
@@ -99,14 +99,16 @@ int main()
typedef std::multimap<MoveOnly, MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -129,10 +131,11 @@ int main()
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for comp
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/associative/multiset/incomplete_type.pass.cpp b/test/std/containers/associative/multiset/incomplete_type.pass.cpp
index 0355e18f9f29..aecd77a18367 100644
--- a/test/std/containers/associative/multiset/incomplete_type.pass.cpp
+++ b/test/std/containers/associative/multiset/incomplete_type.pass.cpp
@@ -9,7 +9,7 @@
// <set>
-// Check that std::multiset and it's iterators can be instantiated with an incomplete
+// Check that std::multiset and its iterators can be instantiated with an incomplete
// type.
#include <set>
diff --git a/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
index 15520e7834ff..3156003232db 100644
--- a/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
@@ -36,14 +36,16 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
index b4b9d067704b..096696fcd94c 100644
--- a/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
index bae97cf4e48a..18d64bc5f2c8 100644
--- a/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
@@ -44,10 +44,12 @@ int main()
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
index 69759e03a28a..eab1787ec881 100644
--- a/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
@@ -34,18 +34,20 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
index 89fabef0a3a0..9693ffb15903 100644
--- a/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
@@ -98,14 +98,16 @@ int main()
typedef std::multiset<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -128,10 +130,11 @@ int main()
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for comp
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/associative/set/incomplete_type.pass.cpp b/test/std/containers/associative/set/incomplete_type.pass.cpp
index d3a1d6638d7e..a200223051c8 100644
--- a/test/std/containers/associative/set/incomplete_type.pass.cpp
+++ b/test/std/containers/associative/set/incomplete_type.pass.cpp
@@ -9,7 +9,7 @@
// <set>
-// Check that std::set and it's iterators can be instantiated with an incomplete
+// Check that std::set and its iterators can be instantiated with an incomplete
// type.
#include <set>
diff --git a/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp b/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
index 6293c24a43d3..d32cc3f48fef 100644
--- a/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
@@ -36,14 +36,16 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::set<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
index 041f599c1f76..c91038e39040 100644
--- a/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp b/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
index ce44b69fe336..c07d4e6f9b88 100644
--- a/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
@@ -44,10 +44,12 @@ int main()
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp b/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
index 9a7538ca31bd..901fdbdb321c 100644
--- a/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
@@ -34,18 +34,20 @@ struct some_comp
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::set<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp b/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
index b3edd31f749b..38b0ab8151aa 100644
--- a/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
@@ -98,14 +98,16 @@ int main()
typedef std::set<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -128,11 +130,12 @@ int main()
typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for comp
typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
index c79feb93eb6c..5dec2b910fb7 100644
--- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
@@ -25,8 +25,10 @@
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::priority_queue<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
index 43045893fe07..781d74016128 100644
--- a/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
@@ -24,8 +24,10 @@
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::queue<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
index c8becb3ca98a..58c8f9ddfad1 100644
--- a/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
@@ -24,8 +24,10 @@
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::queue<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
index 2d1f9437fc45..2e217c545f9c 100644
--- a/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
@@ -24,8 +24,10 @@
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::stack<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
index c34b7e07000e..af6793f465a2 100644
--- a/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
@@ -24,8 +24,10 @@
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::stack<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/array/array.size/size.pass.cpp b/test/std/containers/sequences/array/array.size/size.pass.cpp
index a833fdc04715..2fe5355124ae 100644
--- a/test/std/containers/sequences/array/array.size/size.pass.cpp
+++ b/test/std/containers/sequences/array/array.size/size.pass.cpp
@@ -14,6 +14,8 @@
#include <array>
#include <cassert>
+#include "test_macros.h"
+
// std::array is explicitly allowed to be initialized with A a = { init-list };.
// Disable the missing braces warning for this reason.
#include "disable_missing_braces_warning.h"
@@ -36,7 +38,7 @@ int main()
assert(c.max_size() == 0);
assert(c.empty());
}
-#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER >= 11
{
typedef double T;
typedef std::array<T, 3> C;
diff --git a/test/std/containers/sequences/array/at.pass.cpp b/test/std/containers/sequences/array/at.pass.cpp
index 8e7ff6dff702..efec4e403001 100644
--- a/test/std/containers/sequences/array/at.pass.cpp
+++ b/test/std/containers/sequences/array/at.pass.cpp
@@ -25,7 +25,7 @@
#if TEST_STD_VER > 14
constexpr bool check_idx( size_t idx, double val )
-{
+{
std::array<double, 3> arr = {1, 2, 3.5};
return arr.at(idx) == val;
}
diff --git a/test/std/containers/sequences/array/front_back.pass.cpp b/test/std/containers/sequences/array/front_back.pass.cpp
index 239fda5c99d8..68fc6cdc4543 100644
--- a/test/std/containers/sequences/array/front_back.pass.cpp
+++ b/test/std/containers/sequences/array/front_back.pass.cpp
@@ -25,13 +25,13 @@
#if TEST_STD_VER > 14
constexpr bool check_front( double val )
-{
+{
std::array<double, 3> arr = {1, 2, 3.5};
return arr.front() == val;
}
constexpr bool check_back( double val )
-{
+{
std::array<double, 3> arr = {1, 2, 3.5};
return arr.back() == val;
}
diff --git a/test/std/containers/sequences/array/indexing.pass.cpp b/test/std/containers/sequences/array/indexing.pass.cpp
index 6cb7941d92c5..3a5b9ee9727d 100644
--- a/test/std/containers/sequences/array/indexing.pass.cpp
+++ b/test/std/containers/sequences/array/indexing.pass.cpp
@@ -25,7 +25,7 @@
#if TEST_STD_VER > 14
constexpr bool check_idx( size_t idx, double val )
-{
+{
std::array<double, 3> arr = {1, 2, 3.5};
return arr[idx] == val;
}
diff --git a/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp
index dea6492a515d..fdb751da6aaf 100644
--- a/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// void assign(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::deque<int> d;
d.assign({3, 4, 5, 6});
@@ -28,7 +29,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::deque<int, min_allocator<int>> d;
d.assign({3, 4, 5, 6});
@@ -38,6 +38,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
index 30cca929da11..e79e6eca3d95 100644
--- a/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
@@ -32,14 +32,16 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::deque<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
index 59955157421d..288810089e59 100644
--- a/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp
index dbf27053a9f9..dd70cda1845b 100644
--- a/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::deque<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -27,7 +28,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::deque<int, min_allocator<int>> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -36,6 +36,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp
index 9be3c63a6b31..2619569e154e 100644
--- a/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque(initializer_list<value_type> il, const Allocator& a = allocator_type());
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::deque<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
@@ -29,7 +30,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::deque<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
assert(d.get_allocator() == min_allocator<int>());
@@ -39,6 +39,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/deque/deque.cons/move.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move.pass.cpp
index 68875139da1a..6e935a52bb24 100644
--- a/test/std/containers/sequences/deque/deque.cons/move.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque(deque&&);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -51,7 +52,6 @@ int main()
assert(c1.size() == 0);
assert(c3.get_allocator() == c1.get_allocator());
}
-#if TEST_STD_VER >= 11
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -67,6 +67,4 @@ int main()
assert(c1.size() == 0);
assert(c3.get_allocator() == c1.get_allocator());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
index 4aa0fa6827e7..5a9a77c746fc 100644
--- a/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque(deque&& c, const allocator_type& a);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -66,7 +67,6 @@ int main()
assert(c3.get_allocator() == A(3));
assert(c1.size() != 0);
}
-#if TEST_STD_VER >= 11
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -82,6 +82,4 @@ int main()
assert(c3.get_allocator() == A());
assert(c1.size() == 0);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp
index ed8f1544bc8f..8a65bc2d2e84 100644
--- a/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque& operator=(deque&& c);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -69,7 +70,6 @@ int main()
assert(c1.size() == 0);
assert(c3.get_allocator() == A(5));
}
-#if TEST_STD_VER >= 11
{
int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
int* an = ab + sizeof(ab)/sizeof(ab[0]);
@@ -86,6 +86,4 @@ int main()
assert(c1.size() == 0);
assert(c3.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
index 9b813ce342a3..6ea72246fa05 100644
--- a/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
@@ -42,12 +42,14 @@ int main()
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
{
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
index e0669dc70ca9..fdf67d23a12d 100644
--- a/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
@@ -32,18 +32,20 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::deque<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp
index 597f642db3ce..117e942895ba 100644
--- a/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// deque& operator=(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::deque<int> d;
d = {3, 4, 5, 6};
@@ -28,7 +29,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::deque<int, min_allocator<int>> d;
d = {3, 4, 5, 6};
@@ -38,6 +38,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
index 64b3d811fdc9..de7894234df3 100644
--- a/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
@@ -68,7 +68,6 @@ test3(unsigned n, Allocator const &alloc = Allocator())
{
#if TEST_STD_VER > 11
typedef std::deque<T, Allocator> C;
- typedef typename C::const_iterator const_iterator;
{
C d(n, alloc);
assert(d.size() == n);
diff --git a/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp
index 5f7804023c7f..6d33424fe410 100644
--- a/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// iterator insert(const_iterator p, initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::deque<int> d(10, 1);
std::deque<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
@@ -59,5 +60,4 @@ int main()
assert(d[12] == 1);
assert(d[13] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp b/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp
index b5c881064a95..060d83b5e254 100644
--- a/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// void push_back(value_type&& v);
@@ -19,7 +21,6 @@
#include "MoveOnly.h"
#include "min_allocator.h"
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class C>
C
@@ -57,24 +58,19 @@ void test(int size)
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096};
const int N = sizeof(rng)/sizeof(rng[0]);
for (int j = 0; j < N; ++j)
test<std::deque<MoveOnly> >(rng[j]);
}
-#if TEST_STD_VER >= 11
{
int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096};
const int N = sizeof(rng)/sizeof(rng[0]);
for (int j = 0; j < N; ++j)
test<std::deque<MoveOnly, min_allocator<MoveOnly>> >(rng[j]);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp b/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp
index 8e734a639344..df3d2d099c70 100644
--- a/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <deque>
// void push_front(value_type&& v);
@@ -18,7 +20,6 @@
#include "MoveOnly.h"
#include "min_allocator.h"
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class C>
C
@@ -66,11 +67,9 @@ testN(int start, int N)
test(c1, -10);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049};
const int N = sizeof(rng)/sizeof(rng[0]);
@@ -78,7 +77,6 @@ int main()
for (int j = 0; j < N; ++j)
testN<std::deque<MoveOnly> >(rng[i], rng[j]);
}
-#if TEST_STD_VER >= 11
{
int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049};
const int N = sizeof(rng)/sizeof(rng[0]);
@@ -86,6 +84,4 @@ int main()
for (int j = 0; j < N; ++j)
testN<std::deque<MoveOnly, min_allocator<MoveOnly>> >(rng[i], rng[j]);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
index c0af762fb277..0db30a031282 100644
--- a/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
@@ -59,14 +59,16 @@ int main()
typedef std::deque<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
#if TEST_STD_VER >= 14
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
index d4dda02b8413..69fb6eb4ca4d 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// void assign(initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -42,7 +43,6 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -65,6 +65,4 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
index 935284831d07..61118353dfb2 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list& operator=(forward_list&& x);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef test_allocator<T> A;
@@ -159,7 +160,6 @@ int main()
assert(c1.get_allocator() == A(10));
assert(c0.empty());
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef min_allocator<T> A;
@@ -194,6 +194,4 @@ int main()
assert(c1.get_allocator() == A());
assert(c0.empty());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
index 3d35916ccacb..84f1eb9963fd 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list& operator=(initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -42,7 +43,6 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -65,6 +65,4 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
index 0ec1f80562a8..57f09d7cefeb 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
@@ -32,14 +32,16 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::forward_list<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
index f70119e3c2af..4d295d662da1 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
index ac73d142a67e..7575c0e81242 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -28,7 +29,6 @@ int main()
assert(*i == n);
assert(n == 10);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -38,6 +38,4 @@ int main()
assert(*i == n);
assert(n == 10);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
index 844be20015dd..cf9cbffa7304 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(initializer_list<value_type> il, const allocator_type& a);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef test_allocator<T> A;
@@ -31,7 +32,6 @@ int main()
assert(n == 10);
assert(c.get_allocator() == A(14));
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef min_allocator<T> A;
@@ -43,6 +43,4 @@ int main()
assert(n == 10);
assert(c.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
index a5948b9ef799..92a9e39fc94b 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(forward_list&& x);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef test_allocator<T> A;
@@ -52,7 +53,6 @@ int main()
assert(c0.empty());
assert(c.get_allocator() == A(10));
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef min_allocator<T> A;
@@ -68,6 +68,4 @@ int main()
assert(c0.empty());
assert(c.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp
index 6a1afe1334b0..5f5f5d0aef60 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(forward_list&& x, const allocator_type& a);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef test_allocator<T> A;
@@ -33,7 +34,7 @@ int main()
unsigned n = 0;
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
assert(*i == n);
- assert(n == std::end(t) - std::begin(t));
+ assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
assert(c0.empty());
assert(c.get_allocator() == A(10));
}
@@ -48,11 +49,10 @@ int main()
unsigned n = 0;
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
assert(*i == n);
- assert(n == std::end(t) - std::begin(t));
+ assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
assert(!c0.empty());
assert(c.get_allocator() == A(9));
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef min_allocator<T> A;
@@ -64,10 +64,8 @@ int main()
unsigned n = 0;
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
assert(*i == n);
- assert(n == std::end(t) - std::begin(t));
+ assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
assert(c0.empty());
assert(c.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
index 5f278e31c0de..d4fe2591898a 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
@@ -42,12 +42,14 @@ int main()
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
{
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
index 089f6d6807cb..3390c331e00e 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
@@ -32,18 +32,20 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::forward_list<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp
deleted file mode 100644
index 2d963a1be479..000000000000
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <forward_list>
-
-// explicit forward_list(size_type n);
-
-#include <forward_list>
-#include <cassert>
-
-#include "DefaultOnly.h"
-
-int main()
-{
- {
- typedef DefaultOnly T;
- typedef std::forward_list<T> C;
- unsigned N = 10;
- C c = N;
- unsigned n = 0;
- for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- assert(*i == T());
-#else
- ;
-#endif
- assert(n == N);
- }
-}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp
index b536ccf4910e..061dd6da0785 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp
@@ -36,6 +36,11 @@ void check_allocator(unsigned n, Allocator const &alloc = Allocator())
int main()
{
+ { // test that the ctor is explicit
+ typedef std::forward_list<DefaultOnly> C;
+ static_assert((std::is_constructible<C, size_t>::value), "");
+ static_assert((!std::is_convertible<size_t, C>::value), "");
+ }
{
typedef DefaultOnly T;
typedef std::forward_list<T> C;
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
index dd8ea88c2c1a..8d7c4e9893a2 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// template <class... Args>
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef Emplaceable T;
typedef std::forward_list<T> C;
@@ -52,7 +53,6 @@ int main()
assert(*next(c.begin(), 3) == Emplaceable(2, 3.5));
assert(distance(c.begin(), c.end()) == 4);
}
-#if TEST_STD_VER >= 11
{
typedef Emplaceable T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -84,6 +84,4 @@ int main()
assert(*next(c.begin(), 3) == Emplaceable(2, 3.5));
assert(distance(c.begin(), c.end()) == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
index 15e1a08b08bf..90ee0d2313ff 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// iterator insert_after(const_iterator p, initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -44,7 +45,6 @@ int main()
assert(*next(c.begin(), 3) == 1);
assert(*next(c.begin(), 4) == 2);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -70,6 +70,4 @@ int main()
assert(*next(c.begin(), 3) == 1);
assert(*next(c.begin(), 4) == 2);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
index 2e21cc79d269..173ccaa62d9f 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// iterator insert_after(const_iterator p, value_type&& v);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -52,7 +53,6 @@ int main()
assert(*next(c.begin(), 3) == 2);
assert(distance(c.begin(), c.end()) == 4);
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -85,6 +85,4 @@ int main()
assert(*next(c.begin(), 3) == 2);
assert(distance(c.begin(), c.end()) == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
index d831ceb28918..545b0e68a24b 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
@@ -32,7 +32,7 @@ int main()
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -45,8 +45,6 @@ int main()
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -60,7 +58,6 @@ int main()
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -73,6 +70,5 @@ int main()
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#endif
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
index dfcd2cf90ebc..7fc2b9d76567 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// void push_front(value_type&& v);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -32,7 +33,6 @@ int main()
assert(*next(c.begin()) == 1);
assert(distance(c.begin(), c.end()) == 2);
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -45,6 +45,4 @@ int main()
assert(*next(c.begin()) == 1);
assert(distance(c.begin(), c.end()) == 2);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp
index 65512e317cea..397f209f7226 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp
@@ -15,10 +15,13 @@
#include <iterator>
#include <algorithm>
#include <vector>
+#include <random>
#include <cassert>
#include "min_allocator.h"
+std::mt19937 randomness;
+
template <class C>
void test(int N)
{
@@ -27,7 +30,7 @@ void test(int N)
V v;
for (int i = 0; i < N; ++i)
v.push_back(i);
- std::random_shuffle(v.begin(), v.end());
+ std::shuffle(v.begin(), v.end(), randomness);
C c(v.begin(), v.end());
c.sort();
assert(distance(c.begin(), c.end()) == N);
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp
index 6e5cce39e67d..ab6ae6bd327b 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp
@@ -16,10 +16,13 @@
#include <algorithm>
#include <vector>
#include <functional>
+#include <random>
#include <cassert>
#include "min_allocator.h"
+std::mt19937 randomness;
+
template <class C>
void test(int N)
{
@@ -28,7 +31,7 @@ void test(int N)
V v;
for (int i = 0; i < N; ++i)
v.push_back(i);
- std::random_shuffle(v.begin(), v.end());
+ std::shuffle(v.begin(), v.end(), randomness);
C c(v.begin(), v.end());
c.sort(std::greater<T>());
assert(distance(c.begin(), c.end()) == N);
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
index c63194f7ee64..d93c079e15ed 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
@@ -59,14 +59,16 @@ int main()
typedef std::forward_list<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
#if TEST_STD_VER >= 14
diff --git a/test/std/containers/sequences/list/incomplete_type.pass.cpp b/test/std/containers/sequences/list/incomplete_type.pass.cpp
index adfb4d45fc81..aff8f0367893 100644
--- a/test/std/containers/sequences/list/incomplete_type.pass.cpp
+++ b/test/std/containers/sequences/list/incomplete_type.pass.cpp
@@ -9,7 +9,7 @@
// <list>
-// Check that std::list and it's iterators can be instantiated with an incomplete
+// Check that std::list and its iterators can be instantiated with an incomplete
// type.
#include <list>
diff --git a/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp b/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp
index 9b2c6d68cbe5..4704cf40aafa 100644
--- a/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// void assign(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::list<int> d;
d.assign({3, 4, 5, 6});
@@ -29,7 +30,6 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#if TEST_STD_VER >= 11
{
std::list<int, min_allocator<int>> d;
d.assign({3, 4, 5, 6});
@@ -40,6 +40,4 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp b/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp
index 2f863c6169fc..eec214205178 100644
--- a/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/assign_move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// list& operator=(list&& c);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::list<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
std::list<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
@@ -62,7 +63,6 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#if TEST_STD_VER >= 11
{
std::list<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
std::list<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
@@ -77,6 +77,4 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp b/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
index 6f76d8c56882..7f3114d6e1c4 100644
--- a/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
@@ -32,14 +32,16 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::list<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp b/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
index 66e40a30d1f1..b5ec50637ab8 100644
--- a/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp b/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp
index 40413203bdfc..8f04e7342fc6 100644
--- a/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// list(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::list<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -28,7 +29,6 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#if TEST_STD_VER >= 11
{
std::list<int, min_allocator<int>> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -38,6 +38,4 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp b/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp
index 6040c648e547..3388e00dfb03 100644
--- a/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// list(initializer_list<value_type> il, const Allocator& a = allocator_type());
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::list<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
@@ -30,7 +31,6 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#if TEST_STD_VER >= 11
{
std::list<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
assert(d.get_allocator() == min_allocator<int>());
@@ -41,6 +41,4 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp b/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp
index 9f8a536b33c5..7236f7cc6ac2 100644
--- a/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// list(list&& c, const allocator_type& a);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::list<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
std::list<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
@@ -59,7 +60,6 @@ int main()
assert(!l.empty());
assert(l2.get_allocator() == other_allocator<MoveOnly>(4));
}
-#if TEST_STD_VER >= 11
{
std::list<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
std::list<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
@@ -73,6 +73,4 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == min_allocator<MoveOnly>());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp b/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
index 81f78116af2e..0d3ccfa68c93 100644
--- a/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
@@ -42,12 +42,14 @@ int main()
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
{
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
index b40cb718a3f1..878dab66f0ad 100644
--- a/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
@@ -32,18 +32,20 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::list<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp b/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp
index 1097bdab2198..b638e219d9c8 100644
--- a/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// list& operator=(initializer_list<value_type> il);
@@ -17,7 +19,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::list<int> d;
d = {3, 4, 5, 6};
@@ -28,7 +29,6 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#if TEST_STD_VER >= 11
{
std::list<int, min_allocator<int>> d;
d = {3, 4, 5, 6};
@@ -39,6 +39,4 @@ int main()
assert(*i++ == 5);
assert(*i++ == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/list/list.cons/size_type.pass.cpp b/test/std/containers/sequences/list/list.cons/size_type.pass.cpp
index 95cdeb0c8539..cbe790c0f3bc 100644
--- a/test/std/containers/sequences/list/list.cons/size_type.pass.cpp
+++ b/test/std/containers/sequences/list/list.cons/size_type.pass.cpp
@@ -25,7 +25,6 @@ test3(unsigned n, Allocator const &alloc = Allocator())
{
#if TEST_STD_VER > 11
typedef std::list<T, Allocator> C;
- typedef typename C::const_iterator const_iterator;
{
C d(n, alloc);
assert(d.size() == n);
diff --git a/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp b/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp
index 91845e564b02..2d5231e78209 100644
--- a/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// iterator insert(const_iterator p, initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::list<int> d(10, 1);
std::list<int>::iterator i = d.insert(next(d.cbegin(), 2), {3, 4, 5, 6});
@@ -40,7 +41,6 @@ int main()
assert(*i++ == 1);
assert(*i++ == 1);
}
-#if TEST_STD_VER >= 11
{
std::list<int, min_allocator<int>> d(10, 1);
std::list<int, min_allocator<int>>::iterator i = d.insert(next(d.cbegin(), 2), {3, 4, 5, 6});
@@ -62,6 +62,4 @@ int main()
assert(*i++ == 1);
assert(*i++ == 1);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp b/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp
index 10acede511f4..3d9d00abe52f 100644
--- a/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp
+++ b/test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// void push_back(value_type&& x);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::list<MoveOnly> l1;
l1.push_back(MoveOnly(1));
@@ -30,7 +31,6 @@ int main()
assert(l1.front() == MoveOnly(1));
assert(l1.back() == MoveOnly(2));
}
-#if TEST_STD_VER >= 11
{
std::list<MoveOnly, min_allocator<MoveOnly>> l1;
l1.push_back(MoveOnly(1));
@@ -41,6 +41,4 @@ int main()
assert(l1.front() == MoveOnly(1));
assert(l1.back() == MoveOnly(2));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp b/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp
index 5321ee0faed3..6fef6ade9c79 100644
--- a/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp
+++ b/test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <list>
// void push_front(value_type&& x);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::list<MoveOnly> l1;
l1.push_front(MoveOnly(1));
@@ -30,7 +31,6 @@ int main()
assert(l1.front() == MoveOnly(2));
assert(l1.back() == MoveOnly(1));
}
-#if TEST_STD_VER >= 11
{
std::list<MoveOnly, min_allocator<MoveOnly>> l1;
l1.push_front(MoveOnly(1));
@@ -41,6 +41,4 @@ int main()
assert(l1.front() == MoveOnly(2));
assert(l1.back() == MoveOnly(1));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp b/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
index 512635359c5d..cfe1bfd2f411 100644
--- a/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
@@ -59,14 +59,16 @@ int main()
typedef std::list<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
#if TEST_STD_VER >= 14
diff --git a/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp b/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp
index ac7a2ce38adf..60146a88b3b5 100644
--- a/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// void assign(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<bool> d;
d.assign({true, false, false, true});
@@ -28,7 +29,6 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool>> d;
d.assign({true, false, false, true});
@@ -38,6 +38,4 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector.bool/assign_move.pass.cpp b/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
index f07c1d90059d..13cd65f33123 100644
--- a/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector& operator=(vector&& c);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<bool, test_allocator<bool> > l(test_allocator<bool>(5));
std::vector<bool, test_allocator<bool> > lo(test_allocator<bool>(5));
@@ -61,7 +62,6 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool> > l(min_allocator<bool>{});
std::vector<bool, min_allocator<bool> > lo(min_allocator<bool>{});
@@ -76,6 +76,4 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
index 4f860dabac95..4e71df37421e 100644
--- a/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
@@ -31,14 +31,16 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::vector<bool, test_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::vector<bool, other_allocator<bool>> C;
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
diff --git a/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
index b8ff33c5d2e8..5f1f5d10485d 100644
--- a/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
@@ -41,8 +41,10 @@ int main()
typedef std::vector<bool, other_allocator<bool>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool, some_alloc<bool>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/vector.bool/emplace.pass.cpp b/test/std/containers/sequences/vector.bool/emplace.pass.cpp
index ccdce913c73c..8a1ed033488a 100644
--- a/test/std/containers/sequences/vector.bool/emplace.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/emplace.pass.cpp
@@ -34,7 +34,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
- i = c.emplace(c.cbegin()+1, 1 == 1);
+ i = c.emplace(c.cbegin()+1, true);
assert(i == c.begin()+1);
assert(c.size() == 3);
assert(c.front() == false);
@@ -56,7 +56,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
- i = c.emplace(c.cbegin()+1, 1 == 1);
+ i = c.emplace(c.cbegin()+1, true);
assert(i == c.begin()+1);
assert(c.size() == 3);
assert(c.size() == 3);
diff --git a/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp b/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp
new file mode 100644
index 000000000000..f8a8dbd8d6d4
--- /dev/null
+++ b/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <vector>
+
+// Test that <vector> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <vector>
+
+#include "poisoned_hash_helper.hpp"
+#include "min_allocator.h"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::vector<bool> >();
+ test_hash_enabled_for_type<std::vector<bool, min_allocator<bool>>>();
+ }
+}
diff --git a/test/std/containers/sequences/vector.bool/find.pass.cpp b/test/std/containers/sequences/vector.bool/find.pass.cpp
index ffe844e0079c..d5c3f458c634 100644
--- a/test/std/containers/sequences/vector.bool/find.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/find.pass.cpp
@@ -12,7 +12,7 @@
// std::find with vector<bool>::iterator
-// http://llvm.org/bugs/show_bug.cgi?id=16816
+// https://bugs.llvm.org/show_bug.cgi?id=16816
#include <vector>
#include <algorithm>
diff --git a/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp b/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp
index 07bae0eb7089..a850fa2f1cdd 100644
--- a/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<bool> d = {true, false, false, true};
assert(d.size() == 4);
@@ -27,7 +28,6 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool>> d = {true, false, false, true};
assert(d.size() == 4);
@@ -36,6 +36,4 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp b/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp
index 5f7f5144f841..9a2df4290e77 100644
--- a/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(initializer_list<value_type> il, const Allocator& a = allocator_type());
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<bool, test_allocator<bool>> d({true, false, false, true}, test_allocator<bool>(3));
assert(d.get_allocator() == test_allocator<bool>(3));
@@ -29,7 +30,6 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool>> d({true, false, false, true}, min_allocator<bool>());
assert(d.get_allocator() == min_allocator<bool>());
@@ -39,6 +39,4 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp b/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp
index 3a176d94e860..df4cb199b8fd 100644
--- a/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// iterator insert(const_iterator p, initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<bool> d(10, true);
std::vector<bool>::iterator i = d.insert(d.cbegin() + 2, {false, true, true, false});
@@ -39,7 +40,6 @@ int main()
assert(d[12] == true);
assert(d[13] == true);
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool>> d(10, true);
std::vector<bool, min_allocator<bool>>::iterator i = d.insert(d.cbegin() + 2, {false, true, true, false});
@@ -60,6 +60,4 @@ int main()
assert(d[12] == true);
assert(d[13] == true);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector.bool/move.pass.cpp b/test/std/containers/sequences/vector.bool/move.pass.cpp
index f3a11ec562c0..f189e2b97092 100644
--- a/test/std/containers/sequences/vector.bool/move.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(vector&& c);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<bool, test_allocator<bool> > l(test_allocator<bool>(5));
std::vector<bool, test_allocator<bool> > lo(test_allocator<bool>(5));
@@ -45,7 +46,6 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool> > l(min_allocator<bool>{});
std::vector<bool, min_allocator<bool> > lo(min_allocator<bool>{});
@@ -59,6 +59,4 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp b/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp
index 7aaa7c55550b..b3b6f964966b 100644
--- a/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/move_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(vector&& c, const allocator_type& a);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<bool, test_allocator<bool> > l(test_allocator<bool>(5));
std::vector<bool, test_allocator<bool> > lo(test_allocator<bool>(5));
@@ -58,7 +59,6 @@ int main()
assert(!l.empty());
assert(l2.get_allocator() == other_allocator<bool>(4));
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool> > l(min_allocator<bool>{});
std::vector<bool, min_allocator<bool> > lo(min_allocator<bool>{});
@@ -72,6 +72,4 @@ int main()
assert(l.empty());
assert(l2.get_allocator() == min_allocator<bool>());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
index dd4bf9e01ea9..556b6e656439 100644
--- a/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
@@ -59,31 +59,40 @@ struct some_alloc3
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::vector<bool, test_allocator<bool>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool, other_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
- typedef std::vector<bool, some_alloc<bool>> C;
#if TEST_STD_VER > 14
- LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
+#if defined(_LIBCPP_VERSION)
+ typedef std::vector<bool, some_alloc<bool>> C;
+ static_assert( std::is_nothrow_move_assignable<C>::value, "");
+#endif // _LIBCPP_VERSION
#else
+ typedef std::vector<bool, some_alloc<bool>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
#endif
}
#if TEST_STD_VER > 14
+#if defined(_LIBCPP_VERSION)
{ // POCMA false, is_always_equal true
typedef std::vector<bool, some_alloc2<bool>> C;
- LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
+ static_assert( std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{ // POCMA false, is_always_equal false
typedef std::vector<bool, some_alloc3<bool>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
index 3305d95e1ab8..f104eb32e5f4 100644
--- a/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
@@ -31,24 +31,29 @@ struct some_alloc
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::vector<bool, test_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::vector<bool, other_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
- typedef std::vector<bool, some_alloc<bool>> C;
// In C++17, move constructors for allocators are not allowed to throw
#if TEST_STD_VER > 14
- LIBCPP_STATIC_ASSERT( std::is_nothrow_move_constructible<C>::value, "");
+#if defined(_LIBCPP_VERSION)
+ typedef std::vector<bool, some_alloc<bool>> C;
+ static_assert( std::is_nothrow_move_constructible<C>::value, "");
+#endif // _LIBCPP_VERSION
#else
+ typedef std::vector<bool, some_alloc<bool>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
#endif
}
diff --git a/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp b/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp
index 4b959cf00ad3..61874338d655 100644
--- a/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector& operator=(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<bool> d;
d = {true, false, false, true};
@@ -28,7 +29,6 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#if TEST_STD_VER >= 11
{
std::vector<bool, min_allocator<bool>> d;
d = {true, false, false, true};
@@ -38,6 +38,4 @@ int main()
assert(d[2] == false);
assert(d[3] == true);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp b/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
index 1b68eda2757b..d888af05f92f 100644
--- a/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
@@ -55,32 +55,39 @@ struct some_alloc2
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::vector<bool, test_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::vector<bool, other_allocator<bool>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
- typedef std::vector<bool, some_alloc<bool>> C;
#if TEST_STD_VER >= 14
+#if defined(_LIBCPP_VERSION)
// In c++14, if POCS is set, swapping the allocator is required not to throw
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ typedef std::vector<bool, some_alloc<bool>> C;
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+#endif // _LIBCPP_VERSION
#else
+ typedef std::vector<bool, some_alloc<bool>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
#endif
}
#if TEST_STD_VER >= 14
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<bool, some_alloc2<bool>> C;
// if the allocators are always equal, then the swap can be noexcept
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
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 4f82792fa1fd..64104a40ec74 100644
--- a/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
@@ -31,7 +31,8 @@ int main()
typedef std::hash<T> H;
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;
@@ -43,6 +44,7 @@ int main()
typedef std::hash<T> H;
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/containers/sequences/vector/vector.capacity/resize_size.pass.cpp b/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
index 6409acaf65c1..273bdad9acdb 100644
--- a/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
@@ -13,6 +13,8 @@
#include <vector>
#include <cassert>
+
+#include "test_macros.h"
#include "test_allocator.h"
#include "MoveOnly.h"
#include "min_allocator.h"
@@ -20,9 +22,8 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
- std::vector<MoveOnly> v(100);
+ std::vector<int> v(100);
v.resize(50);
assert(v.size() == 50);
assert(v.capacity() == 100);
@@ -34,7 +35,7 @@ int main()
}
{
// Add 1 for implementations that dynamically allocate a container proxy.
- std::vector<MoveOnly, limited_allocator<MoveOnly, 300 + 1> > v(100);
+ std::vector<int, limited_allocator<int, 300 + 1> > v(100);
v.resize(50);
assert(v.size() == 50);
assert(v.capacity() == 100);
@@ -44,9 +45,9 @@ int main()
assert(v.capacity() >= 200);
assert(is_contiguous_container_asan_correct(v));
}
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
{
- std::vector<int> v(100);
+ std::vector<MoveOnly> v(100);
v.resize(50);
assert(v.size() == 50);
assert(v.capacity() == 100);
@@ -58,7 +59,7 @@ int main()
}
{
// Add 1 for implementations that dynamically allocate a container proxy.
- std::vector<int, limited_allocator<int, 300 + 1> > v(100);
+ std::vector<MoveOnly, limited_allocator<MoveOnly, 300 + 1> > v(100);
v.resize(50);
assert(v.size() == 50);
assert(v.capacity() == 100);
@@ -68,8 +69,6 @@ int main()
assert(v.capacity() >= 200);
assert(is_contiguous_container_asan_correct(v));
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#if TEST_STD_VER >= 11
{
std::vector<MoveOnly, min_allocator<MoveOnly>> v(100);
v.resize(50);
diff --git a/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
index 222fa9c78f92..853f75583ddc 100644
--- a/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// void assign(initializer_list<value_type> il);
@@ -20,7 +22,6 @@
template <typename Vec>
void test ( Vec &v )
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
v.assign({3, 4, 5, 6});
assert(v.size() == 4);
assert(is_contiguous_container_asan_correct(v));
@@ -28,7 +29,6 @@ void test ( Vec &v )
assert(v[1] == 4);
assert(v[2] == 5);
assert(v[3] == 6);
-#endif
}
int main()
@@ -41,8 +41,6 @@ int main()
test(d1);
test(d2);
}
-
-#if TEST_STD_VER >= 11
{
typedef std::vector<int, min_allocator<int>> V;
V d1;
@@ -51,5 +49,4 @@ int main()
test(d1);
test(d2);
}
-#endif
}
diff --git a/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp b/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp
index acbee97bcd1c..c2b6b83784f2 100644
--- a/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector& operator=(vector&& c);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
@@ -76,7 +77,6 @@ int main()
assert(l2.get_allocator() == lo.get_allocator());
assert(is_contiguous_container_asan_correct(l2));
}
-#if TEST_STD_VER >= 11
{
std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
@@ -96,6 +96,4 @@ int main()
assert(l2.get_allocator() == lo.get_allocator());
assert(is_contiguous_container_asan_correct(l2));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp b/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
index 10a381f9c8cc..1720866940ed 100644
--- a/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
index 408bcc3b1499..edbad8c0d95b 100644
--- a/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -28,7 +29,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::vector<int, min_allocator<int>> d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -38,6 +38,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
index f4c3b5c1e8e0..ac5d0178e73a 100644
--- a/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(initializer_list<value_type> il, const Allocator& a = allocator_type());
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
@@ -31,7 +32,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::vector<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
assert(d.get_allocator() == min_allocator<int>());
@@ -42,6 +42,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector/vector.cons/move.pass.cpp b/test/std/containers/sequences/vector/vector.cons/move.pass.cpp
index d51b364f3ba0..cd50d5432349 100644
--- a/test/std/containers/sequences/vector/vector.cons/move.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(vector&& c);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
@@ -68,7 +69,6 @@ int main()
assert(*j == 3);
assert(is_contiguous_container_asan_correct(c2));
}
-#if TEST_STD_VER >= 11
{
std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
@@ -98,6 +98,4 @@ int main()
assert(*j == 3);
assert(is_contiguous_container_asan_correct(c2));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp b/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
index fcdd35ae1157..767a0ce3dce9 100644
--- a/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector(vector&& c, const allocator_type& a);
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
@@ -75,7 +76,6 @@ int main()
assert(l2.get_allocator() == other_allocator<MoveOnly>(4));
assert(is_contiguous_container_asan_correct(l2));
}
-#if TEST_STD_VER >= 11
{
std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
@@ -94,6 +94,4 @@ int main()
assert(l2.get_allocator() == min_allocator<MoveOnly>());
assert(is_contiguous_container_asan_correct(l2));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
index 4e5a20413683..21dd5c384b58 100644
--- a/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// vector& operator=(initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<int> d;
d = {3, 4, 5, 6};
@@ -30,7 +31,6 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#if TEST_STD_VER >= 11
{
std::vector<int, min_allocator<int>> d;
d = {3, 4, 5, 6};
@@ -41,6 +41,4 @@ int main()
assert(d[2] == 5);
assert(d[3] == 6);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
new file mode 100644
index 000000000000..5f053eb8565a
--- /dev/null
+++ b/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <vector>
+
+// void clear();
+
+#include <vector>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "asan_testing.h"
+
+int main()
+{
+ {
+ int a[] = {1, 2, 3};
+ std::vector<int> c(a, a+3);
+ c.clear();
+ assert(c.empty());
+ LIBCPP_ASSERT(c.__invariants());
+ LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+ }
+#if TEST_STD_VER >= 11
+ {
+ int a[] = {1, 2, 3};
+ std::vector<int, min_allocator<int>> c(a, a+3);
+ c.clear();
+ assert(c.empty());
+ LIBCPP_ASSERT(c.__invariants());
+ LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+ }
+#endif
+}
diff --git a/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
index 7e4aed8c1b5e..e5e0277fa37a 100644
--- a/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// template <class... Args> iterator emplace(const_iterator pos, Args&&... args);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<int> v;
v.reserve(3);
@@ -38,7 +39,6 @@ int main()
assert(v[0] == 3);
assert(is_contiguous_container_asan_correct(v));
}
-#if TEST_STD_VER >= 11
{
std::vector<int, min_allocator<int>> v;
v.reserve(3);
@@ -57,6 +57,4 @@ int main()
assert(v[0] == 3);
assert(is_contiguous_container_asan_correct(v));
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
index b0fe123aac48..9072d427cab7 100644
--- a/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// iterator insert(const_iterator p, initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::vector<int> d(10, 1);
std::vector<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
@@ -41,7 +42,6 @@ int main()
assert(d[12] == 1);
assert(d[13] == 1);
}
-#if TEST_STD_VER >= 11
{
std::vector<int, min_allocator<int>> d(10, 1);
std::vector<int, min_allocator<int>>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
@@ -63,6 +63,4 @@ int main()
assert(d[12] == 1);
assert(d[13] == 1);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
index f4a1f5d5f519..ac1fffd9d0d7 100644
--- a/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <vector>
// void push_back(value_type&& x);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<MoveOnly> c;
c.push_back(MoveOnly(0));
@@ -81,7 +82,6 @@ int main()
for (int j = 0; static_cast<std::size_t>(j) < c.size(); ++j)
assert(c[j] == MoveOnly(j));
}
-#if TEST_STD_VER >= 11
{
std::vector<MoveOnly, min_allocator<MoveOnly>> c;
c.push_back(MoveOnly(0));
@@ -110,6 +110,4 @@ int main()
for (int j = 0; static_cast<std::size_t>(j) < c.size(); ++j)
assert(c[j] == MoveOnly(j));
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp b/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp
index 214f9a577571..f92ab8a5c300 100644
--- a/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp
@@ -60,10 +60,12 @@ int main()
typedef std::vector<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::vector<MoveOnly, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
diff --git a/test/std/containers/unord/unord.map/compare.pass.cpp b/test/std/containers/unord/unord.map/compare.pass.cpp
index ea6d02f5fcbc..cffc1dbd42c1 100644
--- a/test/std/containers/unord/unord.map/compare.pass.cpp
+++ b/test/std/containers/unord/unord.map/compare.pass.cpp
@@ -13,8 +13,8 @@
// class Alloc = allocator<pair<const Key, T>>>
// class unordered_map
-// http://llvm.org/bugs/show_bug.cgi?id=16538
-// http://llvm.org/bugs/show_bug.cgi?id=16549
+// https://bugs.llvm.org/show_bug.cgi?id=16538
+// https://bugs.llvm.org/show_bug.cgi?id=16549
#include <unordered_map>
#include <cassert>
diff --git a/test/std/containers/unord/unord.map/incomplete_type.pass.cpp b/test/std/containers/unord/unord.map/incomplete_type.pass.cpp
index d51b1d8d181f..9fc0fd471ef5 100644
--- a/test/std/containers/unord/unord.map/incomplete_type.pass.cpp
+++ b/test/std/containers/unord/unord.map/incomplete_type.pass.cpp
@@ -10,7 +10,7 @@
// <unordered_map>
-// Check that std::unordered_map and it's iterators can be instantiated with an incomplete
+// Check that std::unordered_map and its iterators can be instantiated with an incomplete
// type.
#include <unordered_map>
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
index 939e0bcd4e69..7ef7f47ff865 100644
--- a/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
@@ -42,19 +42,23 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_map<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
index 4fb10afd4e59..0fe98abe774d 100644
--- a/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
@@ -35,6 +35,8 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
~some_hash() noexcept(false);
+
+ std::size_t operator()(T const&) const;
};
int main()
@@ -53,13 +55,15 @@ int main()
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
index c0dc71da45d8..4191102a85ab 100644
--- a/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
@@ -41,6 +41,8 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
some_hash& operator=(const some_hash&);
+
+ std::size_t operator()(T const&) const;
};
int main()
@@ -54,11 +56,13 @@ int main()
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
index c40173ede750..2eb8c946720f 100644
--- a/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
@@ -38,24 +38,28 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_map<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp b/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
index f2c694e86f74..400e0283fef2 100644
--- a/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
@@ -17,7 +17,7 @@
// mapped_type& operator[](const key_type& k);
-// http://llvm.org/bugs/show_bug.cgi?id=16542
+// https://bugs.llvm.org/show_bug.cgi?id=16542
#include <unordered_map>
#include <tuple>
diff --git a/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp b/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
index fc286ceec8eb..75807fa78889 100644
--- a/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
@@ -64,6 +64,7 @@ struct some_hash
typedef T value_type;
some_hash() {}
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
template <class T>
@@ -72,6 +73,7 @@ struct some_hash2
typedef T value_type;
some_hash2() {}
some_hash2(const some_hash2&);
+ std::size_t operator()(T const&) const;
};
#if TEST_STD_VER >= 14
@@ -125,16 +127,18 @@ int main()
typedef std::unordered_map<MoveOnly, MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MapType>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MapType>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -178,10 +182,11 @@ int main()
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MapType>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MapType>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp b/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
index 4eea3d0f6fb5..5cb60f6a6d91 100644
--- a/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
@@ -25,14 +25,11 @@ int main()
{
{
typedef std::unordered_multimap<int, std::string> C;
- typedef C::const_iterator I;
- typedef std::pair<int, std::string> P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multimap<int, std::string> C;
- typedef C::const_iterator I;
typedef std::pair<int, std::string> P;
P a[] =
{
diff --git a/test/std/containers/unord/unord.multimap/incomplete.pass.cpp b/test/std/containers/unord/unord.multimap/incomplete.pass.cpp
index 7822224e7366..67bff9419757 100644
--- a/test/std/containers/unord/unord.multimap/incomplete.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/incomplete.pass.cpp
@@ -10,7 +10,7 @@
// <unordered_map>
-// Check that std::unordered_multimap and it's iterators can be instantiated with an incomplete
+// Check that std::unordered_multimap and its iterators can be instantiated with an incomplete
// type.
#include <unordered_map>
diff --git a/test/std/containers/unord/unord.multimap/load_factor.pass.cpp b/test/std/containers/unord/unord.multimap/load_factor.pass.cpp
index 9c42435946ff..ff3bc0105bd3 100644
--- a/test/std/containers/unord/unord.multimap/load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/load_factor.pass.cpp
@@ -44,7 +44,6 @@ int main()
}
{
typedef std::unordered_multimap<int, std::string> C;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.load_factor() == 0);
}
@@ -70,7 +69,6 @@ int main()
{
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
min_allocator<std::pair<const int, std::string>>> C;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.load_factor() == 0);
}
diff --git a/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp b/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp
index a2ab399d3469..3e9a10ab798a 100644
--- a/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp
@@ -25,8 +25,6 @@ int main()
{
{
typedef std::unordered_multimap<int, std::string> C;
- typedef C::const_iterator I;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.max_bucket_count() > 0);
}
@@ -34,8 +32,6 @@ int main()
{
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
min_allocator<std::pair<const int, std::string>>> C;
- typedef C::const_iterator I;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.max_bucket_count() > 0);
}
diff --git a/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp b/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
index b0b2b664f098..38c8285f5236 100644
--- a/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
@@ -30,13 +30,11 @@ int main()
{
{
typedef std::unordered_multimap<int, std::string> C;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multimap<int, std::string> C;
- typedef std::pair<int, std::string> P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
@@ -46,14 +44,12 @@ int main()
{
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
min_allocator<std::pair<const int, std::string>>> C;
- typedef std::pair<int, std::string> P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
min_allocator<std::pair<const int, std::string>>> C;
- typedef std::pair<int, std::string> P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
diff --git a/test/std/containers/unord/unord.multimap/swap_member.pass.cpp b/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
index 0f898f1b73e0..8c5ddab054e5 100644
--- a/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
@@ -34,7 +34,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -219,7 +218,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -404,7 +402,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
index e404612a754e..d924ef15c1a3 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
@@ -42,19 +42,22 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
index b5f4403174b8..2fbe7a674273 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
@@ -35,6 +35,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
~some_hash() noexcept(false);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -53,13 +54,15 @@ int main()
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
index b621449f2b74..2d5766946a6f 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
@@ -41,6 +41,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
some_hash& operator=(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -54,11 +55,13 @@ int main()
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
index 94067c3161e2..7f3a337bddc4 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
@@ -38,24 +38,27 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
index 7a58709c9fc9..33d8e3c36361 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
@@ -64,6 +64,7 @@ struct some_hash
typedef T value_type;
some_hash() {}
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
template <class T>
@@ -72,6 +73,7 @@ struct some_hash2
typedef T value_type;
some_hash2() {}
some_hash2(const some_hash2&);
+ std::size_t operator()(T const&) const;
};
#if TEST_STD_VER >= 14
@@ -124,16 +126,18 @@ int main()
typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<V>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -177,9 +181,11 @@ int main()
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<V>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<V>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
index 06e6c65c991d..644af867dad4 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
@@ -33,7 +33,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -218,7 +217,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -403,7 +401,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
- typedef std::pair<int, std::string> P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp b/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
index ec4d0e675501..c60a811678fb 100644
--- a/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
@@ -25,14 +25,11 @@ int main()
{
{
typedef std::unordered_multiset<int> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
@@ -52,15 +49,12 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
diff --git a/test/std/containers/unord/unord.multiset/incomplete.pass.cpp b/test/std/containers/unord/unord.multiset/incomplete.pass.cpp
index f6d8dc17c5a2..1b3c1492c4a4 100644
--- a/test/std/containers/unord/unord.multiset/incomplete.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/incomplete.pass.cpp
@@ -11,7 +11,7 @@
// <unordered_set>
-// Check that std::unordered_multiset and it's iterators can be instantiated with an incomplete
+// Check that std::unordered_multiset and its iterators can be instantiated with an incomplete
// type.
#include <unordered_set>
diff --git a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
index fad1c182e6b7..df2cb7beff39 100644
--- a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
@@ -43,7 +43,6 @@ int main()
}
{
typedef std::unordered_multiset<int> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
@@ -69,7 +68,6 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
diff --git a/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp b/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
index 00fe962327f8..f7ebaaf65d47 100644
--- a/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
@@ -29,13 +29,11 @@ int main()
{
{
typedef std::unordered_multiset<int> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multiset<int> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
@@ -45,14 +43,12 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
diff --git a/test/std/containers/unord/unord.multiset/swap_member.pass.cpp b/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
index c0c9e9021712..9ffe3ad480be 100644
--- a/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
index fba024aed00e..3b69c1eed2e3 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
@@ -42,19 +42,22 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
index 62fe51e29903..1e927b9b3958 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
@@ -35,6 +35,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
~some_hash() noexcept(false);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -53,13 +54,15 @@ int main()
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
index ac0a10a4b0ea..7336bb5afa7c 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
@@ -41,6 +41,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
some_hash& operator=(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -54,11 +55,13 @@ int main()
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
index e44be18fa3b4..fcf2a5af3129 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
@@ -38,24 +38,27 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
index c221b6f2edb0..4afef42e6a60 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
@@ -125,16 +125,18 @@ int main()
typedef std::unordered_multiset<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -178,10 +180,11 @@ int main()
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
index d4efb6868026..ce290ff1c1e7 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.set/bucket_count.pass.cpp b/test/std/containers/unord/unord.set/bucket_count.pass.cpp
index 6f1f526abaf6..227d9e123331 100644
--- a/test/std/containers/unord/unord.set/bucket_count.pass.cpp
+++ b/test/std/containers/unord/unord.set/bucket_count.pass.cpp
@@ -25,14 +25,11 @@ int main()
{
{
typedef std::unordered_set<int> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_set<int> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
@@ -51,14 +48,11 @@ int main()
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
diff --git a/test/std/containers/unord/unord.set/incomplete.pass.cpp b/test/std/containers/unord/unord.set/incomplete.pass.cpp
index c970c1de5531..4f7a00c999e8 100644
--- a/test/std/containers/unord/unord.set/incomplete.pass.cpp
+++ b/test/std/containers/unord/unord.set/incomplete.pass.cpp
@@ -11,7 +11,7 @@
// <unordered_set>
-// Check that std::unordered_set and it's iterators can be instantiated with an incomplete
+// Check that std::unordered_set and its iterators can be instantiated with an incomplete
// type.
#include <unordered_set>
diff --git a/test/std/containers/unord/unord.set/load_factor.pass.cpp b/test/std/containers/unord/unord.set/load_factor.pass.cpp
index a342d472a3d5..94eb5d1bd04b 100644
--- a/test/std/containers/unord/unord.set/load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.set/load_factor.pass.cpp
@@ -43,7 +43,6 @@ int main()
}
{
typedef std::unordered_set<int> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
@@ -69,7 +68,6 @@ int main()
{
typedef std::unordered_set<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
diff --git a/test/std/containers/unord/unord.set/max_load_factor.pass.cpp b/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
index 542788cca967..e9e04bca8562 100644
--- a/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
@@ -29,13 +29,11 @@ int main()
{
{
typedef std::unordered_set<int> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_set<int> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
@@ -45,14 +43,12 @@ int main()
{
typedef std::unordered_set<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_set<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
diff --git a/test/std/containers/unord/unord.set/swap_member.pass.cpp b/test/std/containers/unord/unord.set/swap_member.pass.cpp
index ea88c53a526c..597662112cef 100644
--- a/test/std/containers/unord/unord.set/swap_member.pass.cpp
+++ b/test/std/containers/unord/unord.set/swap_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
index 3dcc3247902e..b8d06dbfdd16 100644
--- a/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
@@ -42,19 +42,22 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_set<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
index 82e184b8d3ea..4c10ed2d6290 100644
--- a/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
@@ -35,6 +35,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
~some_hash() noexcept(false);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -53,13 +54,15 @@ int main()
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
index b89d68002477..670a3484d15f 100644
--- a/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
@@ -41,6 +41,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
some_hash& operator=(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -54,11 +55,13 @@ int main()
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
index 7190a01208f0..43e06bd50463 100644
--- a/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
@@ -38,24 +38,27 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_set<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp b/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
index 4a16ddd3f4ce..7187f94a28dc 100644
--- a/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
@@ -125,16 +125,18 @@ int main()
typedef std::unordered_set<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -178,10 +180,11 @@ int main()
typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp b/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
index c2bd75960d5b..9ca2f80f0561 100644
--- a/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
index 2c6acb5af12c..a5d52a6ef778 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
@@ -13,6 +13,8 @@
// auto_ptr& operator=(auto_ptr& a) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
index aeea7dec9e34..cce3c79ef5ba 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
@@ -13,6 +13,8 @@
// auto_ptr(auto_ptr& a) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
index 6809073c2d0c..b83c266fb9b2 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
@@ -13,6 +13,8 @@
// template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
index 27ba0e513e45..10a432647199 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
@@ -13,6 +13,8 @@
// auto_ptr(auto_ptr& a) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
index e29ff2e78244..3dfd200fafa9 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
@@ -13,6 +13,8 @@
// explicit auto_ptr(X* p =0) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
index 6f53581af422..91801efac64a 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
@@ -13,6 +13,8 @@
// auto_ptr& operator=(auto_ptr_ref<X> r) throw()
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
index 375780527cf0..e08df64377d5 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
@@ -13,6 +13,8 @@
// auto_ptr(auto_ptr_ref<X> r) throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
index 00c0f6d30caf..572e5e686d49 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
@@ -13,6 +13,8 @@
// template<class Y> operator auto_ptr<Y>() throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
index a5db81e6c632..cd9fed2fb10e 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
@@ -13,6 +13,8 @@
// template<class Y> operator auto_ptr_ref<Y>() throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
index fce9332df846..305cf025ce45 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
@@ -13,6 +13,8 @@
// X& operator*() const throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
index dd5669563e35..7174b27fb862 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
@@ -13,6 +13,8 @@
// X& operator*() const throw();
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <cassert>
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
index 5860eb411143..650da2ef8196 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
@@ -16,6 +16,8 @@
#include <memory>
#include <cassert>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include "../A.h"
void
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
index cdbdd73ab72d..55772b68808d 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
@@ -16,6 +16,8 @@
#include <memory>
#include <cassert>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include "../A.h"
void
diff --git a/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
index 256563439a17..1895828aff64 100644
--- a/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
+++ b/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
@@ -17,6 +17,8 @@
// ...
// };
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
#include <memory>
#include <type_traits>
diff --git a/test/std/depr/depr.c.headers/stdio_h.pass.cpp b/test/std/depr/depr.c.headers/stdio_h.pass.cpp
index 85f9d2986284..36c37a3beb3e 100644
--- a/test/std/depr/depr.c.headers/stdio_h.pass.cpp
+++ b/test/std/depr/depr.c.headers/stdio_h.pass.cpp
@@ -99,7 +99,7 @@
#include <cstdarg>
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-Wformat-zero-length"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for tmpnam
#endif
@@ -107,7 +107,7 @@
int main()
{
FILE* fp = 0;
- fpos_t fpos = {};
+ fpos_t fpos = fpos_t();
size_t s = 0;
char* cp = 0;
char arr[] = {'a', 'b'};
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp
new file mode 100644
index 000000000000..fc37c9a59797
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+// pointer_to_binary_function
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+double binary_f(int i, short j) {return i - j + .75;}
+
+int main()
+{
+ typedef std::pointer_to_binary_function<int, short, double> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
index 41c99998caeb..e47731a65133 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// pointer_to_binary_function
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp
new file mode 100644
index 000000000000..687a819a392d
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+// pointer_to_unary_function
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+double unary_f(int i) {return 0.5 - i;}
+
+int main()
+{
+ typedef std::pointer_to_unary_function<int, double> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
index 126cf32af436..2d713b3beed2 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// pointer_to_unary_function
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..2d232193607b
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <CopyConstructible Arg, Returnable Result>
+// pointer_to_unary_function<Arg, Result>
+// ptr_fun(Result (*f)(Arg));
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+double unary_f(int i) {return 0.5 - i;}
+
+int main()
+{
+ assert(std::ptr_fun(unary_f)(36) == -35.5);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
index c7ce90df3eb7..65f2a8d34253 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <CopyConstructible Arg, Returnable Result>
// pointer_to_unary_function<Arg, Result>
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp
index ed94c1a1e470..202abe25e008 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.fail.cpp
@@ -7,22 +7,22 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// <functional>
-// unique_ptr
+// template <CopyConstructible Arg1, CopyConstructible Arg2, Returnable Result>
+// pointer_to_binary_function<Arg1,Arg2,Result>
+// ptr_fun(Result (*f)(Arg1, Arg2));
+// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Test unique_ptr move assignment
-
-#include <memory>
+#include <functional>
+#include <type_traits>
+#include <cassert>
#include "test_macros.h"
+double binary_f(int i, short j) {return i - j + .75;}
+
int main()
{
- std::unique_ptr<int> s, s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{cannot be assigned because its copy assignment operator is implicitly deleted}}
-#else
- s2 = s; // expected-error {{'operator=' is a private member of 'std::__1::unique_ptr}}
-#endif
+ assert(std::ptr_fun(binary_f)(36, 27) == 9.75);
}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
index 17c4b611a319..5628c026c95a 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <CopyConstructible Arg1, CopyConstructible Arg2, Returnable Result>
// pointer_to_binary_function<Arg1,Arg2,Result>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.cpp
new file mode 100644
index 000000000000..1c56aa9f5dc5
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<cReturnable S, ClassType T>
+// const_mem_fun_t<S,T>
+// mem_fun(S (T::*f)() const);
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ const A a = A();
+ assert(std::mem_fun(&A::a3)(&a) == 1);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
index 455eed9b3e3c..4693c816c338 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<cReturnable S, ClassType T>
// const_mem_fun_t<S,T>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..c727e955b1d5
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+// const_mem_fun1_t<S,T,A>
+// mem_fun(S (T::*f)(A) const);
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ const A a = A();
+ assert(std::mem_fun(&A::a4)(&a, 6) == 5);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
index 46fd6d28d514..9f0b605d9a91 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T, CopyConstructible A>
// const_mem_fun1_t<S,T,A>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..39b3112da94c
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun1_ref_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::const_mem_fun1_ref_t<double, A, unsigned> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
index 0c4bb93ff524..65fc8c07eb2c 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// const_mem_fun1_ref_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..f07a3b798e72
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun1_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::const_mem_fun1_t<double, A, unsigned> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
index ca670bcde109..71588fa1f9d3 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// const_mem_fun1_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.cpp
new file mode 100644
index 000000000000..fea1441b31f1
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+// const_mem_fun_ref_t<S,T>
+// mem_fun_ref(S (T::*f)() const);
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ const A a = A();
+ assert(std::mem_fun_ref(&A::a3)(a) == 1);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
index 74d8950dea7f..22f44c65cd6a 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T>
// const_mem_fun_ref_t<S,T>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..f993b7ce1949
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+// const_mem_fun1_ref_t<S,T,A>
+// mem_fun_ref(S (T::*f)(A) const);
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ const A a = A();
+ assert(std::mem_fun_ref(&A::a4)(a, 6) == 5);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
index b858561ae757..267b80681eaf 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T, CopyConstructible A>
// const_mem_fun1_ref_t<S,T,A>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..e195213f9c02
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun_ref_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::const_mem_fun_ref_t<int, A> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
index 9eec24e5743c..6f80993cbcdf 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// const_mem_fun_ref_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..228eb3da60a6
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::const_mem_fun_t<int, A> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
index 9681b74d7e61..01945fc46f9f 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// const_mem_fun_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.cpp
new file mode 100644
index 000000000000..8f59a1ae2f82
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+// mem_fun_t<S,T>
+// mem_fun(S (T::*f)());
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ A a;
+ assert(std::mem_fun(&A::a1)(&a) == 5);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
index d0d286009ada..f3c12973fc8b 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T>
// mem_fun_t<S,T>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..6191de3fbe63
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+// mem_fun1_t<S,T,A>
+// mem_fun(S (T::*f)(A));
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ A a;
+ assert(std::mem_fun(&A::a2)(&a, 5) == 6);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
index acee9afeec7a..30f3c9422d2b 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T, CopyConstructible A>
// mem_fun1_t<S,T,A>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..0effd33f3784
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun1_ref_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::mem_fun1_ref_t<short, A, int> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
index a78cbf25c191..0b63bb76ddb7 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// mem_fun1_ref_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..aa8e25abe438
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun1_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::mem_fun1_t<short, A, int> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
index 90ba9bbf788d..79895c4b4d89 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// mem_fun1_t
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.cpp
new file mode 100644
index 000000000000..ff7f28af8e30
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+// mem_fun_ref_t<S,T>
+// mem_fun_ref(S (T::*f)());
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ A a;
+ assert(std::mem_fun_ref(&A::a1)(a) == 5);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
index d3843fc5344c..8a6a8b943e4b 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T>
// mem_fun_ref_t<S,T>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..82d47fefd3d4
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.fail.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+// mem_fun1_ref_t<S,T,A>
+// mem_fun_ref(S (T::*f)(A));
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ A a;
+ assert(std::mem_fun_ref(&A::a2)(a, 5) == 6);
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
index 39a324d10bc4..142b16a6b3e4 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<Returnable S, ClassType T, CopyConstructible A>
// mem_fun1_ref_t<S,T,A>
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp
new file mode 100644
index 000000000000..f1cf01c5c424
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.fail.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun_ref_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A
+{
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+ typedef std::mem_fun_ref_t<char, A> F;
+}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
index 236d8d0945fb..5af028b39928 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// mem_fun_ref_t
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp
index 6e13873c2fb3..e6a1ed330762 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.fail.cpp
@@ -7,33 +7,27 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// <functional>
-// unique_ptr
+// mem_fun_t
+// Removed in c++1z
+// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Test unique_ptr move assignment
-
-#include <memory>
-#include <utility>
+#include <functional>
+#include <type_traits>
#include <cassert>
-// Can't copy from const lvalue
+#include "test_macros.h"
struct A
{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
+ char a1() {return 5;}
+ short a2(int i) {return short(i+1);}
+ int a3() const {return 1;}
+ double a4(unsigned i) const {return i-1;}
};
-int A::count = 0;
-
int main()
{
- {
- const std::unique_ptr<A[]> s(new A[3]);
- std::unique_ptr<A[]> s2;
- s2 = s;
- }
+ typedef std::mem_fun_t<char, A> F;
}
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
index 3fc84cd05c63..c33e2f7d753f 100644
--- a/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// mem_fun_t
diff --git a/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp b/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
index b6b75263c602..796e4ad878be 100644
--- a/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
+++ b/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <class Fn, class T>
// binder1st<Fn>
diff --git a/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp b/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
index b7feb243b839..cbf1dbf9fbd9 100644
--- a/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
+++ b/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <class Fn, class T>
// binder2nd<Fn>
diff --git a/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp b/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
index 8b7aaf0fdae1..480148b7658e 100644
--- a/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
+++ b/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <class Fn>
// class binder1st
diff --git a/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp b/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
index 645c1688c18a..3dfb1f02d2a2 100644
--- a/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
+++ b/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template <class Fn>
// class binder2nd
diff --git a/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp b/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
index 02f9a81aa6dd..5c596da5a0bc 100644
--- a/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
+++ b/test/std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
// test get_unexpected
#include <exception>
diff --git a/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp b/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
index ed02fa618e8e..9b9d726f7f3c 100644
--- a/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
+++ b/test/std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
// test set_unexpected
#include <exception>
diff --git a/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp b/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp
index 5879529317ef..f6bc5bc5a68c 100644
--- a/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp
+++ b/test/std/depr/exception.unexpected/unexpected.handler/unexpected_handler.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
// test unexpected_handler
#include <exception>
diff --git a/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp b/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp
index 03b484f7631a..92d4d38e272b 100644
--- a/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp
+++ b/test/std/depr/exception.unexpected/unexpected/unexpected.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: c++98 || c++03 || c++11 || c++14
+
// test unexpected
#include <exception>
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.fail.cpp b/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp
index af7f27f73fc5..8a9a1a232d0d 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.fail.cpp
+++ b/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.observers/bool.fail.cpp
@@ -7,23 +7,24 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// XFAIL: c++98, c++03
-// unique_ptr
+// <system_error>
-// Test unique_ptr<T[]>(pointer) ctor
+// class error_code
-#include <memory>
+// explicit operator bool() const;
-// unique_ptr<T[]>(pointer) ctor should require non-reference Deleter ctor
-class Deleter
-{
-public:
+#include <system_error>
- void operator()(void*) {}
-};
+bool test_func(void)
+{
+ const std::error_code ec(0, std::generic_category());
+ return ec; // conversion to bool is explicit; should fail.
+}
int main()
{
- std::unique_ptr<int[], Deleter&> p(new int);
+ return 0;
}
+
diff --git a/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp b/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp
new file mode 100644
index 000000000000..f1b460575917
--- /dev/null
+++ b/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <system_error>
+
+// Test that <system_error> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <system_error>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::error_code>();
+ test_hash_enabled_for_type<std::error_condition>();
+ }
+}
diff --git a/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp b/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
index 4091f446af27..dac13bdb83c8 100644
--- a/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
+++ b/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
@@ -29,6 +29,7 @@ test(int i)
typedef std::hash<T> H;
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()));
H h;
T ec(i, std::system_category());
const std::size_t result = h(ec);
diff --git a/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp b/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
index d455210c2697..eef37c68b6f0 100644
--- a/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
+++ b/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
@@ -29,6 +29,7 @@ test(int i)
typedef std::hash<T> H;
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()));
H h;
T ec(i, std::system_category());
const std::size_t result = h(ec);
diff --git a/test/std/experimental/algorithms/alg.random.sample/sample.pass.cpp b/test/std/experimental/algorithms/alg.random.sample/sample.pass.cpp
index 531731791c5d..23098d83e4ea 100644
--- a/test/std/experimental/algorithms/alg.random.sample/sample.pass.cpp
+++ b/test/std/experimental/algorithms/alg.random.sample/sample.pass.cpp
@@ -58,19 +58,23 @@ void test() {
const unsigned os = Expectations::os;
SampleItem oa[os];
const int *oa1 = Expectations::oa1;
+ ((void)oa1); // Prevent unused warning
const int *oa2 = Expectations::oa2;
+ ((void)oa2); // Prevent unused warning
std::minstd_rand g;
SampleIterator end;
end = std::experimental::sample(PopulationIterator(ia),
PopulationIterator(ia + is),
SampleIterator(oa), os, g);
- assert(end.base() - oa == std::min(os, is));
- assert(std::equal(oa, oa + os, oa1));
+ assert(static_cast<std::size_t>(end.base() - oa) == std::min(os, is));
+ // sample() is deterministic but non-reproducible;
+ // its results can vary between implementations.
+ LIBCPP_ASSERT(std::equal(oa, oa + os, oa1));
end = std::experimental::sample(PopulationIterator(ia),
PopulationIterator(ia + is),
SampleIterator(oa), os, std::move(g));
- assert(end.base() - oa == std::min(os, is));
- assert(std::equal(oa, oa + os, oa2));
+ assert(static_cast<std::size_t>(end.base() - oa) == std::min(os, is));
+ LIBCPP_ASSERT(std::equal(oa, oa + os, oa2));
}
template <template<class...> class PopulationIteratorType, class PopulationItem,
@@ -119,7 +123,7 @@ void test_small_population() {
end = std::experimental::sample(PopulationIterator(ia),
PopulationIterator(ia + is),
SampleIterator(oa), os, g);
- assert(end.base() - oa == std::min(os, is));
+ assert(static_cast<std::size_t>(end.base() - oa) == std::min(os, is));
assert(std::equal(oa, end.base(), oa1));
}
diff --git a/test/std/experimental/filesystem/class.file_status/file_status.cons.pass.cpp b/test/std/experimental/filesystem/class.file_status/file_status.cons.pass.cpp
index 585b0bb1dd5e..a744e659f5b5 100644
--- a/test/std/experimental/filesystem/class.file_status/file_status.cons.pass.cpp
+++ b/test/std/experimental/filesystem/class.file_status/file_status.cons.pass.cpp
@@ -30,8 +30,8 @@ int main() {
{
static_assert(std::is_nothrow_default_constructible<file_status>::value,
"The default constructor must be noexcept");
- static_assert(!test_convertible<file_status>(),
- "The default constructor must be explicit");
+ static_assert(test_convertible<file_status>(),
+ "The default constructor must not be explicit");
const file_status f;
assert(f.type() == file_type::none);
assert(f.permissions() == perms::unknown);
diff --git a/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp b/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp
index f344e1153071..a6172d1981cf 100644
--- a/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp
+++ b/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp
@@ -131,7 +131,7 @@ void doAppendSourceAllocTest(AppendOperatorTestcase const& TC)
assert(LHS == E);
}
// input iterator - For non-native char types, appends needs to copy the
- // iterator range into a contigious block of memory before it can perform the
+ // iterator range into a contiguous block of memory before it can perform the
// code_cvt conversions.
// For "char" no allocations will be performed because no conversion is
// required.
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp b/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
index a4bd2cba1cef..c5da52f65248 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp
+++ b/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
@@ -7,29 +7,26 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// UNSUPPORTED: c++98, c++03
-// unique_ptr
+// <experimental/filesystem>
-// Test unique_ptr converting move ctor
+// class path
-// Do not convert from an array unique_ptr
+// path& operator=(path const&);
-#include <memory>
-#include <utility>
+#include <experimental/filesystem>
+#include <type_traits>
#include <cassert>
-struct A
-{
-};
+#include "test_macros.h"
+#include "count_new.hpp"
-struct Deleter
-{
- void operator()(void*) {}
-};
+namespace fs = std::experimental::filesystem;
-int main()
-{
- std::unique_ptr<A[], Deleter> s;
- std::unique_ptr<A, Deleter> s2(std::move(s));
+int main() {
+ using namespace fs;
+ path p("abc");
+ p = {};
+ assert(p.native() == "");
}
diff --git a/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp b/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
index 9e48cbf1e7f2..8c31ef51d944 100644
--- a/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
+++ b/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
@@ -15,6 +15,7 @@
// template <class Source>
// path& operator=(Source const&);
+// path& operator=(string_type&&);
// template <class Source>
// path& assign(Source const&);
// template <class InputIterator>
@@ -49,7 +50,7 @@ void RunTestCase(MultiStringType const& MS) {
const std::basic_string<CharT> S(TestPath);
path p; PathReserve(p, S.length() + 1);
{
- // string provides a contigious iterator. No allocation needed.
+ // string provides a contiguous iterator. No allocation needed.
DisableAllocationGuard g;
path& pref = (p = S);
assert(&pref == &p);
@@ -75,7 +76,7 @@ void RunTestCase(MultiStringType const& MS) {
const std::basic_string_view<CharT> S(TestPath);
path p; PathReserve(p, S.length() + 1);
{
- // string provides a contigious iterator. No allocation needed.
+ // string provides a contiguous iterator. No allocation needed.
DisableAllocationGuard g;
path& pref = (p = S);
assert(&pref == &p);
@@ -101,7 +102,7 @@ void RunTestCase(MultiStringType const& MS) {
{
path p; PathReserve(p, Size + 1);
{
- // char* pointers are contigious and can be used with code_cvt directly.
+ // char* pointers are contiguous and can be used with code_cvt directly.
// no allocations needed.
DisableAllocationGuard g;
path& pref = (p = TestPath);
@@ -213,12 +214,29 @@ void test_sfinae() {
}
}
+void RunStringMoveTest(const char* Expect) {
+ using namespace fs;
+ std::string ss(Expect);
+ path p;
+ {
+ DisableAllocationGuard g; ((void)g);
+ path& pr = (p = std::move(ss));
+ assert(&pr == &p);
+ }
+ assert(p == Expect);
+ {
+ // Signature test
+ ASSERT_NOEXCEPT(p = std::move(ss));
+ }
+}
+
int main() {
for (auto const& MS : PathList) {
RunTestCase<char>(MS);
RunTestCase<wchar_t>(MS);
RunTestCase<char16_t>(MS);
RunTestCase<char32_t>(MS);
+ RunStringMoveTest(MS);
}
test_sfinae();
}
diff --git a/test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp b/test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp
index 89269362d06f..76df0e9eef76 100644
--- a/test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp
+++ b/test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp
@@ -132,7 +132,7 @@ void doConcatSourceAllocTest(ConcatOperatorTestcase const& TC)
assert(LHS == E);
}
// input iterator - For non-native char types, appends needs to copy the
- // iterator range into a contigious block of memory before it can perform the
+ // iterator range into a contiguous block of memory before it can perform the
// code_cvt conversions.
// For "char" no allocations will be performed because no conversion is
// required.
diff --git a/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp b/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
index 4c83481aaf2d..078e006663e9 100644
--- a/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
+++ b/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
@@ -54,12 +54,6 @@
#include "count_new.hpp"
#include "filesystem_test_helper.hpp"
-template <class It>
-std::reverse_iterator<It> mkRev(It it) {
- return std::reverse_iterator<It>(it);
-}
-
-
namespace fs = std::experimental::filesystem;
struct PathDecomposeTestcase
{
@@ -147,7 +141,11 @@ void decompPathTest()
assert(checkCollectionsEqual(p.begin(), p.end(),
TC.elements.begin(), TC.elements.end()));
// check backwards
- assert(checkCollectionsEqual(mkRev(p.end()), mkRev(p.begin()),
+
+ std::vector<fs::path> Parts;
+ for (auto it = p.end(); it != p.begin(); )
+ Parts.push_back(*--it);
+ assert(checkCollectionsEqual(Parts.begin(), Parts.end(),
TC.elements.rbegin(), TC.elements.rend()));
}
}
diff --git a/test/std/experimental/filesystem/class.path/synop.pass.cpp b/test/std/experimental/filesystem/class.path/synop.pass.cpp
index b0a7b5cd65e2..883feb287d06 100644
--- a/test/std/experimental/filesystem/class.path/synop.pass.cpp
+++ b/test/std/experimental/filesystem/class.path/synop.pass.cpp
@@ -32,7 +32,7 @@ int main() {
{
ASSERT_SAME_TYPE(const path::value_type, decltype(path::preferred_separator));
static_assert(path::preferred_separator == '/', "");
- // Make preferred_separator ODR used by taking it's address.
+ // Make preferred_separator ODR used by taking its address.
const char* dummy = &path::preferred_separator;
((void)dummy);
}
diff --git a/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
index e67fc2f20f6e..26fc3ca28d8e 100644
--- a/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
+++ b/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
@@ -175,7 +175,7 @@ TEST_CASE(access_denied_on_recursion_test_case)
TEST_CHECK(ec);
TEST_CHECK(it == endIt);
}
- // Same as obove but test operator++().
+ // Same as above but test operator++().
{
std::error_code ec = GetTestEC();
recursive_directory_iterator it(startDir, ec);
@@ -222,7 +222,7 @@ TEST_CASE(access_denied_on_recursion_test_case)
TEST_REQUIRE(ec);
TEST_REQUIRE(it == endIt);
}
- // Same as obove but testing the throwing constructors
+ // Same as above but testing the throwing constructors
{
TEST_REQUIRE_THROW(filesystem_error,
recursive_directory_iterator(permDeniedDir));
diff --git a/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp b/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
index d8d92c5888ac..447fb46e840b 100644
--- a/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
+++ b/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
@@ -18,8 +18,8 @@
#include <type_traits>
// system_clock is used because it meets the requirements of TrivialClock,
-// and it's resolution and range of system_clock should match the operating
-// systems file time type.
+// and the resolution and range of system_clock should match the operating
+// system's file time type.
typedef std::chrono::system_clock ExpectedClock;
typedef std::chrono::time_point<ExpectedClock> ExpectedTimePoint;
diff --git a/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp b/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
index 4d59235c722b..28e945b68970 100644
--- a/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
+++ b/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
@@ -54,7 +54,7 @@ TEST_CASE(absolute_path_test)
TEST_REQUIRE(not p.has_root_name());
TEST_REQUIRE(p.has_root_directory());
TEST_CHECK(p.is_absolute());
- // ensure absolute(base) is not recursivly called
+ // ensure absolute(base) is not recursively called
TEST_REQUIRE(base.has_root_name());
TEST_REQUIRE(base.has_root_directory());
@@ -73,7 +73,7 @@ TEST_CASE(absolute_path_test)
TEST_REQUIRE(p.has_root_name());
TEST_REQUIRE(not p.has_root_directory());
TEST_CHECK(not p.is_absolute());
- // absolute is called recursivly on base. The following conditions
+ // absolute is called recursively on base. The following conditions
// must be true for it to return base unmodified
TEST_REQUIRE(base.has_root_name());
TEST_REQUIRE(base.has_root_directory());
diff --git a/test/std/experimental/filesystem/fs.op.funcs/fs.op.exists/exists.pass.cpp b/test/std/experimental/filesystem/fs.op.funcs/fs.op.exists/exists.pass.cpp
index 252ced6fd65f..2b9f57e7e954 100644
--- a/test/std/experimental/filesystem/fs.op.funcs/fs.op.exists/exists.pass.cpp
+++ b/test/std/experimental/filesystem/fs.op.funcs/fs.op.exists/exists.pass.cpp
@@ -85,4 +85,13 @@ TEST_CASE(test_exists_fails)
TEST_CHECK_THROW(filesystem_error, exists(file));
}
+TEST_CASE(test_name_too_long) {
+ std::string long_name(2500, 'a');
+ const path file(long_name);
+
+ std::error_code ec;
+ TEST_CHECK(exists(file, ec) == false);
+ TEST_CHECK(ec);
+}
+
TEST_SUITE_END()
diff --git a/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
index 4177392141e5..794aeb992640 100644
--- a/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
+++ b/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
@@ -144,7 +144,7 @@ TEST_CASE(test_no_resolve_symlink_on_symlink)
std::error_code expected_ec;
#else
// On linux symlink permissions are not supported. The error code should
- // be 'operation_not_supported' and the sylink permissions should be
+ // be 'operation_not_supported' and the symlink permissions should be
// unchanged.
const auto expected_link_perms = symlink_status(sym).permissions();
std::error_code expected_ec = std::make_error_code(std::errc::operation_not_supported);
diff --git a/test/std/experimental/filesystem/fs.op.funcs/fs.op.status/status.pass.cpp b/test/std/experimental/filesystem/fs.op.funcs/fs.op.status/status.pass.cpp
index 2c76caf74c84..fdc3d2b4a61f 100644
--- a/test/std/experimental/filesystem/fs.op.funcs/fs.op.status/status.pass.cpp
+++ b/test/std/experimental/filesystem/fs.op.funcs/fs.op.status/status.pass.cpp
@@ -65,29 +65,36 @@ TEST_CASE(test_status_cannot_resolve)
const std::error_code set_ec =
std::make_error_code(std::errc::address_in_use);
- const std::error_code expect_ec =
+ const std::error_code perm_ec =
std::make_error_code(std::errc::permission_denied);
+ const std::error_code name_too_long_ec =
+ std::make_error_code(std::errc::filename_too_long);
- const path cases[] = {
- file, sym
+ struct TestCase {
+ path p;
+ std::error_code expect_ec;
+ } const TestCases[] = {
+ {file, perm_ec},
+ {sym, perm_ec},
+ {path(std::string(2500, 'a')), name_too_long_ec}
};
- for (auto& p : cases)
+ for (auto& TC : TestCases)
{
{ // test non-throwing case
std::error_code ec = set_ec;
- file_status st = status(p, ec);
- TEST_CHECK(ec == expect_ec);
+ file_status st = status(TC.p, ec);
+ TEST_CHECK(ec == TC.expect_ec);
TEST_CHECK(st.type() == file_type::none);
TEST_CHECK(st.permissions() == perms::unknown);
}
#ifndef TEST_HAS_NO_EXCEPTIONS
{ // test throwing case
try {
- status(p);
+ status(TC.p);
} catch (filesystem_error const& err) {
- TEST_CHECK(err.path1() == p);
+ TEST_CHECK(err.path1() == TC.p);
TEST_CHECK(err.path2() == "");
- TEST_CHECK(err.code() == expect_ec);
+ TEST_CHECK(err.code() == TC.expect_ec);
}
}
#endif
diff --git a/test/std/experimental/filesystem/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp b/test/std/experimental/filesystem/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
index 148564e61961..021dd7fc8160 100644
--- a/test/std/experimental/filesystem/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
+++ b/test/std/experimental/filesystem/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
@@ -97,6 +97,14 @@ TEST_CASE(basic_tests)
TEST_CHECK(ec == std::make_error_code(std::errc::permission_denied));
TEST_CHECK(ret == "");
+ // Set the env variable to point to a non-existent dir
+ PutEnv(TC.name, TC.p / "does_not_exist");
+ ec = GetTestEC();
+ ret = temp_directory_path(ec);
+ TEST_CHECK(ec != GetTestEC());
+ TEST_CHECK(ec);
+ TEST_CHECK(ret == "");
+
// Finally erase this env variable
UnsetEnv(TC.name);
}
diff --git a/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp b/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
index a02dcf336960..3e83173555be 100644
--- a/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
+++ b/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
@@ -120,7 +120,7 @@ void test_pmr_uses_alloc(Args&&... args)
}
{
// Test that T(std::allocator_arg_t, Alloc const&, Args...) construction
- // is prefered when T(Args..., Alloc const&) is also available.
+ // is preferred when T(Args..., Alloc const&) is also available.
using T = UsesAllocatorV3<Alloc, sizeof...(Args)>;
assert((doTest<T>(UA_AllocArg, std::forward<Args>(args)...)));
}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp
new file mode 100644
index 000000000000..c8d6c5367d7e
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool1.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> gcd(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::gcd(false, 4);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp
new file mode 100644
index 000000000000..a3a2206fba63
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool2.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> gcd(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::gcd(2, true);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp
new file mode 100644
index 000000000000..1f04580ddabd
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool3.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> gcd(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::gcd<volatile bool, int>(false, 4);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp
new file mode 100644
index 000000000000..1f0e8a2b3a2f
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.bool4.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> gcd(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::gcd<int, const bool>(2, true);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
index a52b50b391cd..3f86cfe4c7f0 100644
--- a/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
@@ -129,4 +129,11 @@ int main()
assert((do_test<long, int>(non_cce)));
assert((do_test<int, long long>(non_cce)));
assert((do_test<long long, int>(non_cce)));
+
+// LWG#2792
+ {
+ auto res = std::experimental::gcd((int64_t)1234, (int32_t)-2147483648);
+ static_assert( std::is_same<decltype(res), std::common_type<int64_t, int32_t>::type>::value, "");
+ assert(res == 2);
+ }
}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp
new file mode 100644
index 000000000000..e4c2ed8bf539
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool1.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> lcm(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::lcm(false, 4);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp
new file mode 100644
index 000000000000..097b23eae6e4
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool2.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> lcm(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::lcm(2, true);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp
new file mode 100644
index 000000000000..d5e6300818cc
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool3.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> lcm(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::lcm<volatile bool, int>(false, 4);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp
new file mode 100644
index 000000000000..d88c490d64bf
--- /dev/null
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.bool4.fail.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++98, c++03, c++11
+// <numeric>
+
+// template<class _M, class _N>
+// constexpr common_type_t<_M,_N> lcm(_M __m, _N __n)
+
+// Remarks: If either M or N is not an integer type,
+// or if either is (a possibly cv-qualified) bool, the program is ill-formed.
+
+#include <experimental/numeric>
+
+
+int main()
+{
+ std::experimental::lcm<int, const bool>(2, true);
+}
diff --git a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
index e3c109f7447b..fd463e88e63f 100644
--- a/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
+++ b/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
@@ -128,4 +128,12 @@ int main()
assert((do_test<long, int>(non_cce)));
assert((do_test<int, long long>(non_cce)));
assert((do_test<long long, int>(non_cce)));
+
+// LWG#2792
+ {
+ auto res1 = std::experimental::lcm((int64_t)1234, (int32_t)-2147483648);
+ (void) std::experimental::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN
+ static_assert( std::is_same<decltype(res1), std::common_type<int64_t, int32_t>::type>::value, "");
+ assert(res1 == 1324997410816LL);
+ }
}
diff --git a/test/std/experimental/string.view/lit.local.cfg b/test/std/experimental/string.view/lit.local.cfg
new file mode 100644
index 000000000000..376dbe7c16ec
--- /dev/null
+++ b/test/std/experimental/string.view/lit.local.cfg
@@ -0,0 +1,3 @@
+# Disable all of the filesystem tests if the correct feature is not available.
+if 'msvc' in config.available_features:
+ config.unsupported = True
diff --git a/test/std/experimental/string.view/string.view.access/at.pass.cpp b/test/std/experimental/string.view/string.view.access/at.pass.cpp
index 7ceaf5ab3d9f..eaea062987fb 100644
--- a/test/std/experimental/string.view/string.view.access/at.pass.cpp
+++ b/test/std/experimental/string.view/string.view.access/at.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-// NOTE: Older versions of clang have a bug where they fail to evalute
+// NOTE: Older versions of clang have a bug where they fail to evaluate
// string_view::at as a constant expression.
// XFAIL: clang-3.4, clang-3.3
diff --git a/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp
index 0c5170f29cea..57dff44976bc 100644
--- a/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp
+++ b/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp
@@ -13,7 +13,7 @@
// template <class F, class T> constexpr decltype(auto) apply(F &&, T &&)
-// Testing extended function types. The extented function types are those
+// Testing extended function types. The extended function types are those
// named by INVOKE but that are not actual callable objects. These include
// bullets 1-4 of invoke.
diff --git a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
index 5df8691ef1f9..1f1b0c3faa5b 100644
--- a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
+++ b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
@@ -89,7 +89,7 @@
int main()
{
std::FILE* fp = 0;
- std::fpos_t fpos = {};
+ std::fpos_t fpos = std::fpos_t();
std::size_t s = 0;
char* cp = 0;
std::va_list va;
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 ed68279d7b57..3095712b9dbc 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
@@ -12,7 +12,7 @@
// basic_istream<charT,traits>&
// ignore(streamsize n = 1, int_type delim = traits::eof());
-// http://llvm.org/bugs/show_bug.cgi?id=16427
+// https://bugs.llvm.org/show_bug.cgi?id=16427
#include <sstream>
#include <cassert>
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 e68fb774335d..e09c0ed20461 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
@@ -23,6 +23,7 @@
#include <sstream>
#include <ios>
+#include <type_traits>
#include <cctype>
#include <cstdint>
#include <cassert>
@@ -66,11 +67,15 @@ int main()
test_octal<uint64_t>("1777777777777777777777");
test_octal< int64_t>("1777777777777777777777");
test_octal<uint64_t>("1777777777777777777777");
- if (sizeof(long) == sizeof(int64_t)) {
+
+ 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_64) {
test_octal< unsigned long>("1777777777777777777777");
test_octal< long>("1777777777777777777777");
}
- if (sizeof(long long) == sizeof(int64_t)) {
+ if (long_long_is_64) {
test_octal< unsigned long long>("1777777777777777777777");
test_octal< long long>("1777777777777777777777");
}
@@ -81,11 +86,11 @@ int main()
test_dec< int32_t>( "-1");
test_dec<uint64_t>("18446744073709551615");
test_dec< int64_t>( "-1");
- if (sizeof(long) == sizeof(int64_t)) {
+ if (long_is_64) {
test_dec<unsigned long>("18446744073709551615");
test_dec< long>( "-1");
}
- if (sizeof(long long) == sizeof(int64_t)) {
+ if (long_long_is_64) {
test_dec<unsigned long long>("18446744073709551615");
test_dec< long long>( "-1");
}
@@ -96,11 +101,11 @@ int main()
test_hex< int32_t>( "FFFFFFFF");
test_hex<uint64_t>("FFFFFFFFFFFFFFFF");
test_hex< int64_t>("FFFFFFFFFFFFFFFF");
- if (sizeof(long) == sizeof(int64_t)) {
+ if (long_is_64) {
test_hex<unsigned long>("FFFFFFFFFFFFFFFF");
test_hex< long>("FFFFFFFFFFFFFFFF");
}
- if (sizeof(long long) == sizeof(int64_t)) {
+ if (long_long_is_64) {
test_hex<unsigned long long>("FFFFFFFFFFFFFFFF");
test_hex< long long>("FFFFFFFFFFFFFFFF");
}
diff --git a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp
index ec3fe48866c7..bed0d72af809 100644
--- a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp
+++ b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp
@@ -56,7 +56,7 @@ int main()
assert(seekpos_called == 2);
assert(os.fail());
}
- { // See https://llvm.org/bugs/show_bug.cgi?id=21361
+ { // See https://bugs.llvm.org/show_bug.cgi?id=21361
seekpos_called = 0;
testbuf<char> sb;
std::ostream os(&sb);
diff --git a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp
index ebfd24af91d5..eb76cbf9d28a 100644
--- a/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp
+++ b/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp
@@ -58,7 +58,7 @@ int main()
assert(seekoff_called == 2);
assert(os.fail());
}
- { // See https://llvm.org/bugs/show_bug.cgi?id=21361
+ { // See https://bugs.llvm.org/show_bug.cgi?id=21361
seekoff_called = 0;
testbuf<char> sb;
std::ostream os(&sb);
diff --git a/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp b/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp
index c9fccea2c7d0..6b550b5dabe4 100644
--- a/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp
+++ b/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp
@@ -18,7 +18,7 @@
#include "test_macros.h"
-// Test that mismatches between strings and wides streams are diagnosed
+// Test that mismatches between strings and wide streams are diagnosed
#if TEST_STD_VER > 11
diff --git a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp
index 1e2ee50632af..59f0bd478760 100644
--- a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp
+++ b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/iword.pass.cpp
@@ -13,6 +13,9 @@
// long& iword(int idx);
+// This test compiles but never completes when compiled against the MSVC STL
+// UNSUPPORTED: msvc
+
#include <ios>
#include <string>
#include <cassert>
diff --git a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp
index 5246ad8f644c..45115823b4c2 100644
--- a/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp
+++ b/test/std/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp
@@ -13,6 +13,9 @@
// void*& pword(int idx);
+// This test compiles but never completes when compiled against the MSVC STL
+// UNSUPPORTED: msvc
+
#include <ios>
#include <string>
#include <cassert>
diff --git a/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp
index a3c11f7881a9..d5df1b7c094e 100644
--- a/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp
+++ b/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <iterator>
// back_insert_iterator
@@ -17,8 +19,6 @@
#include <iterator>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
#include <vector>
#include <memory>
#include <cassert>
@@ -32,11 +32,7 @@ test(C c)
assert(c.back() == typename C::value_type());
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
test(std::vector<std::unique_ptr<int> >());
-#endif
}
diff --git a/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp
index bd2bd44837ab..af880f871ff5 100644
--- a/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp
+++ b/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <iterator>
// front_insert_iterator
@@ -15,9 +17,6 @@
// operator=(Cont::value_type&& value);
#include <iterator>
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
#include <list>
#include <memory>
#include <cassert>
@@ -31,11 +30,7 @@ test(C c)
assert(c.front() == typename C::value_type());
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
test(std::list<std::unique_ptr<int> >());
-#endif
}
diff --git a/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp b/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
index f771688f1adc..ad1fa29ac7cf 100644
--- a/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
+++ b/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <iterator>
// insert_iterator
@@ -17,7 +19,6 @@
#include <iterator>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <utility>
#include <vector>
#include <memory>
@@ -52,11 +53,8 @@ struct do_nothing
void operator()(void*) const {}
};
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unique_ptr<int, do_nothing> Ptr;
typedef std::vector<Ptr> C;
@@ -94,5 +92,4 @@ int main()
insert3at(c2, c2.begin()+3, Ptr(x+3), Ptr(x+4), Ptr(x+5));
test(std::move(c1), 3, Ptr(x+3), Ptr(x+4), Ptr(x+5), c2);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp b/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp
index 7f807b63e3ce..fc6dc0009a0d 100644
--- a/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp
+++ b/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp
@@ -13,7 +13,7 @@
// istream_iterator(const istream_iterator& x);
// C++17 says: If is_trivially_copy_constructible_v<T> is true, then
-// this constructor shall beis a trivial copy constructor.
+// this constructor is a trivial copy constructor.
#include <iterator>
#include <sstream>
diff --git a/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp b/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp
index 32dc62817bc4..22f2967f3281 100644
--- a/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp
+++ b/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp
@@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
// Usage of is_trivially_constructible is broken with these compilers.
-// See https://llvm.org/bugs/show_bug.cgi?id=31016
-// XFAIL: clang-3.7, apple-clang-7, apple-clang-7.0
+// See https://bugs.llvm.org/show_bug.cgi?id=31016
+// XFAIL: clang-3.7, apple-clang-7 && c++1z
// <iterator>
@@ -17,7 +17,7 @@
// constexpr istream_iterator();
// C++17 says: If is_trivially_default_constructible_v<T> is true, then this
-// constructor shall beis a constexpr constructor.
+// constructor is a constexpr constructor.
#include <iterator>
#include <cassert>
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 b1bf75b11958..a680aa3f499b 100644
--- a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
@@ -29,11 +29,11 @@
// If T is a literal type, then this destructor shall be a trivial destructor.
// C++17 says:
// If is_trivially_default_constructible_v<T> is true, then
-// this constructor (the default ctor) shall beis a constexpr constructor.
+// this constructor (the default ctor) is a constexpr constructor.
// If is_trivially_copy_constructible_v<T> is true, then
-// this constructor (the copy ctor) shall beis a trivial copy constructor.
+// this constructor (the copy ctor) is a trivial copy constructor.
// If is_trivially_destructible_v<T> is true, then this
-// destructor shall beis a trivial destructor.
+// destructor is a trivial destructor.
// Testing the C++17 ctors for this are in the ctor tests.
#include <iterator>
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 28da3093f398..ec5d0a445baa 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
@@ -29,7 +29,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);
@@ -44,7 +44,7 @@ struct alignas(OverAligned) A
};
void test_max_alloc() {
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
auto do_test = []() {
void* vp = operator new [](std::numeric_limits<std::size_t>::max(),
std::align_val_t(OverAligned),
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
index dd4ff46bceb9..5aecc2da0847 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -38,7 +38,7 @@ struct A
int main()
{
#ifndef TEST_HAS_NO_EXCEPTIONS
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
try
{
void* volatile 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_array_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
index 2f51b1990436..c1606b27da79 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -37,7 +37,7 @@ struct A
int main()
{
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
#ifndef TEST_HAS_NO_EXCEPTIONS
try
#endif
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp
index ff55ec74e3cd..3925f2f5c313 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_calls_unsized_delete_array.pass.cpp
@@ -46,9 +46,11 @@ void operator delete[](void* p, const std::nothrow_t&) TEST_NOEXCEPT
// selected.
struct A { ~A() {} };
+A *volatile x;
+
int main()
{
- A* x = new A[3];
+ x = new A[3];
assert(0 == delete_called);
assert(0 == delete_nothrow_called);
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
index 26f7bc392c79..df002c60a6bb 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -38,7 +38,7 @@ struct A
int main()
{
#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.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 fefae51dac93..5ebbc8a1a2d9 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
@@ -29,7 +29,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 +45,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.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 ca8503e8854d..6e2eca314771 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
@@ -29,7 +29,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);
@@ -44,7 +44,7 @@ struct alignas(OverAligned) A
};
void test_max_alloc() {
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
auto do_test = []() {
void* vp = operator new (std::numeric_limits<std::size_t>::max(),
std::align_val_t(OverAligned),
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
index 757e8ae18a47..d85db6c499e9 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp
@@ -21,7 +21,7 @@
int new_handler_called = 0;
-void new_handler()
+void my_new_handler()
{
++new_handler_called;
std::set_new_handler(0);
@@ -37,7 +37,7 @@ struct A
int main()
{
- std::set_new_handler(new_handler);
+ std::set_new_handler(my_new_handler);
#ifndef TEST_HAS_NO_EXCEPTIONS
try
#endif
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp
index ad15b49483d0..ea6c9367b903 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp
@@ -43,9 +43,11 @@ struct A
~A() {A_constructed = false;}
};
+A *volatile ap;
+
int main()
{
- A* ap = new A;
+ ap = new A;
assert(ap);
assert(A_constructed);
assert(new_called);
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp
index 7369c362fce2..57fb1eb88b6e 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete11.pass.cpp
@@ -44,9 +44,11 @@ void operator delete(void* p, std::size_t) TEST_NOEXCEPT
std::free(p);
}
+int *volatile x;
+
int main()
{
- int *x = new int(42);
+ x = new int(42);
assert(0 == unsized_delete_called);
assert(0 == unsized_delete_nothrow_called);
assert(0 == sized_delete_called);
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
index 6c91f5ceda86..b85b670fa2d4 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
@@ -49,9 +49,11 @@ void operator delete(void* p, std::size_t) TEST_NOEXCEPT
std::free(p);
}
+int *volatile x;
+
int main()
{
- int *x = new int(42);
+ x = new int(42);
assert(0 == unsized_delete_called);
assert(0 == unsized_delete_nothrow_called);
assert(0 == sized_delete_called);
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 1b6de2367e10..61fca5f125bf 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
@@ -17,7 +17,7 @@
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
// REQUIRES: fsized-deallocation
-// RUN: %build -fsized-deallocation
+// RUN: %build -fsized-deallocation -O3
// RUN: %run
#if !defined(__cpp_sized_deallocation)
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 57d193a411cc..68cd85038b28 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
@@ -46,12 +46,19 @@ public:
C * operator&() const { assert(false); } // should not be called
};
+class D : private std::nested_exception {};
+
+
+class E1 : public std::nested_exception {};
+class E2 : public std::nested_exception {};
+class E : public E1, public E2 {};
+
int main()
{
{
try
{
- A a(3);
+ A a(3); // not a polymorphic type --> no effect
std::rethrow_if_nested(a);
assert(true);
}
@@ -63,6 +70,30 @@ int main()
{
try
{
+ D s; // inaccessible base class --> no effect
+ std::rethrow_if_nested(s);
+ assert(true);
+ }
+ catch (...)
+ {
+ assert(false);
+ }
+ }
+ {
+ try
+ {
+ E s; // ambiguous base class --> no effect
+ std::rethrow_if_nested(s);
+ assert(true);
+ }
+ catch (...)
+ {
+ assert(false);
+ }
+ }
+ {
+ try
+ {
throw B(5);
}
catch (const B& b)
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 a86d8bcbe201..26be4db38fba 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
@@ -107,6 +107,16 @@ int main()
assert(i == 7);
}
}
+ {
+ try
+ {
+ std::throw_with_nested("String literal");
+ assert(false);
+ }
+ catch (const char * s)
+ {
+ }
+ }
#if TEST_STD_VER > 11
{
try
diff --git a/test/std/language.support/support.types/byte.pass.cpp b/test/std/language.support/support.types/byte.pass.cpp
new file mode 100644
index 000000000000..aed44f91218f
--- /dev/null
+++ b/test/std/language.support/support.types/byte.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <type_traits>
+#include <test_macros.h>
+
+// XFAIL: c++98, c++03, c++11, c++14
+
+// 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, "" );
+static_assert(!std::is_arithmetic<std::byte>::value, "" );
+static_assert(!std::is_integral<std::byte>::value, "" );
+
+static_assert(!std::is_same<std::byte, char>::value, "" );
+static_assert(!std::is_same<std::byte, signed char>::value, "" );
+static_assert(!std::is_same<std::byte, unsigned char>::value, "" );
+
+// The standard doesn't outright say this, but it's pretty clear that it has to be true.
+static_assert(sizeof(std::byte) == 1, "" );
+
+int main () {}
diff --git a/test/std/language.support/support.types/byteops/and.assign.pass.cpp b/test/std/language.support/support.types/byteops/and.assign.pass.cpp
new file mode 100644
index 000000000000..dec241eb0c41
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/and.assign.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte& operator &=(byte l, byte r) noexcept;
+
+
+constexpr std::byte test(std::byte b1, std::byte b2) {
+ std::byte bret = b1;
+ return bret &= b2;
+ }
+
+
+int main () {
+ std::byte b; // not constexpr, just used in noexcept check
+ constexpr std::byte b1{1};
+ constexpr std::byte b8{8};
+ constexpr std::byte b9{9};
+
+ static_assert(noexcept(b &= b), "" );
+
+ static_assert(std::to_integer<int>(test(b1, b8)) == 0, "");
+ static_assert(std::to_integer<int>(test(b1, b9)) == 1, "");
+ static_assert(std::to_integer<int>(test(b8, b9)) == 8, "");
+
+ static_assert(std::to_integer<int>(test(b8, b1)) == 0, "");
+ static_assert(std::to_integer<int>(test(b9, b1)) == 1, "");
+ static_assert(std::to_integer<int>(test(b9, b8)) == 8, "");
+}
diff --git a/test/std/language.support/support.types/byteops/and.pass.cpp b/test/std/language.support/support.types/byteops/and.pass.cpp
new file mode 100644
index 000000000000..22da6e3e0d4c
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/and.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte operator&(byte l, byte r) noexcept;
+
+int main () {
+ constexpr std::byte b1{1};
+ constexpr std::byte b8{8};
+ constexpr std::byte b9{9};
+
+ static_assert(noexcept(b1 & b8), "" );
+
+ static_assert(std::to_integer<int>(b1 & b8) == 0, "");
+ static_assert(std::to_integer<int>(b1 & b9) == 1, "");
+ static_assert(std::to_integer<int>(b8 & b9) == 8, "");
+
+ static_assert(std::to_integer<int>(b8 & b1) == 0, "");
+ static_assert(std::to_integer<int>(b9 & b1) == 1, "");
+ static_assert(std::to_integer<int>(b9 & b8) == 8, "");
+}
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
new file mode 100644
index 000000000000..298edb22d249
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte& operator<<=(byte& b, IntegerType shift) noexcept;
+// This function shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+
+constexpr std::byte test(std::byte b) {
+ return b <<= 2.0;
+ }
+
+
+int main () {
+ constexpr std::byte b1 = test(std::byte{1});
+}
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
new file mode 100644
index 000000000000..f7e0dee9c6bb
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte& operator<<=(byte& b, IntegerType shift) noexcept;
+// This function shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+
+constexpr std::byte test(std::byte b) {
+ return b <<= 2;
+ }
+
+
+int main () {
+ std::byte b; // not constexpr, just used in noexcept check
+ constexpr std::byte b2{2};
+ 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
new file mode 100644
index 000000000000..c950329334be
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/lshift.fail.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
+// 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 b2 = b1 << 2.0f;
+}
diff --git a/test/std/language.support/support.types/byteops/lshift.pass.cpp b/test/std/language.support/support.types/byteops/lshift.pass.cpp
new file mode 100644
index 000000000000..b4a8325199ff
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/lshift.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
+// 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, "");
+}
diff --git a/test/std/language.support/support.types/byteops/not.pass.cpp b/test/std/language.support/support.types/byteops/not.pass.cpp
new file mode 100644
index 000000000000..734780f194a0
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/not.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte operator~(byte b) noexcept;
+
+int main () {
+ constexpr std::byte b1{1};
+ constexpr std::byte b2{2};
+ constexpr std::byte b8{8};
+
+ static_assert(noexcept(~b1), "" );
+
+ static_assert(std::to_integer<int>(~b1) == 254, "");
+ static_assert(std::to_integer<int>(~b2) == 253, "");
+ static_assert(std::to_integer<int>(~b8) == 247, "");
+}
diff --git a/test/std/language.support/support.types/byteops/or.assign.pass.cpp b/test/std/language.support/support.types/byteops/or.assign.pass.cpp
new file mode 100644
index 000000000000..75d6ab4d0a9d
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/or.assign.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte& operator |=(byte l, byte r) noexcept;
+
+
+constexpr std::byte test(std::byte b1, std::byte b2) {
+ std::byte bret = b1;
+ return bret |= b2;
+ }
+
+
+int main () {
+ std::byte b; // not constexpr, just used in noexcept check
+ constexpr std::byte b1{1};
+ constexpr std::byte b2{2};
+ constexpr std::byte b8{8};
+
+ static_assert(noexcept(b |= b), "" );
+
+ static_assert(std::to_integer<int>(test(b1, b2)) == 3, "");
+ static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
+ static_assert(std::to_integer<int>(test(b2, b8)) == 10, "");
+
+ static_assert(std::to_integer<int>(test(b2, b1)) == 3, "");
+ static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
+ static_assert(std::to_integer<int>(test(b8, b2)) == 10, "");
+
+}
diff --git a/test/std/language.support/support.types/byteops/or.pass.cpp b/test/std/language.support/support.types/byteops/or.pass.cpp
new file mode 100644
index 000000000000..02c547f1dbb6
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/or.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte operator|(byte l, byte r) noexcept;
+
+int main () {
+ constexpr std::byte b1{1};
+ constexpr std::byte b2{2};
+ constexpr std::byte b8{8};
+
+ static_assert(noexcept(b1 | b2), "" );
+
+ static_assert(std::to_integer<int>(b1 | b2) == 3, "");
+ static_assert(std::to_integer<int>(b1 | b8) == 9, "");
+ static_assert(std::to_integer<int>(b2 | b8) == 10, "");
+
+ static_assert(std::to_integer<int>(b2 | b1) == 3, "");
+ static_assert(std::to_integer<int>(b8 | b1) == 9, "");
+ static_assert(std::to_integer<int>(b8 | b2) == 10, "");
+}
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
new file mode 100644
index 000000000000..3a0c218aff82
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte operator>>(byte& b, IntegerType shift) noexcept;
+// This function shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+
+constexpr std::byte test(std::byte b) {
+ return b >>= 2.0;
+ }
+
+
+int main () {
+ constexpr std::byte b1 = test(std::byte{1});
+}
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
new file mode 100644
index 000000000000..5b970258f5e0
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte& operator>>=(byte& b, IntegerType shift) noexcept;
+// This function shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+
+constexpr std::byte test(std::byte b) {
+ return b >>= 2;
+ }
+
+
+int main () {
+ std::byte b; // not constexpr, just used in noexcept check
+ constexpr std::byte b16{16};
+ constexpr std::byte b192{192};
+
+ static_assert(noexcept(b >>= 2), "" );
+
+ static_assert(std::to_integer<int>(test(b16)) == 4, "" );
+ static_assert(std::to_integer<int>(test(b192)) == 48, "" );
+}
diff --git a/test/std/language.support/support.types/byteops/rshift.fail.cpp b/test/std/language.support/support.types/byteops/rshift.fail.cpp
new file mode 100644
index 000000000000..14e2fcfa1301
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/rshift.fail.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte operator >>(byte b, IntegerType shift) noexcept;
+// 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 b2 = b1 >> 2.0f;
+}
diff --git a/test/std/language.support/support.types/byteops/rshift.pass.cpp b/test/std/language.support/support.types/byteops/rshift.pass.cpp
new file mode 100644
index 000000000000..5ff986a70ade
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/rshift.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr byte operator <<(byte b, IntegerType shift) noexcept;
+// These functions shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+
+constexpr std::byte test(std::byte b) {
+ return b <<= 2;
+ }
+
+
+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, "");
+
+}
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
new file mode 100644
index 000000000000..8832e506a118
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/to_integer.fail.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr IntegerType to_integer(byte b) noexcept;
+// This function shall not participate in overload resolution unless
+// is_integral_v<IntegerType> is true.
+
+int main () {
+ constexpr std::byte b1{1};
+ auto f = std::to_integer<float>(b1);
+}
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
new file mode 100644
index 000000000000..4aca0be82deb
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/to_integer.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// template <class IntegerType>
+// constexpr IntegerType to_integer(byte b) noexcept;
+// 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, "" );
+ static_assert(std::is_same<unsigned short, decltype(std::to_integer<unsigned short>(b1))>::value, "" );
+
+ static_assert(std::to_integer<int>(b1) == 1, "");
+ static_assert(std::to_integer<int>(b3) == 3, "");
+}
diff --git a/test/std/language.support/support.types/byteops/xor.assign.pass.cpp b/test/std/language.support/support.types/byteops/xor.assign.pass.cpp
new file mode 100644
index 000000000000..c9b40177a17c
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/xor.assign.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte& operator ^=(byte l, byte r) noexcept;
+
+
+constexpr std::byte test(std::byte b1, std::byte b2) {
+ std::byte bret = b1;
+ return bret ^= b2;
+ }
+
+
+int main () {
+ std::byte b; // not constexpr, just used in noexcept check
+ constexpr std::byte b1{1};
+ constexpr std::byte b8{8};
+ constexpr std::byte b9{9};
+
+ static_assert(noexcept(b ^= b), "" );
+
+ static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
+ static_assert(std::to_integer<int>(test(b1, b9)) == 8, "");
+ static_assert(std::to_integer<int>(test(b8, b9)) == 1, "");
+
+ static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
+ static_assert(std::to_integer<int>(test(b9, b1)) == 8, "");
+ static_assert(std::to_integer<int>(test(b9, b8)) == 1, "");
+}
diff --git a/test/std/language.support/support.types/byteops/xor.pass.cpp b/test/std/language.support/support.types/byteops/xor.pass.cpp
new file mode 100644
index 000000000000..3d0402b30a55
--- /dev/null
+++ b/test/std/language.support/support.types/byteops/xor.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 <cstddef>
+#include <test_macros.h>
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// The following compilers don't like "std::byte b1{1}"
+// UNSUPPORTED: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8.0
+
+// constexpr byte operator^(byte l, byte r) noexcept;
+
+int main () {
+ constexpr std::byte b1{1};
+ constexpr std::byte b8{8};
+ constexpr std::byte b9{9};
+
+ static_assert(noexcept(b1 ^ b8), "" );
+
+ static_assert(std::to_integer<int>(b1 ^ b8) == 9, "");
+ static_assert(std::to_integer<int>(b1 ^ b9) == 8, "");
+ static_assert(std::to_integer<int>(b8 ^ b9) == 1, "");
+
+ static_assert(std::to_integer<int>(b8 ^ b1) == 9, "");
+ static_assert(std::to_integer<int>(b9 ^ b1) == 8, "");
+ static_assert(std::to_integer<int>(b9 ^ b8) == 1, "");
+}
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 044ba2b976cb..2e2e97361994 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 4488e9c3f73b..94e45302f10b 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,8 +15,8 @@
// charT tolower(charT) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// 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 0c224e342fa9..d97dc5747e54 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,8 +15,8 @@
// const charT* tolower(charT* low, const charT* high) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
#include <locale>
#include <string>
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 0985de5007d6..d2ad328268f1 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,8 +15,8 @@
// charT toupper(charT) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
#include <locale>
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 ba047754916d..9ed3d138112a 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,8 +15,8 @@
// const charT* toupper(charT* low, const charT* high) const;
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
#include <locale>
#include <string>
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp
index df350d3537af..1664c5537fa1 100644
--- a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp
@@ -14,7 +14,7 @@
// string_type negative_sign() const;
// The C++ and C standards are silent.
-// On this one, commen sense is the guideline.
+// On this one, common sense is the guideline.
// If customers complain, I'll endeavor to minimize customer complaints
#include <locale>
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 32e7249ab868..72e351f580b4 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <locale>
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
index 8edcfc415821..4d8c2af38383 100644
--- a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
@@ -38,6 +38,12 @@ int main()
char str[50];
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "0x0" || ex == "(nil)");
+ char expected_str[32] = {};
+ // num_put::put uses %p for pointer types, but the exact format of %p is
+ // implementation defined behavior for the C library. Compare output to
+ // snprintf for portability.
+ int rc = snprintf(expected_str, sizeof(expected_str), "%p", v);
+ assert(rc > 0);
+ assert(ex == expected_str);
}
}
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 6d7f506bb2d4..272199b0e0d9 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,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <locale>
diff --git a/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
index 9a06157ada59..af15b174bcd2 100644
--- a/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -13,7 +13,7 @@
// REQUIRES: locale.zh_CN.UTF-8
// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
-// GLIBC also failes on the zh_CN test.
+// GLIBC also fails on the zh_CN test.
// XFAIL: linux
// <locale>
diff --git a/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
index 170f33ad9813..1cd9f462e38e 100644
--- a/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
@@ -13,7 +13,7 @@
// REQUIRES: locale.zh_CN.UTF-8
// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
-// GLIBC also failes on the zh_CN test.
+// GLIBC also fails on the zh_CN test.
// XFAIL: linux
// <locale>
diff --git a/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp b/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
index 4d710c1a9799..56d6262d0692 100644
--- a/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
+++ b/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
@@ -28,11 +28,11 @@
int main()
{
{
- typedef std::codecvt_utf16<wchar_t> C;
+ typedef std::codecvt_utf16<char32_t> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -67,11 +67,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf16<wchar_t, 0x1000> C;
+ typedef std::codecvt_utf16<char32_t, 0x1000> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -106,11 +106,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf16<wchar_t, 0x10ffff, std::consume_header> C;
+ typedef std::codecvt_utf16<char32_t, 0x10ffff, std::consume_header> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp);
@@ -145,11 +145,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf16<wchar_t, 0x10ffff, std::little_endian> C;
+ typedef std::codecvt_utf16<char32_t, 0x10ffff, std::little_endian> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -184,11 +184,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf16<wchar_t, 0x1000, std::little_endian> C;
+ typedef std::codecvt_utf16<char32_t, 0x1000, std::little_endian> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -223,13 +223,13 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf16<wchar_t, 0x10ffff, std::codecvt_mode(
- std::consume_header |
- std::little_endian)> C;
+ typedef std::codecvt_utf16<char32_t, 0x10ffff,
+ std::codecvt_mode(std::consume_header | std::little_endian)> C;
+
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp);
diff --git a/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp b/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
index 382ea122641a..308bb9da2fc1 100644
--- a/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
+++ b/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
@@ -28,11 +28,11 @@
int main()
{
{
- typedef std::codecvt_utf8<wchar_t> C;
+ typedef std::codecvt_utf8<char32_t> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -67,11 +67,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf8<wchar_t, 0x1000> C;
+ typedef std::codecvt_utf8<char32_t, 0x1000> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp);
@@ -106,11 +106,11 @@ int main()
assert(w == 0x56);
}
{
- typedef std::codecvt_utf8<wchar_t, 0xFFFFFFFF, std::consume_header> C;
+ typedef std::codecvt_utf8<char32_t, 0xFFFFFFFF, std::consume_header> C;
C c;
- wchar_t w = 0;
+ char32_t w = 0;
char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)};
- wchar_t* wp = nullptr;
+ char32_t* wp = nullptr;
std::mbstate_t m;
const char* np = nullptr;
std::codecvt_base::result r = c.in(m, n, n+7, np, &w, &w+1, wp);
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 0087f1943b6e..11346fb402d2 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <locale>
diff --git a/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp b/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp
index 8cc71f7bff27..9e2298cf7718 100644
--- a/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp
+++ b/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp
@@ -34,7 +34,6 @@ test()
void test_edges()
{
- typedef std::complex<double> C;
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
diff --git a/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp b/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
index 9f09ab5827de..f27ead3daf00 100644
--- a/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
+++ b/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
@@ -35,7 +35,6 @@ test()
void test_edges()
{
- typedef std::complex<double> C;
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
diff --git a/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
index d34ff1c64d83..19b74ba28bcd 100644
--- a/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
+++ b/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <valarray>
// template<class T> class valarray;
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
T a[] = {1, 2, 3, 4, 5};
@@ -60,5 +61,4 @@ int main()
assert(v2[i][j] == a[i][j]);
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
index a9692618e75f..b8fb08e0f223 100644
--- a/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
+++ b/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <valarray>
// template<class T> class valarray;
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
T a[] = {1, 2, 3, 4, 5};
@@ -58,5 +59,4 @@ int main()
assert(v2[i][j] == a[i][j]);
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp
index 46741e1e41b7..f999c5045a5c 100644
--- a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp
+++ b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference.pass.cpp
@@ -22,6 +22,7 @@
#include <numeric>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
template <class InIter, class OutIter>
@@ -38,7 +39,7 @@ test()
assert(ib[i] == ir[i]);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
class Y;
@@ -107,7 +108,7 @@ int main()
test<const int*, random_access_iterator<int*> >();
test<const int*, int*>();
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
X x[3] = {X(1), X(2), X(3)};
Y y[3] = {Y(1), Y(2), Y(3)};
std::adjacent_difference(x, x+3, y);
diff --git a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp
index fb0bbdc2836d..8a30a82212de 100644
--- a/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp
+++ b/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp
@@ -23,6 +23,7 @@
#include <functional>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
template <class InIter, class OutIter>
@@ -40,7 +41,7 @@ test()
assert(ib[i] == ir[i]);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
class Y;
@@ -110,7 +111,7 @@ int main()
test<const int*, random_access_iterator<int*> >();
test<const int*, int*>();
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
X x[3] = {X(1), X(2), X(3)};
Y y[3] = {Y(1), Y(2), Y(3)};
std::adjacent_difference(x, x+3, y, std::minus<X>());
diff --git a/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
index af065b84d1bb..961b515ef8d8 100644
--- a/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
+++ b/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+
// <numeric>
// template<class _M, class _N>
@@ -129,4 +130,11 @@ int main()
assert((do_test<long, int>(non_cce)));
assert((do_test<int, long long>(non_cce)));
assert((do_test<long long, int>(non_cce)));
+
+// LWG#2837
+ {
+ auto res = std::gcd((int64_t)1234, (int32_t)-2147483648);
+ static_assert( std::is_same<decltype(res), std::common_type<int64_t, int32_t>::type>::value, "");
+ assert(res == 2);
+ }
}
diff --git a/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
index cd03d99ebf13..90d48398f54a 100644
--- a/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
+++ b/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
@@ -128,4 +128,12 @@ int main()
assert((do_test<long, int>(non_cce)));
assert((do_test<int, long long>(non_cce)));
assert((do_test<long long, int>(non_cce)));
+
+// LWG#2837
+ {
+ auto res1 = std::lcm((int64_t)1234, (int32_t)-2147483648);
+ (void) std::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN
+ static_assert( std::is_same<decltype(res1), std::common_type<int64_t, int32_t>::type>::value, "");
+ assert(res1 == 1324997410816LL);
+ }
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp
index d70d8f072c39..ca669dc4194a 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp
@@ -31,7 +31,6 @@ int main()
{
{
typedef std::cauchy_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
const double a = 10;
@@ -47,7 +46,6 @@ int main()
}
{
typedef std::cauchy_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
const double a = -1.5;
@@ -63,7 +61,6 @@ int main()
}
{
typedef std::cauchy_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
const double a = .5;
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
index 3b54790aee0a..3261880c6d04 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
@@ -34,7 +34,6 @@ int main()
{
{
typedef std::chi_squared_distribution<> D;
- typedef D::param_type P;
typedef std::minstd_rand G;
G g;
D d(0.5);
@@ -74,7 +73,6 @@ int main()
}
{
typedef std::chi_squared_distribution<> D;
- typedef D::param_type P;
typedef std::minstd_rand G;
G g;
D d(1);
@@ -114,7 +112,6 @@ int main()
}
{
typedef std::chi_squared_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(2);
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp
index 4da7f2e70e9b..8025880d8754 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp
@@ -51,7 +51,6 @@ int main()
// Purposefully only testing even integral values of m and n (for now)
{
typedef std::fisher_f_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(2, 4);
@@ -69,7 +68,6 @@ int main()
}
{
typedef std::fisher_f_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(4, 2);
@@ -87,7 +85,6 @@ int main()
}
{
typedef std::fisher_f_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(18, 20);
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
index e1084d3ef03d..2bf9204d3a09 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
@@ -34,7 +34,6 @@ int main()
{
{
typedef std::normal_distribution<> D;
- typedef D::param_type P;
typedef std::minstd_rand G;
G g;
D d(5, 4);
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
index 223d6f4d2216..71aaa081b351 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
@@ -34,7 +34,6 @@ int main()
{
{
typedef std::exponential_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(.75);
@@ -74,7 +73,6 @@ int main()
}
{
typedef std::exponential_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(1);
@@ -114,7 +112,6 @@ int main()
}
{
typedef std::exponential_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(10);
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
index 10337907b964..ee0b68fb8f9c 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
+++ b/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
@@ -34,7 +34,6 @@ int main()
{
{
typedef std::weibull_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(0.5, 2);
@@ -78,7 +77,6 @@ int main()
}
{
typedef std::weibull_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(1, .5);
@@ -122,7 +120,6 @@ int main()
}
{
typedef std::weibull_distribution<> D;
- typedef D::param_type P;
typedef std::mt19937 G;
G g;
D d(2, 3);
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 f866929795db..9bd213f96746 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
@@ -26,7 +26,8 @@
int main()
{
-/* {
+#if 0
+ {
std::cmatch m;
const char s[] = "a";
assert(std::regex_match(s, m, std::regex("a", std::regex_constants::awk)));
@@ -263,7 +264,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -278,7 +279,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -293,7 +294,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -326,7 +327,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -341,7 +342,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -356,7 +357,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -378,7 +379,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -394,7 +395,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -410,7 +411,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
assert(m.length(1) == 4);
@@ -434,7 +435,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -519,7 +520,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -542,7 +543,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -572,7 +573,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -588,7 +589,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -604,7 +605,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -616,24 +617,23 @@ int main()
assert(m.size() == 0);
}
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
-*/ {
- /*
+ {
std::cmatch m;
const char s[] = "m";
- assert(std::regex_match(s, m, std::regex("[a[=M=]z]",
- std::regex_constants::awk);
- assert(m.size() == 1);
+ assert(std::regex_match(s, m,
+ std::regex("[a[=M=]z]", std::regex_constants::awk)));
+ assert(m.size() == 1);
assert(!m.prefix().matched);
assert(m.prefix().first == s);
assert(m.prefix().second == m[0].first);
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
-*/ }
-/* {
+ }
+ {
std::cmatch m;
const char s[] = "Ch";
assert(std::regex_match(s, m, std::regex("[a[.ch.]z]",
@@ -645,7 +645,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -688,7 +688,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == 4);
+ assert((size_t)m.length(0) == 4);
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -704,7 +704,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s + std::char_traits<char>::length(s));
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -720,7 +720,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s+1);
- assert(m.length(0) == 1);
+ assert((size_t)m.length(0) == 1);
assert(m.position(0) == 0);
assert(m.str(0) == L"a");
}
@@ -735,7 +735,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s+2);
- assert(m.length(0) == 2);
+ assert((size_t)m.length(0) == 2);
assert(m.position(0) == 0);
assert(m.str(0) == L"ab");
}
@@ -945,7 +945,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -960,7 +960,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -975,7 +975,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1008,7 +1008,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1023,7 +1023,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1038,7 +1038,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1060,7 +1060,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1076,7 +1076,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1092,7 +1092,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
assert(m.length(1) == 4);
@@ -1116,7 +1116,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1201,7 +1201,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1224,7 +1224,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1254,7 +1254,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1270,7 +1270,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1286,7 +1286,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1310,7 +1310,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1326,7 +1326,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1385,8 +1385,9 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s));
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
-*/}
+#endif
+}
diff --git a/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp b/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
index 59b2832c4580..d9c5172303fc 100644
--- a/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
@@ -16,7 +16,7 @@
// const basic_regex<charT, traits>& e,
// regex_constants::match_flag_type flags = regex_constants::match_default);
-// http://llvm.org/bugs/show_bug.cgi?id=16135
+// https://bugs.llvm.org/show_bug.cgi?id=16135
#include <string>
#include <regex>
diff --git a/test/std/re/re.alg/re.alg.search/backup.pass.cpp b/test/std/re/re.alg/re.alg.search/backup.pass.cpp
index f33b844bed9c..8de0b650ff05 100644
--- a/test/std/re/re.alg/re.alg.search/backup.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/backup.pass.cpp
@@ -25,7 +25,7 @@
int main()
{
// This regex_iterator uses regex_search(__wrap_iter<_Iter> __first, ...)
- // Test for http://llvm.org/bugs/show_bug.cgi?id=16240 fixed in r185273.
+ // Test for https://bugs.llvm.org/show_bug.cgi?id=16240 fixed in r185273.
{
std::string s("aaaa a");
std::regex re("\\ba");
diff --git a/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp b/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
index 93424e188432..2d753ed14701 100644
--- a/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
@@ -16,7 +16,7 @@
// const basic_regex<charT, traits>& e,
// regex_constants::match_flag_type flags = regex_constants::match_default);
-// http://llvm.org/bugs/show_bug.cgi?id=11118
+// https://bugs.llvm.org/show_bug.cgi?id=11118
#include <regex>
#include <cassert>
diff --git a/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp b/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp
index aca4d674d9f9..e66d3e976db2 100644
--- a/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp
@@ -36,7 +36,7 @@ int main()
assert(error_badbackref_thrown("ab(c)\\2def")); // only one reference
// this should NOT throw, because we only should look at the '1'
-// See https://llvm.org/bugs/show_bug.cgi?id=31387
+// See https://bugs.llvm.org/show_bug.cgi?id=31387
{
const char *pat1 = "a(b)c\\1234";
std::regex re(pat1, pat1 + 7); // extra chars after the end.
diff --git a/test/std/re/re.traits/lookup_classname.pass.cpp b/test/std/re/re.traits/lookup_classname.pass.cpp
index 4f7cf61ebf99..2215b9043d5b 100644
--- a/test/std/re/re.traits/lookup_classname.pass.cpp
+++ b/test/std/re/re.traits/lookup_classname.pass.cpp
@@ -35,7 +35,7 @@ test(const char_type* A,
int main()
{
// if __regex_word is not distinct from all the classes, bad things happen
-// See https://llvm.org/bugs/show_bug.cgi?id=26476 for an example.
+// See https://bugs.llvm.org/show_bug.cgi?id=26476 for an example.
assert((std::ctype_base::space & std::regex_traits<char>::__regex_word) == 0);
assert((std::ctype_base::print & std::regex_traits<char>::__regex_word) == 0);
assert((std::ctype_base::cntrl & std::regex_traits<char>::__regex_word) == 0);
diff --git a/test/std/re/re.traits/translate_nocase.pass.cpp b/test/std/re/re.traits/translate_nocase.pass.cpp
index bf79629d33b4..ab73db79d97f 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// TODO: investigation needed
// XFAIL: linux-gnu
diff --git a/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp b/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp
new file mode 100644
index 000000000000..01f01218999d
--- /dev/null
+++ b/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <string>
+
+// Test that <string> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <string>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::string>();
+ test_hash_enabled_for_type<std::wstring>();
+#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+ test_hash_enabled_for_type<std::u16string>();
+ test_hash_enabled_for_type<std::u32string>();
+#endif
+ }
+}
diff --git a/test/std/strings/basic.string.hash/strings.pass.cpp b/test/std/strings/basic.string.hash/strings.pass.cpp
index 5fc32c06a701..d74e485752fc 100644
--- a/test/std/strings/basic.string.hash/strings.pass.cpp
+++ b/test/std/strings/basic.string.hash/strings.pass.cpp
@@ -22,6 +22,8 @@
#include <cassert>
#include <type_traits>
+#include "test_macros.h"
+
template <class T>
void
test()
@@ -29,6 +31,8 @@ test()
typedef std::hash<T> H;
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;
std::string g1 = "1234567890";
std::string g2 = "1234567891";
diff --git a/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
index b3447b94b803..982bb43289d7 100644
--- a/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
@@ -18,6 +18,65 @@
#include "test_allocator.h"
#include "min_allocator.h"
+#ifndef TEST_HAS_NO_EXCEPTIONS
+template <class T>
+struct alloc_imp {
+ bool active;
+
+ alloc_imp() : active(true) {}
+
+ T* allocate(std::size_t n)
+ {
+ if (active)
+ return static_cast<T*>(std::malloc(n * sizeof(T)));
+ else
+ throw std::bad_alloc();
+ }
+
+ void deallocate(T* p, std::size_t) { std::free(p); }
+ void activate () { active = true; }
+ void deactivate() { active = false; }
+};
+
+template <class T>
+struct poca_alloc {
+ typedef T value_type;
+ typedef std::true_type propagate_on_container_copy_assignment;
+
+ alloc_imp<T> *imp;
+
+ poca_alloc(alloc_imp<T> *imp_) : imp (imp_) {}
+
+ template <class U>
+ poca_alloc(const poca_alloc<U>& other) : imp(other.imp) {}
+
+ T* allocate (std::size_t n) { return imp->allocate(n);}
+ void deallocate(T* p, std::size_t n) { imp->deallocate(p, n); }
+};
+
+template <typename T, typename U>
+bool operator==(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs)
+{
+ return lhs.imp == rhs.imp;
+}
+
+template <typename T, typename U>
+bool operator!=(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs)
+{
+ return lhs.imp != rhs.imp;
+}
+
+template <class S>
+void test_assign(S &s1, const S& s2)
+{
+ try { s1 = s2; }
+ catch ( std::bad_alloc &) { return; }
+ assert(false);
+}
+#endif
+
+
+
template <class S>
void
test(S s1, const typename S::allocator_type& a)
@@ -46,5 +105,27 @@ int main()
test(S("1"), A());
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A());
}
+
+#ifndef TEST_HAS_NO_EXCEPTIONS
+ {
+ typedef poca_alloc<char> A;
+ typedef std::basic_string<char, std::char_traits<char>, A> S;
+ const char * p1 = "This is my first string";
+ const char * p2 = "This is my second string";
+
+ alloc_imp<char> imp1;
+ alloc_imp<char> imp2;
+ S s1(p1, A(&imp1));
+ S s2(p2, A(&imp2));
+
+ assert(s1 == p1);
+ assert(s2 == p2);
+
+ imp2.deactivate();
+ test_assign(s1, s2);
+ assert(s1 == p1);
+ assert(s2 == p2);
+ }
+#endif
#endif
}
diff --git a/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp b/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
index 0c6362d96863..f4ff0645afcf 100644
--- a/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
@@ -42,8 +42,10 @@ int main()
typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp b/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp
new file mode 100644
index 000000000000..0fbd663db4bc
--- /dev/null
+++ b/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp
@@ -0,0 +1,300 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: libcpp-no-deduction-guides
+
+// <string>
+
+// Test that the constructors offered by std::basic_string are formulated
+// so they're compatible with implicit deduction guides.
+
+#include <string>
+#include <string_view>
+#include <cassert>
+
+#include "test_macros.h"
+#include "test_allocator.h"
+#include "test_iterators.h"
+#include "constexpr_char_traits.hpp"
+
+template <class T, class Alloc = std::allocator<T>>
+using BStr = std::basic_string<T, std::char_traits<T>, Alloc>;
+
+// Overloads
+// using A = Allocator;
+// using BS = basic_string
+// using BSV = basic_string_view
+// ---------------
+// (1) basic_string() - NOT TESTED
+// (2) basic_string(A const&) - BROKEN
+// (3) basic_string(size_type, CharT, const A& = A())
+// (4) basic_string(BS const&, size_type, A const& = A())
+// (5) basic_string(BS const&, size_type, size_type, A const& = A()) - PARTIALLY BROKEN
+// (6) basic_string(const CharT*, size_type, A const& = A())
+// (7) basic_string(const CharT*, A const& = A())
+// (8) basic_string(InputIt, InputIt, A const& = A()) - BROKEN
+// (9) basic_string(BS const&)
+// (10) basic_string(BS const&, A const&)
+// (11) basic_string(BS&&)
+// (12) basic_string(BS&&, A const&)
+// (13) basic_string(initializer_list<CharT>, A const& = A())
+// (14) basic_string(BSV, A const& = A())
+// (15) basic_string(const T&, size_type, size_type, A const& = A()) - BROKEN
+int main()
+{
+ using TestSizeT = test_allocator<char>::size_type;
+ { // Testing (1)
+ // Nothing TODO. Cannot deduce without any arguments.
+ }
+ { // Testing (2)
+ // This overload isn't compatible with implicit deduction guides as
+ // specified in the standard.
+ // const test_allocator<char> alloc{};
+ // std::basic_string s(alloc);
+ }
+ { // Testing (3) w/o allocator
+ std::basic_string s(6ull, 'a');
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "aaaaaa");
+
+ std::basic_string w(2ull, L'b');
+ ASSERT_SAME_TYPE(decltype(w), std::wstring);
+ assert(w == L"bb");
+ }
+ { // Testing (3) w/ allocator
+ std::basic_string s(6ull, 'a', test_allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), BStr<char,test_allocator<char>>);
+ assert(s == "aaaaaa");
+
+ std::basic_string w(2ull, L'b', test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), BStr<wchar_t, test_allocator<wchar_t>>);
+ assert(w == L"bb");
+ }
+ { // Testing (4) w/o allocator
+ const std::string sin("abc");
+ std::basic_string s(sin, (size_t)1);
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "bc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win, (TestSizeT)3);
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"def");
+ }
+ { // Testing (4) w/ allocator
+ const std::string sin("abc");
+ std::basic_string s(sin, (size_t)1, std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "bc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win, (TestSizeT)3, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"def");
+ }
+ { // Testing (5) w/o allocator
+#if 0 // FIXME: This doesn't work
+ const std::string sin("abc");
+ std::basic_string s(sin, (size_t)1, (size_t)3);
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "bc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win, (TestSizeT)2, (TestSizeT)3);
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"cde");
+#endif
+ }
+ { // Testing (5) w/ allocator
+ const std::string sin("abc");
+ std::basic_string s(sin, (size_t)1, (size_t)3, std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "bc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win, (TestSizeT)2, (TestSizeT)3, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"cde");
+ }
+ { // Testing (6) w/o allocator
+ std::basic_string s("abc", (size_t)2);
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "ab");
+
+ std::basic_string w(L"abcdef", (size_t)3);
+ ASSERT_SAME_TYPE(decltype(w), std::wstring);
+ assert(w == L"abc");
+ }
+ { // Testing (6) w/ allocator
+ std::basic_string s("abc", (size_t)2, std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "ab");
+
+ using WStr = std::basic_string<wchar_t,
+ std::char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ std::basic_string w(L"abcdef", (TestSizeT)3, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abc");
+ }
+ { // Testing (7) w/o allocator
+ std::basic_string s("abc");
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ std::basic_string w(L"abcdef");
+ ASSERT_SAME_TYPE(decltype(w), std::wstring);
+ assert(w == L"abcdef");
+ }
+ { // Testing (7) w/ allocator
+ std::basic_string s("abc", std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using WStr = std::basic_string<wchar_t,
+ std::char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ std::basic_string w(L"abcdef", test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abcdef");
+ }
+ { // (8) w/o allocator
+ // This overload isn't compatible with implicit deduction guides as
+ // specified in the standard.
+ // FIXME: Propose adding an explicit guide to the standard?
+ }
+ { // (8) w/ allocator
+ // This overload isn't compatible with implicit deduction guides as
+ // specified in the standard.
+ // FIXME: Propose adding an explicit guide to the standard?
+#if 0
+ using It = input_iterator<const char*>;
+ const char* input = "abcdef";
+ std::basic_string s(It(input), It(input + 3), std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+#endif
+ }
+ { // Testing (9)
+ const std::string sin("abc");
+ std::basic_string s(sin);
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win);
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abcdef");
+ }
+ { // Testing (10)
+ const std::string sin("abc");
+ std::basic_string s(sin, std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ const WStr win(L"abcdef");
+ std::basic_string w(win, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abcdef");
+ }
+ { // Testing (11)
+ std::string sin("abc");
+ std::basic_string s(std::move(sin));
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ WStr win(L"abcdef");
+ std::basic_string w(std::move(win));
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abcdef");
+ }
+ { // Testing (12)
+ std::string sin("abc");
+ std::basic_string s(std::move(sin), std::allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using WStr = std::basic_string<wchar_t,
+ constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ WStr win(L"abcdef");
+ std::basic_string w(std::move(win), test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), WStr);
+ assert(w == L"abcdef");
+ }
+ { // Testing (13) w/o allocator
+ std::basic_string s({'a', 'b', 'c'});
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ std::basic_string w({L'a', L'b', L'c'});
+ ASSERT_SAME_TYPE(decltype(w), std::wstring);
+ assert(w == L"abc");
+ }
+ { // Testing (13) w/ allocator
+ std::basic_string s({'a', 'b', 'c'}, test_allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), BStr<char, test_allocator<char>>);
+ assert(s == "abc");
+
+ std::basic_string w({L'a', L'b', L'c'}, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), BStr<wchar_t, test_allocator<wchar_t>>);
+ assert(w == L"abc");
+ }
+ { // Testing (14) w/o allocator
+ std::string_view sv("abc");
+ std::basic_string s(sv);
+ ASSERT_SAME_TYPE(decltype(s), std::string);
+ assert(s == "abc");
+
+ using Expect = std::basic_string<wchar_t, constexpr_char_traits<wchar_t>>;
+ std::basic_string_view<wchar_t, constexpr_char_traits<wchar_t>> BSV(L"abcdef");
+ std::basic_string w(BSV);
+ ASSERT_SAME_TYPE(decltype(w), Expect);
+ assert(w == L"abcdef");
+ }
+ { // Testing (14) w/ allocator
+ using ExpectS = std::basic_string<char, std::char_traits<char>, test_allocator<char>>;
+ std::string_view sv("abc");
+ std::basic_string s(sv, test_allocator<char>{});
+ ASSERT_SAME_TYPE(decltype(s), ExpectS);
+ assert(s == "abc");
+
+ using ExpectW = std::basic_string<wchar_t, constexpr_char_traits<wchar_t>,
+ test_allocator<wchar_t>>;
+ std::basic_string_view<wchar_t, constexpr_char_traits<wchar_t>> BSV(L"abcdef");
+ std::basic_string w(BSV, test_allocator<wchar_t>{});
+ ASSERT_SAME_TYPE(decltype(w), ExpectW);
+ assert(w == L"abcdef");
+ }
+ { // Testing (15)
+ // This overload isn't compatible with implicit deduction guides as
+ // specified in the standard.
+ }
+}
diff --git a/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
index 1b10224cd9e7..1f83696891c4 100644
--- a/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
@@ -29,7 +29,6 @@ test(It first, It last)
{
typedef typename std::iterator_traits<It>::value_type charT;
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
- typedef typename S::traits_type T;
typedef typename S::allocator_type A;
S s2(first, last);
LIBCPP_ASSERT(s2.__invariants());
@@ -47,7 +46,6 @@ test(It first, It last, const A& a)
{
typedef typename std::iterator_traits<It>::value_type charT;
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
- typedef typename S::traits_type T;
S s2(first, last, a);
LIBCPP_ASSERT(s2.__invariants());
assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
diff --git a/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
index f56780095b7f..d9d451dc7112 100644
--- a/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
@@ -56,7 +56,6 @@ int main()
{
{
typedef test_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test("");
test("", A(2));
@@ -73,7 +72,6 @@ int main()
#if TEST_STD_VER >= 11
{
typedef min_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test("");
test("", A());
diff --git a/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
index bcab9eb6789e..3c75a700eaed 100644
--- a/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
@@ -53,7 +53,6 @@ int main()
{
{
typedef test_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test("", 0);
test("", 0, A(2));
@@ -70,7 +69,6 @@ int main()
#if TEST_STD_VER >= 11
{
typedef min_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test("", 0);
test("", 0, A());
diff --git a/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
index 60443e9f358d..2adf0049a0b5 100644
--- a/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
@@ -26,7 +26,6 @@ void
test(unsigned n, charT c)
{
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
- typedef typename S::traits_type T;
typedef typename S::allocator_type A;
S s2(n, c);
LIBCPP_ASSERT(s2.__invariants());
@@ -42,7 +41,6 @@ void
test(unsigned n, charT c, const A& a)
{
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
- typedef typename S::traits_type T;
S s2(n, c, a);
LIBCPP_ASSERT(s2.__invariants());
assert(s2.size() == n);
@@ -58,7 +56,6 @@ test(Tp n, Tp c)
{
typedef char charT;
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
- typedef typename S::traits_type T;
typedef typename S::allocator_type A;
S s2(n, c);
LIBCPP_ASSERT(s2.__invariants());
@@ -75,7 +72,6 @@ test(Tp n, Tp c, const A& a)
{
typedef char charT;
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
- typedef typename S::traits_type T;
S s2(n, c, a);
LIBCPP_ASSERT(s2.__invariants());
assert(s2.size() == static_cast<std::size_t>(n));
@@ -89,7 +85,6 @@ int main()
{
{
typedef test_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test(0, 'a');
test(0, 'a', A(2));
@@ -109,7 +104,6 @@ int main()
#if TEST_STD_VER >= 11
{
typedef min_allocator<char> A;
- typedef std::basic_string<char, std::char_traits<char>, A> S;
test(0, 'a');
test(0, 'a', A());
diff --git a/test/std/strings/basic.string/string.cons/substr.pass.cpp b/test/std/strings/basic.string/string.cons/substr.pass.cpp
index 4fd974273de9..13a9a4b96aab 100644
--- a/test/std/strings/basic.string/string.cons/substr.pass.cpp
+++ b/test/std/strings/basic.string/string.cons/substr.pass.cpp
@@ -98,7 +98,6 @@ void
test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
{
typedef typename S::traits_type T;
- typedef typename S::allocator_type A;
if (pos <= str.size())
{
diff --git a/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp b/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
index dac8860f9a64..b464291d4c5d 100644
--- a/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
+++ b/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
@@ -204,4 +204,20 @@ int main()
assert(s == "ABCD");
}
+ { // test with a move iterator that returns char&&
+ typedef forward_iterator<const char*> It;
+ typedef std::move_iterator<It> MoveIt;
+ const char p[] = "ABCD";
+ std::string s;
+ s.append(MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
+ assert(s == "ABCD");
+ }
+ { // test with a move iterator that returns char&&
+ typedef const char* It;
+ typedef std::move_iterator<It> MoveIt;
+ const char p[] = "ABCD";
+ std::string s;
+ s.append(MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
+ assert(s == "ABCD");
+ }
}
diff --git a/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp b/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
index e5ce8e51e1d6..2c8b6e4a1882 100644
--- a/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
+++ b/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
@@ -188,10 +188,35 @@ int main()
{ // test assigning a different type
typedef std::string S;
- const uint8_t p[] = "ABCD";
+ const uint8_t p[] = "ABCD";
- S s;
- s.insert(s.begin(), p, p + 4);
- assert(s == "ABCD");
+ S s;
+ s.insert(s.begin(), p, p + 4);
+ assert(s == "ABCD");
}
+
+ { // test with a move iterator that returns char&&
+ typedef input_iterator<const char*> It;
+ typedef std::move_iterator<It> MoveIt;
+ const char p[] = "ABCD";
+ std::string s;
+ s.insert(s.begin(), MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
+ assert(s == "ABCD");
+ }
+ { // test with a move iterator that returns char&&
+ typedef forward_iterator<const char*> It;
+ typedef std::move_iterator<It> MoveIt;
+ const char p[] = "ABCD";
+ std::string s;
+ s.insert(s.begin(), MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
+ assert(s == "ABCD");
+ }
+ { // test with a move iterator that returns char&&
+ typedef const char* It;
+ typedef std::move_iterator<It> MoveIt;
+ const char p[] = "ABCD";
+ std::string s;
+ s.insert(s.begin(), MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
+ assert(s == "ABCD");
+ }
}
diff --git a/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp b/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
index 840b7614f482..dbf5f5b64446 100644
--- a/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
@@ -29,16 +29,22 @@ test(S s, typename S::size_type pos1, typename S::size_type n1,
SV sv, typename S::size_type pos2, typename S::size_type n2,
S expected)
{
+ typedef typename S::size_type SizeT;
static_assert((!std::is_same<S, SV>::value), "");
- const typename S::size_type old_size = s.size();
+
+ // String and string_view may not always share the same size type,
+ // but both types should have the same size (ex. int vs long)
+ static_assert(sizeof(SizeT) == sizeof(typename SV::size_type), "");
+
+ const SizeT old_size = s.size();
S s0 = s;
if (pos1 <= old_size && pos2 <= sv.size())
{
s.replace(pos1, n1, sv, pos2, n2);
LIBCPP_ASSERT(s.__invariants());
assert(s == expected);
- typename S::size_type xlen = std::min(n1, old_size - pos1);
- typename S::size_type rlen = std::min(n2, sv.size() - pos2);
+ SizeT xlen = std::min<SizeT>(n1, old_size - pos1);
+ SizeT rlen = std::min<SizeT>(n2, sv.size() - pos2);
assert(s.size() == old_size - xlen + rlen);
}
#ifndef TEST_HAS_NO_EXCEPTIONS
@@ -64,16 +70,17 @@ test_npos(S s, typename S::size_type pos1, typename S::size_type n1,
SV sv, typename S::size_type pos2,
S expected)
{
+ typedef typename S::size_type SizeT;
static_assert((!std::is_same<S, SV>::value), "");
- const typename S::size_type old_size = s.size();
+ const SizeT old_size = s.size();
S s0 = s;
if (pos1 <= old_size && pos2 <= sv.size())
{
s.replace(pos1, n1, sv, pos2);
LIBCPP_ASSERT(s.__invariants());
assert(s == expected);
- typename S::size_type xlen = std::min(n1, old_size - pos1);
- typename S::size_type rlen = std::min(S::npos, sv.size() - pos2);
+ SizeT xlen = std::min<SizeT>(n1, old_size - pos1);
+ SizeT rlen = std::min<SizeT>(S::npos, sv.size() - pos2);
assert(s.size() == old_size - xlen + rlen);
}
#ifndef TEST_HAS_NO_EXCEPTIONS
diff --git a/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
index 757d5eeb2dc3..88c1bee32512 100644
--- a/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
@@ -59,10 +59,12 @@ int main()
typedef std::string C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
#if TEST_STD_VER >= 14
diff --git a/test/std/strings/basic.string/traits_mismatch.fail.cpp b/test/std/strings/basic.string/traits_mismatch.fail.cpp
new file mode 100644
index 000000000000..1d54238ae0c0
--- /dev/null
+++ b/test/std/strings/basic.string/traits_mismatch.fail.cpp
@@ -0,0 +1,18 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+// The strings's value type must be the same as the traits's char_type
+
+#include <string>
+
+int main()
+{
+ std::basic_string<char, std::char_traits<wchar_t>> s;
+}
diff --git a/test/std/strings/string.classes/typedefs.pass.cpp b/test/std/strings/string.classes/typedefs.pass.cpp
index 11ee6c8a1215..3aba1c3f15dd 100644
--- a/test/std/strings/string.classes/typedefs.pass.cpp
+++ b/test/std/strings/string.classes/typedefs.pass.cpp
@@ -18,13 +18,14 @@
// typedef basic_string<wchar_t> wstring;
#include <string>
+#include <type_traits>
int main()
{
- typedef std::string test1;
- typedef std::wstring test2;
+ static_assert((std::is_same<std::string, std::basic_string<char> >::value), "");
+ static_assert((std::is_same<std::wstring, std::basic_string<wchar_t> >::value), "");
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
- typedef std::u16string test3;
- typedef std::u32string test4;
+ static_assert((std::is_same<std::u16string, std::basic_string<char16_t> >::value), "");
+ static_assert((std::is_same<std::u32string, std::basic_string<char32_t> >::value), "");
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
}
diff --git a/test/std/strings/string.conversions/stof.pass.cpp b/test/std/strings/string.conversions/stof.pass.cpp
index 1e17e1d3abdd..aeef0ddfbc78 100644
--- a/test/std/strings/string.conversions/stof.pass.cpp
+++ b/test/std/strings/string.conversions/stof.pass.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stol.pass.cpp b/test/std/strings/string.conversions/stol.pass.cpp
index 457cf0a76997..f01bbf8ce29e 100644
--- a/test/std/strings/string.conversions/stol.pass.cpp
+++ b/test/std/strings/string.conversions/stol.pass.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoll.pass.cpp b/test/std/strings/string.conversions/stoll.pass.cpp
index ca8412aeb758..b823ab742626 100644
--- a/test/std/strings/string.conversions/stoll.pass.cpp
+++ b/test/std/strings/string.conversions/stoll.pass.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoul.pass.cpp b/test/std/strings/string.conversions/stoul.pass.cpp
index 1acdf116458f..5e1f696cb6b7 100644
--- a/test/std/strings/string.conversions/stoul.pass.cpp
+++ b/test/std/strings/string.conversions/stoul.pass.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <string>
diff --git a/test/std/strings/string.conversions/stoull.pass.cpp b/test/std/strings/string.conversions/stoull.pass.cpp
index e63679eed2f4..70563d9be51f 100644
--- a/test/std/strings/string.conversions/stoull.pass.cpp
+++ b/test/std/strings/string.conversions/stoull.pass.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <string>
diff --git a/test/std/strings/string.view/string.view.access/at.pass.cpp b/test/std/strings/string.view/string.view.access/at.pass.cpp
index 0f1636d3f94f..6df879898f44 100644
--- a/test/std/strings/string.view/string.view.access/at.pass.cpp
+++ b/test/std/strings/string.view/string.view.access/at.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-// NOTE: Older versions of clang have a bug where they fail to evalute
+// NOTE: Older versions of clang have a bug where they fail to evaluate
// string_view::at as a constant expression.
// XFAIL: clang-3.4, clang-3.3
diff --git a/test/std/strings/string.view/string.view.cons/assign.pass.cpp b/test/std/strings/string.view/string.view.cons/assign.pass.cpp
new file mode 100644
index 000000000000..b7348ea226cf
--- /dev/null
+++ b/test/std/strings/string.view/string.view.cons/assign.pass.cpp
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+
+// <string_view>
+
+// constexpr basic_string_view& operator=(const basic_string_view &) noexcept = default;
+
+#include <string_view>
+#include <cassert>
+
+#include "test_macros.h"
+
+template<typename T>
+#if TEST_STD_VER > 11
+constexpr
+#endif
+bool test (T sv0)
+ {
+ T sv1;
+ sv1 = sv0;
+// We can't just say "sv0 == sv1" here because string_view::compare
+// isn't constexpr until C++17, and we want to support back to C++14
+ return sv0.size() == sv1.size() && sv0.data() == sv1.data();
+ }
+
+int main () {
+
+ assert( test<std::string_view> ( "1234"));
+#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
+ assert( test<std::u16string_view> (u"1234"));
+ assert( test<std::u32string_view> (U"1234"));
+#endif
+ assert( test<std::wstring_view> (L"1234"));
+
+#if TEST_STD_VER > 11
+ static_assert( test<std::string_view> ({ "abc", 3}), "");
+#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
+ static_assert( test<std::u16string_view> ({u"abc", 3}), "");
+ static_assert( test<std::u32string_view> ({U"abc", 3}), "");
+#endif
+ static_assert( test<std::wstring_view> ({L"abc", 3}), "");
+#endif
+}
diff --git a/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp b/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp
new file mode 100644
index 000000000000..7dd99d9c4405
--- /dev/null
+++ b/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: libcpp-no-deduction-guides
+
+// <string_view>
+
+// Test that the constructors offered by std::basic_string_view are formulated
+// so they're compatible with implicit deduction guides.
+
+#include <string_view>
+#include <cassert>
+
+#include "test_macros.h"
+#include "constexpr_char_traits.hpp"
+
+// Overloads
+// ---------------
+// (1) basic_string_view() - NOT TESTED
+// (2) basic_string_view(const basic_string_view&)
+// (3) basic_string_view(const CharT*, size_type)
+// (4) basic_string_view(const CharT*)
+int main()
+{
+ { // Testing (1)
+ // Nothing TODO. Cannot deduce without any arguments.
+ }
+ { // Testing (2)
+ const std::string_view sin("abc");
+ std::basic_string_view s(sin);
+ ASSERT_SAME_TYPE(decltype(s), std::string_view);
+ assert(s == "abc");
+
+ using WSV = std::basic_string_view<wchar_t, constexpr_char_traits<wchar_t>>;
+ const WSV win(L"abcdef");
+ std::basic_string_view w(win);
+ ASSERT_SAME_TYPE(decltype(w), WSV);
+ assert(w == L"abcdef");
+ }
+ { // Testing (3)
+ std::basic_string_view s("abc", 2);
+ ASSERT_SAME_TYPE(decltype(s), std::string_view);
+ assert(s == "ab");
+
+ std::basic_string_view w(L"abcdef", 4);
+ ASSERT_SAME_TYPE(decltype(w), std::wstring_view);
+ assert(w == L"abcd");
+ }
+ { // Testing (4)
+ std::basic_string_view s("abc");
+ ASSERT_SAME_TYPE(decltype(s), std::string_view);
+ assert(s == "abc");
+
+ std::basic_string_view w(L"abcdef");
+ ASSERT_SAME_TYPE(decltype(w), std::wstring_view);
+ assert(w == L"abcdef");
+ }
+}
diff --git a/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp b/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp
new file mode 100644
index 000000000000..2e9ebcb4c037
--- /dev/null
+++ b/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <string_view>
+
+// Test that <string_view> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <string_view>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::string_view>();
+ test_hash_enabled_for_type<std::wstring_view>();
+#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+ test_hash_enabled_for_type<std::u16string_view>();
+ test_hash_enabled_for_type<std::u32string_view>();
+#endif
+ }
+}
diff --git a/test/std/strings/string.view/string.view.hash/string_view.pass.cpp b/test/std/strings/string.view/string.view.hash/string_view.pass.cpp
index 63099e2c8864..53c3d261d882 100644
--- a/test/std/strings/string.view/string.view.hash/string_view.pass.cpp
+++ b/test/std/strings/string.view/string.view.hash/string_view.pass.cpp
@@ -19,29 +19,41 @@
// Not very portable
#include <string_view>
+#include <string>
#include <cassert>
#include <type_traits>
+#include "test_macros.h"
+
using std::string_view;
-template <class T>
+template <class SV>
void
test()
{
- typedef std::hash<T> H;
- static_assert((std::is_same<typename H::argument_type, T>::value), "" );
+ typedef std::hash<SV> H;
+ static_assert((std::is_same<typename H::argument_type, SV>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
- H h;
-// std::string g1 = "1234567890";
-// std::string g2 = "1234567891";
- typedef typename T::value_type char_type;
+
+ typedef typename SV::value_type char_type;
+ typedef std::basic_string<char_type> String;
+ typedef std::hash<String> SH;
+ ASSERT_NOEXCEPT(H()(SV()));
+
char_type g1 [ 10 ];
char_type g2 [ 10 ];
for ( int i = 0; i < 10; ++i )
g1[i] = g2[9-i] = static_cast<char_type>('0' + i);
- T s1(g1, 10);
- T s2(g2, 10);
+ H h;
+ SH sh;
+ SV s1(g1, 10);
+ String ss1(s1);
+ SV s2(g2, 10);
+ String ss2(s2);
+ assert(h(s1) == h(s1));
assert(h(s1) != h(s2));
+ assert(sh(ss1) == h(s1));
+ assert(sh(ss2) == h(s2));
}
int main()
diff --git a/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp b/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp
index 381f792e5ce0..16a4da882739 100644
--- a/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp
+++ b/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp
@@ -58,4 +58,23 @@ int main()
test(u16string_view{u"123"});
test(u32string_view{U"123"});
#endif
+
+#if TEST_STD_VER > 14
+ {
+ constexpr string_view sv { "123", 3 };
+ constexpr u16string_view u16sv {u"123", 3 };
+ constexpr u32string_view u32sv {U"123", 3 };
+ constexpr wstring_view wsv {L"123", 3 };
+
+ static_assert ( *sv.rbegin() == sv[2], "" );
+ static_assert ( *u16sv.rbegin() == u16sv[2], "" );
+ static_assert ( *u32sv.rbegin() == u32sv[2], "" );
+ static_assert ( *wsv.rbegin() == wsv[2], "" );
+
+ static_assert ( *sv.crbegin() == sv[2], "" );
+ static_assert ( *u16sv.crbegin() == u16sv[2], "" );
+ static_assert ( *u32sv.crbegin() == u32sv[2], "" );
+ static_assert ( *wsv.crbegin() == wsv[2], "" );
+ }
+#endif
}
diff --git a/test/std/strings/string.view/string.view.iterators/rend.pass.cpp b/test/std/strings/string.view/string.view.iterators/rend.pass.cpp
index ca529fb708dc..08f9e5a7755b 100644
--- a/test/std/strings/string.view/string.view.iterators/rend.pass.cpp
+++ b/test/std/strings/string.view/string.view.iterators/rend.pass.cpp
@@ -66,4 +66,23 @@ int main()
test(u16string_view{u"123"});
test(u32string_view{U"123"});
#endif
+
+#if TEST_STD_VER > 14
+ {
+ constexpr string_view sv { "123", 3 };
+ constexpr u16string_view u16sv {u"123", 3 };
+ constexpr u32string_view u32sv {U"123", 3 };
+ constexpr wstring_view wsv {L"123", 3 };
+
+ static_assert ( *--sv.rend() == sv[0], "" );
+ static_assert ( *--u16sv.rend() == u16sv[0], "" );
+ static_assert ( *--u32sv.rend() == u32sv[0], "" );
+ static_assert ( *--wsv.rend() == wsv[0], "" );
+
+ static_assert ( *--sv.crend() == sv[0], "" );
+ static_assert ( *--u16sv.crend() == u16sv[0], "" );
+ static_assert ( *--u32sv.crend() == u32sv[0], "" );
+ static_assert ( *--wsv.crend() == wsv[0], "" );
+ }
+#endif
}
diff --git a/test/std/strings/string.view/string_view.literals/literal.pass.cpp b/test/std/strings/string.view/string_view.literals/literal.pass.cpp
index 9fb128ab0f55..710009cc51ee 100644
--- a/test/std/strings/string.view/string_view.literals/literal.pass.cpp
+++ b/test/std/strings/string.view/string_view.literals/literal.pass.cpp
@@ -48,7 +48,7 @@ int main()
Lfoo = L"ABC"sv; assert(Lfoo == L"ABC"); assert(Lfoo == std::wstring_view ( L"ABC"));
ufoo = u"ABC"sv; assert(ufoo == u"ABC"); assert(ufoo == std::u16string_view( u"ABC"));
Ufoo = U"ABC"sv; assert(Ufoo == U"ABC"); assert(Ufoo == std::u32string_view( U"ABC"));
-
+
static_assert( "ABC"sv.size() == 3, "");
static_assert(u8"ABC"sv.size() == 3, "");
static_assert( L"ABC"sv.size() == 3, "");
diff --git a/test/std/strings/string.view/nothing_to_do.pass.cpp b/test/std/strings/string.view/traits_mismatch.fail.cpp
index 353dd98f415e..6cd15e6a67ba 100644
--- a/test/std/strings/string.view/nothing_to_do.pass.cpp
+++ b/test/std/strings/string.view/traits_mismatch.fail.cpp
@@ -7,6 +7,12 @@
//
//===----------------------------------------------------------------------===//
+// <string_view>
+// The string_views's value type must be the same as the traits's char_type
+
#include <string_view>
-int main () {}
+int main()
+{
+ std::basic_string_view<char, std::char_traits<wchar_t>> s;
+}
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 a44f8af7d41b..cc2d978d2c2b 100644
--- a/test/std/thread/futures/futures.future_error/what.pass.cpp
+++ b/test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -12,8 +12,8 @@
// 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-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=x86_64-apple-darwin13
// <future>
diff --git a/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp b/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp
index e0c6e15d98d5..e986885c0c71 100644
--- a/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp
+++ b/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp
@@ -6,7 +6,8 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-//
+
+// UNSUPPORTED: c++98, c++03
// UNSUPPORTED: libcpp-has-no-threads, libcpp-no-exceptions
// <future>
@@ -19,8 +20,6 @@
#include <memory>
#include <cassert>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
struct A
{
A() {}
@@ -28,11 +27,8 @@ struct A
A(A&&) {throw 9;}
};
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unique_ptr<int> T;
T i(new int(3));
@@ -65,5 +61,4 @@ int main()
assert(j == 9);
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp b/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
index 8f3b76865e2a..05675725bf43 100644
--- a/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
+++ b/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <future>
@@ -19,23 +19,17 @@
#include <memory>
#include <cassert>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
void func(std::promise<std::unique_ptr<int>> p)
{
p.set_value_at_thread_exit(std::unique_ptr<int>(new int(5)));
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::promise<std::unique_ptr<int>> p;
std::future<std::unique_ptr<int>> f = p.get_future();
std::thread(func, std::move(p)).detach();
assert(*f.get() == 5);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp b/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp
index 39784876b8c3..7cac21d48aef 100644
--- a/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp
+++ b/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp
@@ -69,7 +69,7 @@ int main()
p(3, 'a');
assert(f.get() == 105.0);
assert(A::n_copies > 0);
- assert(A::n_moves > 0);
+ assert(A::n_moves >= 0);
}
assert(test_alloc_base::alloc_count == 0);
A::n_copies = 0;
diff --git a/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp b/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp
index 8d38b81f0cda..4a790b06cfdf 100644
--- a/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp
+++ b/test/std/thread/futures/futures.unique_future/move_assign.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <future>
@@ -20,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
std::promise<T> p;
@@ -72,5 +71,4 @@ int main()
assert(!f0.valid());
assert(!f.valid());
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp b/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp
index e12c920886fa..14e2eb416961 100644
--- a/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp
+++ b/test/std/thread/futures/futures.unique_future/move_ctor.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <future>
@@ -20,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
std::promise<T> p;
@@ -66,5 +65,4 @@ int main()
assert(!f0.valid());
assert(!f.valid());
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/futures/futures.unique_future/share.pass.cpp b/test/std/thread/futures/futures.unique_future/share.pass.cpp
index ef011d8df752..9b8667e538cc 100644
--- a/test/std/thread/futures/futures.unique_future/share.pass.cpp
+++ b/test/std/thread/futures/futures.unique_future/share.pass.cpp
@@ -25,14 +25,16 @@ int main()
typedef int T;
std::promise<T> p;
std::future<T> f0 = p.get_future();
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(f.valid());
}
{
typedef int T;
std::future<T> f0;
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(!f.valid());
}
@@ -40,14 +42,16 @@ int main()
typedef int& T;
std::promise<T> p;
std::future<T> f0 = p.get_future();
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(f.valid());
}
{
typedef int& T;
std::future<T> f0;
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(!f.valid());
}
@@ -55,14 +59,16 @@ int main()
typedef void T;
std::promise<T> p;
std::future<T> f0 = p.get_future();
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(f.valid());
}
{
typedef void T;
std::future<T> f0;
- std::shared_future<T> f = std::move(f0.share());
+ static_assert( noexcept(f0.share()), "");
+ std::shared_future<T> f = f0.share();
assert(!f0.valid());
assert(!f.valid());
}
diff --git a/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp b/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
index d60e42918860..de225fe78384 100644
--- a/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
+++ b/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
+// REQUIRES: libcpp-has-thread-api-pthread
// notify_all_at_thread_exit(...) requires move semantics to transfer the
// unique_lock.
diff --git a/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp b/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
index a2b7061c2546..71cbc94a70a4 100644
--- a/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
+++ b/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
@@ -24,8 +24,8 @@
// -----------------------------------------------------------------------------
// Overview
-// Check that std::terminate is called if wait(...) fails to meet it's post
-// conditions. This can happens when reacquiring the mutex throws
+// Check that std::terminate is called if wait(...) fails to meet its post
+// conditions. This can happen when reacquiring the mutex throws
// an exception.
//
// The following methods are tested within this file
@@ -37,7 +37,7 @@
// 6. void wait_until(Lock& lock, TimePoint, Pred);
//
// Plan
-// 1 Create a mutex type, 'ThrowingMutex', that throws when the lock is aquired
+// 1 Create a mutex type, 'ThrowingMutex', that throws when the lock is acquired
// for the *second* time.
//
// 2 Replace the terminate handler with one that exits with a '0' exit code.
diff --git a/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp b/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
index 46d04cdac350..245c480885b8 100644
--- a/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
@@ -9,10 +9,10 @@
//
// UNSUPPORTED: libcpp-has-no-threads
-// This test hangs forever when built against libstdc++. In order to allow
+// This test hangs forever when built against libstdc++ and MSVC. In order to allow
// validation of the test suite against other STLs we have to mark it
// unsupported.
-// UNSUPPORTED: libstdc++
+// UNSUPPORTED: libstdc++, msvc
// <mutex>
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 a15405fcd98b..fffd087ee877 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
@@ -15,11 +15,16 @@
// explicit lock_guard(mutex_type& m);
+// template<class _Mutex> lock_guard(lock_guard<_Mutex>)
+// -> lock_guard<_Mutex>; // C++17
+
#include <mutex>
#include <thread>
#include <cstdlib>
#include <cassert>
+#include "test_macros.h"
+
std::mutex m;
typedef std::chrono::system_clock Clock;
@@ -47,4 +52,9 @@ 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), "" );
+#endif
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_cxx03.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_cxx03.pass.cpp
deleted file mode 100644
index 0ad16e2856fd..000000000000
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex_cxx03.pass.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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: libcpp-has-no-threads
-// <mutex>
-
-// template <class ...Mutex> class lock_guard;
-
-// Test that the variadic lock guard implementation compiles in all standard
-// dialects, including C++03, even though it is forward declared using
-// variadic templates.
-
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#include "mutex.pass.cpp" // Use the existing non-variadic test
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_adopt_lock.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp
index 81fc0d368f6a..78165383a158 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_adopt_lock.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp
@@ -8,18 +8,17 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class ...Mutex> class lock_guard;
+// template <class ...Mutex> class scoped_lock;
-// lock_guard(Mutex&..., adopt_lock_t);
+// scoped_lock(Mutex&..., adopt_lock_t);
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
#include <cassert>
+#include "test_macros.h"
struct TestMutex {
bool locked = false;
@@ -36,12 +35,22 @@ struct TestMutex {
int main()
{
{
- using LG = std::lock_guard<>;
+ using LG = std::scoped_lock<>;
LG lg(std::adopt_lock);
}
{
+ TestMutex m1;
+ using LG = std::scoped_lock<TestMutex>;
+ m1.lock();
+ {
+ LG lg(m1, std::adopt_lock);
+ assert(m1.locked);
+ }
+ assert(!m1.locked);
+ }
+ {
TestMutex m1, m2;
- using LG = std::lock_guard<TestMutex, TestMutex>;
+ using LG = std::scoped_lock<TestMutex, TestMutex>;
m1.lock(); m2.lock();
{
LG lg(m1, m2, std::adopt_lock);
@@ -51,7 +60,7 @@ int main()
}
{
TestMutex m1, m2, m3;
- using LG = std::lock_guard<TestMutex, TestMutex, TestMutex>;
+ using LG = std::scoped_lock<TestMutex, TestMutex, TestMutex>;
m1.lock(); m2.lock(); m3.lock();
{
LG lg(m1, m2, m3, std::adopt_lock);
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_assign.fail.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp
index 1b4c9d4bfd5d..a05472935526 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_assign.fail.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/assign.fail.cpp
@@ -8,17 +8,16 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class ...Mutex> class lock_guard;
+// template <class ...Mutex> class scoped_lock;
-// lock_guard& operator=(lock_guard const&) = delete;
+// scoped_lock& operator=(scoped_lock const&) = delete;
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
+#include "test_macros.h"
int main()
{
@@ -26,18 +25,24 @@ int main()
M m0, m1, m2;
M om0, om1, om2;
{
- using LG = std::lock_guard<>;
+ using LG = std::scoped_lock<>;
LG lg1, lg2;
lg1 = lg2; // expected-error{{overload resolution selected deleted operator '='}}
}
{
- using LG = std::lock_guard<M, M>;
+ using LG = std::scoped_lock<M>;
+ LG lg1(m0);
+ LG lg2(om0);
+ lg1 = lg2; // expected-error{{overload resolution selected deleted operator '='}}
+ }
+ {
+ using LG = std::scoped_lock<M, M>;
LG lg1(m0, m1);
LG lg2(om0, om1);
lg1 = lg2; // expected-error{{overload resolution selected deleted operator '='}}
}
{
- using LG = std::lock_guard<M, M, M>;
+ using LG = std::scoped_lock<M, M, M>;
LG lg1(m0, m1, m2);
LG lg2(om0, om1, om2);
lg1 = lg2; // expected-error{{overload resolution selected deleted operator '='}}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_copy.fail.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp
index c7fd0e94b771..5075a4268095 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_copy.fail.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/copy.fail.cpp
@@ -8,34 +8,38 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class ...Mutex> class lock_guard;
+// template <class ...Mutex> class scoped_lock;
-// lock_guard(lock_guard const&) = delete;
+// scoped_lock(scoped_lock const&) = delete;
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
+#include "test_macros.h"
int main()
{
using M = std::mutex;
M m0, m1, m2;
{
- using LG = std::lock_guard<>;
+ using LG = std::scoped_lock<>;
const LG Orig;
LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
}
{
- using LG = std::lock_guard<M, M>;
+ using LG = std::scoped_lock<M>;
+ const LG Orig(m0);
+ LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
+ }
+ {
+ using LG = std::scoped_lock<M, M>;
const LG Orig(m0, m1);
LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
}
{
- using LG = std::lock_guard<M, M, M>;
+ using LG = std::scoped_lock<M, M, M>;
const LG Orig(m0, m1, m2);
LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.fail.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp
index 1eef7e268fb2..7bb4673265cf 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.fail.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.fail.cpp
@@ -8,17 +8,16 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class ...Mutex> class lock_guard;
+// template <class ...Mutex> class scoped_lock;
-// explicit lock_guard(Mutex&...);
+// explicit scoped_lock(Mutex&...);
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
+#include "test_macros.h"
template <class LG>
void test_conversion(LG) {}
@@ -29,19 +28,25 @@ int main()
M m0, m1, m2;
M n0, n1, n2;
{
- using LG = std::lock_guard<>;
+ using LG = std::scoped_lock<>;
LG lg = {}; // expected-error{{chosen constructor is explicit in copy-initialization}}
test_conversion<LG>({}); // expected-error{{no matching function for call}}
((void)lg);
}
{
- using LG = std::lock_guard<M, M>;
+ using LG = std::scoped_lock<M>;
+ LG lg = {m0}; // expected-error{{chosen constructor is explicit in copy-initialization}}
+ test_conversion<LG>({n0}); // expected-error{{no matching function for call}}
+ ((void)lg);
+ }
+ {
+ using LG = std::scoped_lock<M, M>;
LG lg = {m0, m1}; // expected-error{{chosen constructor is explicit in copy-initialization}}
test_conversion<LG>({n0, n1}); // expected-error{{no matching function for call}}
((void)lg);
}
{
- using LG = std::lock_guard<M, M, M>;
+ using LG = std::scoped_lock<M, M, M>;
LG lg = {m0, m1, m2}; // expected-error{{chosen constructor is explicit in copy-initialization}}
test_conversion<LG>({n0, n1, n2}); // expected-error{{no matching function for call}}
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp
index 8d83ddf98c6d..ef39bbcc5e88 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_mutex.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp
@@ -8,19 +8,16 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class ...Mutex> class lock_guard;
+// template <class ...Mutex> class scoped_lock;
-// explicit lock_guard(mutex_type& m);
+// explicit scoped_lock(mutex_type& m);
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
#include <cassert>
-
#include "test_macros.h"
struct TestMutex {
@@ -68,11 +65,20 @@ struct TestMutexThrows {
int main()
{
{
- using LG = std::lock_guard<>;
+ using LG = std::scoped_lock<>;
LG lg;
}
{
- using LG = std::lock_guard<TestMutex, TestMutex>;
+ using LG = std::scoped_lock<TestMutex>;
+ TestMutex m1;
+ {
+ LG lg(m1);
+ assert(m1.locked);
+ }
+ assert(!m1.locked);
+ }
+ {
+ using LG = std::scoped_lock<TestMutex, TestMutex>;
TestMutex m1, m2;
{
LG lg(m1, m2);
@@ -81,7 +87,7 @@ int main()
assert(!m1.locked && !m2.locked);
}
{
- using LG = std::lock_guard<TestMutex, TestMutex, TestMutex>;
+ using LG = std::scoped_lock<TestMutex, TestMutex, TestMutex>;
TestMutex m1, m2, m3;
{
LG lg(m1, m2, m3);
@@ -92,7 +98,18 @@ int main()
#if !defined(TEST_HAS_NO_EXCEPTIONS)
{
using MT = TestMutexThrows;
- using LG = std::lock_guard<MT, MT>;
+ using LG = std::scoped_lock<MT>;
+ MT m1;
+ m1.throws_on_lock = true;
+ try {
+ LG lg(m1);
+ assert(false);
+ } catch (int) {}
+ assert(!m1.locked);
+ }
+ {
+ using MT = TestMutexThrows;
+ using LG = std::scoped_lock<MT, MT>;
MT m1, m2;
m1.throws_on_lock = true;
try {
@@ -103,7 +120,7 @@ int main()
}
{
using MT = TestMutexThrows;
- using LG = std::lock_guard<MT, MT, MT>;
+ using LG = std::scoped_lock<MT, MT, MT>;
MT m1, m2, m3;
m2.throws_on_lock = true;
try {
@@ -113,4 +130,26 @@ int main()
assert(!m1.locked && !m2.locked && !m3.locked);
}
#endif
+
+#ifdef __cpp_deduction_guides
+ {
+ TestMutex m1, m2, m3;
+ {
+ std::scoped_lock sl{};
+ static_assert((std::is_same<decltype(sl), std::scoped_lock<>>::value), "" );
+ }
+ {
+ std::scoped_lock sl{m1};
+ static_assert((std::is_same<decltype(sl), std::scoped_lock<decltype(m1)>>::value), "" );
+ }
+ {
+ std::scoped_lock sl{m1, m2};
+ static_assert((std::is_same<decltype(sl), std::scoped_lock<decltype(m1), decltype(m2)>>::value), "" );
+ }
+ {
+ 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.guard/variadic_types.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
index 600399d9793e..6af3c6c952d7 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/variadic_types.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/types.pass.cpp
@@ -8,22 +8,21 @@
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++98, c++03
+// UNSUPPORTED: c++98, c++03, c++11, c++14
// <mutex>
-// template <class Mutex>
-// class lock_guard
+// template <class Mutex...>
+// class scoped_lock
// {
// public:
-// typedef Mutex mutex_type;
+// typedef Mutex mutex_type; // only if sizeof...(Mutex) == 1
// ...
// };
-// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD
-#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#include <mutex>
#include <type_traits>
+#include "test_macros.h"
struct NAT {};
@@ -41,39 +40,39 @@ constexpr bool has_mutex_type() {
int main()
{
{
- using T = std::lock_guard<>;
+ using T = std::scoped_lock<>;
static_assert(!has_mutex_type<T>(), "");
}
{
using M1 = std::mutex;
- using T = std::lock_guard<M1>;
+ using T = std::scoped_lock<M1>;
static_assert(std::is_same<T::mutex_type, M1>::value, "");
}
{
using M1 = std::recursive_mutex;
- using T = std::lock_guard<M1>;
+ using T = std::scoped_lock<M1>;
static_assert(std::is_same<T::mutex_type, M1>::value, "");
}
{
using M1 = std::mutex;
using M2 = std::recursive_mutex;
- using T = std::lock_guard<M1, M2>;
+ using T = std::scoped_lock<M1, M2>;
static_assert(!has_mutex_type<T>(), "");
}
{
using M1 = std::mutex;
using M2 = std::recursive_mutex;
- using T = std::lock_guard<M1, M1, M2>;
+ using T = std::scoped_lock<M1, M1, M2>;
static_assert(!has_mutex_type<T>(), "");
}
{
using M1 = std::mutex;
- using T = std::lock_guard<M1, M1>;
+ using T = std::scoped_lock<M1, M1>;
static_assert(!has_mutex_type<T>(), "");
}
{
using M1 = std::recursive_mutex;
- using T = std::lock_guard<M1, M1, M1>;
+ using T = std::scoped_lock<M1, M1, M1>;
static_assert(!has_mutex_type<T>(), "");
}
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
index f9a537085c30..ac338064d1fd 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
@@ -18,6 +18,9 @@
// explicit shared_lock(mutex_type& m);
+// template<class _Mutex> shared_lock(shared_lock<_Mutex>)
+// -> shared_lock<_Mutex>; // C++17
+
#include <shared_mutex>
#include <thread>
#include <vector>
@@ -92,4 +95,9 @@ int main()
t.join();
q.join();
}
+
+#ifdef __cpp_deduction_guides
+ std::shared_lock sl(m);
+ static_assert((std::is_same<decltype(sl), std::shared_lock<decltype(m)>>::value), "" );
+#endif
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp
index e5db685e46e7..6f17383298fd 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <mutex>
@@ -21,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::mutex M;
M m0;
@@ -46,5 +45,4 @@ int main()
assert(lk0.mutex() == nullptr);
assert(lk0.owns_lock() == false);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp
index 427deabc5a59..04aa79673431 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <mutex>
@@ -21,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::mutex M;
M m;
@@ -42,5 +41,4 @@ int main()
assert(lk0.mutex() == nullptr);
assert(lk0.owns_lock() == false);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp
index 1f7217a8300e..ca8bc6982253 100644
--- a/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp
@@ -15,11 +15,16 @@
// explicit unique_lock(mutex_type& m);
+// template<class _Mutex> unique_lock(unique_lock<_Mutex>)
+// -> unique_lock<_Mutex>; // C++17
+
#include <mutex>
#include <thread>
#include <cstdlib>
#include <cassert>
+#include "test_macros.h"
+
std::mutex m;
typedef std::chrono::system_clock Clock;
@@ -47,4 +52,9 @@ int main()
std::this_thread::sleep_for(ms(250));
m.unlock();
t.join();
+
+#ifdef __cpp_deduction_guides
+ std::unique_lock ul(m);
+ static_assert((std::is_same<decltype(ul), std::unique_lock<decltype(m)>>::value), "" );
+#endif
}
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp
index 2db9430a698d..d3478818c056 100644
--- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <thread>
@@ -44,7 +44,6 @@ bool G::op_run = false;
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
assert(G::n_alive == 0);
assert(!G::op_run);
@@ -61,5 +60,4 @@ int main()
assert(G::n_alive == 0);
assert(G::op_run);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
index 437b42037913..d419b8cc855c 100644
--- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
@@ -106,7 +106,7 @@ public:
// A Each allocation performed during thread construction should be performed
// in the parent thread so that std::terminate is not called if
// std::bad_alloc is thrown by new.
-// B std::threads constructor should properly handle exceptions and not leak
+// B std::thread's constructor should properly handle exceptions and not leak
// memory.
// Plan:
// 1 Create a thread and count the number of allocations, 'N', it performs.
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
index e88304ec8da9..f349e4c56fcb 100644
--- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// <thread>
@@ -53,7 +53,6 @@ bool G::op_run = false;
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
G g;
assert(G::n_alive == 1);
@@ -68,5 +67,4 @@ int main()
assert(G::op_run);
}
assert(G::n_alive == 0);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp
new file mode 100644
index 000000000000..9799467c4529
--- /dev/null
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// 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: libcpp-has-no-threads
+// UNSUPPORTED: c++98, c++03
+
+// <thread>
+
+// Test that <thread> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <thread>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::thread::id>();
+ }
+}
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
index 106c69e2e4a1..4f1491decd31 100644
--- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
@@ -9,7 +9,7 @@
//
// UNSUPPORTED: libcpp-has-no-threads
-// <functional>
+// <thread>
// template <class T>
// struct hash
@@ -23,6 +23,8 @@
#include <thread>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
std::thread::id id1;
@@ -30,6 +32,7 @@ int main()
typedef std::hash<std::thread::id> H;
static_assert((std::is_same<typename H::argument_type, std::thread::id>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
+ ASSERT_NOEXCEPT(H()(id2));
H h;
assert(h(id1) != h(id2));
}
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
index ef3b9302c7a2..dfb187b6cc2d 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
@@ -87,7 +87,6 @@ void test_no_inner_alloc()
void test_with_inner_alloc()
{
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
index 6f31d264280a..9689fb014786 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
@@ -88,7 +88,6 @@ void test_no_inner_alloc()
void test_with_inner_alloc()
{
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
index a761b3288060..92df0f6f2264 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
@@ -87,7 +87,6 @@ void test_no_inner_alloc()
void test_with_inner_alloc()
{
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
index de33eeb2fbda..2b7fe3f641ae 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
@@ -83,7 +83,6 @@ void test_no_inner_alloc()
void test_with_inner_alloc()
{
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp
index 867cc74082e7..8568c7380b6d 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp
@@ -31,7 +31,6 @@
// OUTERMOST_ALLOC_TRAITS(*this)::construct(
// OUTERMOST (*this), p, std::forward<Args>(args)...).
void test_bullet_one() {
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
@@ -41,7 +40,6 @@ void test_bullet_one() {
using Outer = CountingAllocator<T, 1>;
using Inner = CountingAllocator<T, 2>;
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
- using SAInner = std::scoped_allocator_adaptor<Inner>;
static_assert(!std::uses_allocator<T, Outer>::value, "");
static_assert(!std::uses_allocator<T, Inner>::value, "");
T* ptr = (T*)::operator new(sizeof(T));
@@ -66,7 +64,6 @@ void test_bullet_one() {
// true, calls OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
// allocator_arg, inner_allocator(), std::forward<Args>(args)...).
void test_bullet_two() {
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
@@ -76,7 +73,6 @@ void test_bullet_two() {
using Outer = CountingAllocator<T, 1>;
using Inner = CountingAllocator<T, 2>;
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
- using SAInner = std::scoped_allocator_adaptor<Inner>;
static_assert(!std::uses_allocator<T, Outer>::value, "");
static_assert(std::uses_allocator<T, Inner>::value, "");
T* ptr = (T*)::operator new(sizeof(T));
@@ -101,7 +97,6 @@ void test_bullet_two() {
// OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
// std::forward<Args>(args)..., inner_allocator()).
void test_bullet_three() {
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
@@ -111,7 +106,6 @@ void test_bullet_three() {
using Outer = CountingAllocator<T, 1>;
using Inner = CountingAllocator<T, 2>;
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
- using SAInner = std::scoped_allocator_adaptor<Inner>;
static_assert(!std::uses_allocator<T, Outer>::value, "");
static_assert(std::uses_allocator<T, Inner>::value, "");
T* ptr = (T*)::operator new(sizeof(T));
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 65d94fd1e0a4..75dfb0a2e704 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
@@ -11,9 +11,9 @@
// <any>
-// template <class T, class ...Args> emplace(Args&&...);
+// template <class T, class ...Args> T& emplace(Args&&...);
// template <class T, class U, class ...Args>
-// void emplace(initializer_list<U>, Args&&...);
+// T& emplace(initializer_list<U>, Args&&...);
#include <any>
#include <cassert>
@@ -42,7 +42,9 @@ void test_emplace_type() {
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>();
+ auto &v = a.emplace<Type>();
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
assert(Tracked::count == 0);
assert(Type::count == 1);
@@ -56,7 +58,9 @@ void test_emplace_type() {
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>(101);
+ auto &v = a.emplace<Type>(101);
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
assert(Tracked::count == 0);
assert(Type::count == 1);
@@ -70,7 +74,9 @@ void test_emplace_type() {
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>(-1, 42, -1);
+ auto &v = a.emplace<Type>(-1, 42, -1);
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
assert(Tracked::count == 0);
assert(Type::count == 1);
@@ -89,14 +95,20 @@ void test_emplace_type_tracked() {
{
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>();
+ auto &v = a.emplace<Type>();
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
+
assert(Tracked::count == 0);
assertArgsMatch<Type>(a);
}
{
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>(-1, 42, -1);
+ auto &v = a.emplace<Type>(-1, 42, -1);
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
+
assert(Tracked::count == 0);
assertArgsMatch<Type, int, int, int>(a);
}
@@ -104,7 +116,10 @@ void test_emplace_type_tracked() {
{
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>({-1, 42, -1});
+ auto &v = a.emplace<Type>({-1, 42, -1});
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
+
assert(Tracked::count == 0);
assertArgsMatch<Type, std::initializer_list<int>>(a);
}
@@ -112,7 +127,10 @@ void test_emplace_type_tracked() {
int x = 42;
any a(std::in_place_type<Tracked>);
assert(Tracked::count == 1);
- a.emplace<Type>({-1, 42, -1}, x);
+ auto &v = a.emplace<Type>({-1, 42, -1}, x);
+ static_assert( std::is_same_v<Type&, decltype(v)>, "" );
+ assert(&v == std::any_cast<Type>(&a));
+
assert(Tracked::count == 0);
assertArgsMatch<Type, std::initializer_list<int>, int&>(a);
}
diff --git a/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp b/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
index 99cc029971a8..bbc135051ef8 100644
--- a/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
+++ b/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
@@ -25,13 +25,30 @@ using std::any_cast;
int main()
{
any a(1);
- any_cast<int &>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int &&>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int const &>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int const&&>(&a); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int &>(&a); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int &&>(&a); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int const &>(&a); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int const&&>(&a); // expected-note {{requested here}}
+
any const& a2 = a;
- any_cast<int &>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int &&>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int const &>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
- any_cast<int const &&>(&a2); // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int &>(&a2); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int &&>(&a2); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int const &>(&a2); // expected-note {{requested here}}
+
+ // expected-error@any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+ any_cast<int const &&>(&a2); // expected-note {{requested here}}
}
diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
index 5e347c4c5715..943e162172b0 100644
--- a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
+++ b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
@@ -16,7 +16,7 @@
// template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
// unspecified bind(Fn, Types...);
-// https://llvm.org/bugs/show_bug.cgi?id=23141
+// https://bugs.llvm.org/show_bug.cgi?id=23141
#include <functional>
#include <type_traits>
diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp
index ad03e8fb6bb2..a4d502bb800e 100644
--- a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp
+++ b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/copy.pass.cpp
@@ -16,7 +16,7 @@
// template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
// unspecified bind(Fn, Types...);
-// http://llvm.org/bugs/show_bug.cgi?id=16385
+// https://bugs.llvm.org/show_bug.cgi?id=16385
#include <functional>
#include <cmath>
diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
index 180433109f26..a9a38b83cb4e 100644
--- a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
+++ b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
@@ -16,7 +16,7 @@
// template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
// unspecified bind(Fn, Types...);
-// http://llvm.org/bugs/show_bug.cgi?id=22003
+// https://bugs.llvm.org/show_bug.cgi?id=22003
#include <functional>
diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp
index 0d4244b4d860..5b660da617a8 100644
--- a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp
+++ b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp
@@ -16,7 +16,7 @@
// template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
// unspecified bind(Fn, Types...);
-// http://llvm.org/bugs/show_bug.cgi?id=16343
+// https://bugs.llvm.org/show_bug.cgi?id=16343
#include <cmath>
#include <functional>
diff --git a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
index 47a3e1cc5969..2b19211be9bf 100644
--- a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
+++ b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
@@ -414,7 +414,14 @@ void throws_in_constructor_test()
throw 42;
}
ThrowsOnCopy() = default;
- bool operator()() const { assert(false); }
+ bool operator()() const {
+ assert(false);
+#if defined(_LIBCPP_MSVC)
+ __assume(0);
+#else
+ __builtin_unreachable();
+#endif
+ }
};
{
ThrowsOnCopy cp;
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
index 5bdf9e98e897..812f6fc502d9 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
@@ -8,11 +8,11 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
-// REQUIRES-ANY: c++11, c++14
+// REQUIRES: c++11 || c++14
// <functional>
-// See https://llvm.org/bugs/show_bug.cgi?id=20002
+// See https://bugs.llvm.org/show_bug.cgi?id=20002
#include <functional>
#include <type_traits>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
index f89bde8e6544..3affd984af60 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
@@ -14,7 +14,7 @@
// function(Fp);
// Ensure that __not_null works for all function types.
-// See https://llvm.org/bugs/show_bug.cgi?id=23589
+// See https://bugs.llvm.org/show_bug.cgi?id=23589
//------------------------------------------------------------------------------
// TESTING std::function<...>::__not_null(Callable)
@@ -31,7 +31,7 @@
// types can be null. The other categories are not tested here.
// 3) '__not_null(Callable)' is well formed when the call signature includes
// varargs.
-// 4) '__not_null(Callable)' works for Callable types with all aritys less
+// 4) '__not_null(Callable)' works for Callable types with all arities less
// than or equal to 3 in C++03.
// 5) '__not_null(Callable)' works when 'Callable' is a member function
// pointer to a cv or ref qualified function type.
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
index 392dfc1993bc..adc7856357e7 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
-// REQUIRES-ANY: c++98, c++03, c++11, c++14
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// class function<R(ArgTypes...)>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
index 8d454723320c..4c1a1ca95ff4 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
-// REQUIRES-ANY: c++98, c++03, c++11, c++14
+// REQUIRES: c++98 || c++03 || c++11 ||c++14
// class function<R(ArgTypes...)>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
index 718aa49341d2..8b0e831287a5 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
-// REQUIRES-ANY: c++98, c++03, c++11, c++14
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// class function<R(ArgTypes...)>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
index 354ad955f207..943e170878f2 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// <functional>
-// REQUIRES-ANY: c++98, c++03, c++11, c++14
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// class function<R(ArgTypes...)>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp
index e328481b274d..3e5435da1a16 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
-// REQUIRES-ANY: c++11, c++14
+// REQUIRES: c++11 || c++14
// <functional>
diff --git a/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp b/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp
new file mode 100644
index 000000000000..775247fc80b6
--- /dev/null
+++ b/test/std/utilities/function.objects/unord.hash/enabled_hashes.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <functional>
+
+// Test that <functional> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <functional>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+}
diff --git a/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
index af367789a105..a7ddd9a49997 100644
--- a/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
@@ -36,6 +36,7 @@ test()
typedef std::hash<T> H;
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()));
typedef typename std::underlying_type<T>::type under_type;
H h1;
@@ -43,7 +44,8 @@ test()
for (int i = 0; i <= 5; ++i)
{
T t(static_cast<T> (i));
- if (sizeof(T) <= sizeof(std::size_t))
+ const bool small = std::integral_constant<bool, sizeof(T) <= sizeof(std::size_t)>::value; // avoid compiler warnings
+ if (small)
assert(h1(t) == h2(static_cast<under_type>(i)));
}
}
diff --git a/test/std/utilities/function.objects/unord.hash/floating.pass.cpp b/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
index 643e2d8c5d86..e67aa016c1e7 100644
--- a/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
@@ -24,6 +24,8 @@
#include <limits>
#include <cmath>
+#include "test_macros.h"
+
template <class T>
void
test()
@@ -31,6 +33,7 @@ test()
typedef std::hash<T> H;
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;
std::size_t t0 = h(0.);
diff --git a/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
index 2f3f9bee4bc3..ce87f5918b20 100644
--- a/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
@@ -31,12 +31,14 @@ test()
typedef std::hash<T> H;
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;
for (int i = 0; i <= 5; ++i)
{
T t(static_cast<T>(i));
- if (sizeof(T) <= sizeof(std::size_t))
+ const bool small = std::integral_constant<bool, sizeof(T) <= sizeof(std::size_t)>::value; // avoid compiler warnings
+ if (small)
{
const std::size_t result = h(t);
LIBCPP_ASSERT(result == static_cast<size_t>(t));
@@ -63,42 +65,42 @@ int main()
test<long long>();
test<unsigned long long>();
-// LWG #2119
+// LWG #2119
test<std::ptrdiff_t>();
test<size_t>();
- test<int8_t>();
- test<int16_t>();
- test<int32_t>();
- test<int64_t>();
+ test<int8_t>();
+ test<int16_t>();
+ test<int32_t>();
+ test<int64_t>();
- test<int_fast8_t>();
- test<int_fast16_t>();
- test<int_fast32_t>();
- test<int_fast64_t>();
+ test<int_fast8_t>();
+ test<int_fast16_t>();
+ test<int_fast32_t>();
+ test<int_fast64_t>();
- test<int_least8_t>();
- test<int_least16_t>();
- test<int_least32_t>();
- test<int_least64_t>();
+ test<int_least8_t>();
+ test<int_least16_t>();
+ test<int_least32_t>();
+ test<int_least64_t>();
test<intmax_t>();
test<intptr_t>();
- test<uint8_t>();
- test<uint16_t>();
- test<uint32_t>();
- test<uint64_t>();
+ test<uint8_t>();
+ test<uint16_t>();
+ test<uint32_t>();
+ test<uint64_t>();
- test<uint_fast8_t>();
- test<uint_fast16_t>();
- test<uint_fast32_t>();
- test<uint_fast64_t>();
+ test<uint_fast8_t>();
+ test<uint_fast16_t>();
+ test<uint_fast32_t>();
+ test<uint_fast64_t>();
- test<uint_least8_t>();
- test<uint_least16_t>();
- test<uint_least32_t>();
- test<uint_least64_t>();
+ test<uint_least8_t>();
+ test<uint_least16_t>();
+ test<uint_least32_t>();
+ test<uint_least64_t>();
test<uintmax_t>();
test<uintptr_t>();
diff --git a/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp b/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
index a48394495e2d..36280a38e0a7 100644
--- a/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
@@ -23,6 +23,8 @@
#include <type_traits>
#include <limits>
+#include "test_macros.h"
+
template <class T>
void
test()
@@ -30,6 +32,7 @@ test()
typedef std::hash<T> H;
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;
typedef typename std::remove_pointer<T>::type type;
@@ -38,7 +41,20 @@ test()
assert(h(&i) != h(&j));
}
+// can't hash nullptr_t until c++17
+void test_nullptr()
+{
+#if TEST_STD_VER > 14
+ typedef std::nullptr_t T;
+ typedef std::hash<T> H;
+ 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()));
+#endif
+}
+
int main()
{
test<int*>();
+ test_nullptr();
}
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp
index 533d516707e1..05e55e3d9a4e 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp
@@ -80,7 +80,7 @@ void test_counted()
Counted* p = (Counted*)pool;
std::uninitialized_default_construct(It(p), It(p+1));
assert(Counted::count == 1);
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
std::uninitialized_default_construct(It(p+1), It(p+N));
assert(Counted::count == 5);
assert(Counted::constructed == 5);
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp
index f22a74f1f832..e5b9eca439cf 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp
@@ -80,7 +80,7 @@ void test_counted()
It e = std::uninitialized_default_construct_n(It(p), 1);
assert(e == It(p+1));
assert(Counted::count == 1);
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
e = std::uninitialized_default_construct_n(It(p+1), 4);
assert(e == It(p+N));
assert(Counted::count == 5);
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp
index c2d860694a75..8479ce123a78 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp
@@ -79,7 +79,7 @@ void test_counted()
Counted* p = (Counted*)pool;
std::uninitialized_value_construct(It(p), It(p+1));
assert(Counted::count == 1);
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
std::uninitialized_value_construct(It(p+1), It(p+N));
assert(Counted::count == 5);
assert(Counted::constructed == 5);
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp
index 323d00f7c9c4..ad6a51500e36 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp
@@ -81,7 +81,7 @@ void test_counted()
It e = std::uninitialized_value_construct_n(It(p), 1);
assert(e == It(p+1));
assert(Counted::count == 1);
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
e = std::uninitialized_value_construct_n(It(p+1), 4);
assert(e == It(p+N));
assert(Counted::count == 5);
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp
index d7a9542b4c27..6c535250fd1f 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp
@@ -88,7 +88,7 @@ void test_counted()
Counted* p = (Counted*)pool;
auto ret = std::uninitialized_move(It(values), It(values + 1), FIt(p));
assert(ret == FIt(p +1));
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
assert(Counted::count == 1);
assert(p[0].value == 1);
assert(values[0] == 0);
diff --git a/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp b/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp
index f27e5726135f..4175c6bce688 100644
--- a/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp
@@ -89,7 +89,7 @@ void test_counted()
auto ret = std::uninitialized_move_n(It(values), 1, FIt(p));
assert(ret.first == It(values +1));
assert(ret.second == FIt(p +1));
- assert(Counted::constructed = 1);
+ assert(Counted::constructed == 1);
assert(Counted::count == 1);
assert(p[0].value == 1);
assert(values[0] == 0);
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.pass.cpp
deleted file mode 100644
index 286e6bc9a7b9..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.pass.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-// test move assignment. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> s1(new A[3]);
- A* p = s1.get();
- assert(A::count == 3);
- std::unique_ptr<A[]> s2(new A[2]);
- assert(A::count == 5);
- s2 = std::move(s1);
- assert(A::count == 3);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- }
- assert(A::count == 0);
- {
- std::unique_ptr<A[], Deleter<A[]> > s1(new A[4], Deleter<A[]>(5));
- A* p = s1.get();
- assert(A::count == 4);
- std::unique_ptr<A[], Deleter<A[]> > s2(new A[5]);
- assert(A::count == 9);
- s2 = std::move(s1);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- assert(A::count == 4);
- assert(s2.get_deleter().state() == 5);
- assert(s1.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- {
- CDeleter<A[]> d1(5);
- std::unique_ptr<A[], CDeleter<A[]>&> s1(new A[6], d1);
- A* p = s1.get();
- assert(A::count == 6);
- CDeleter<A[]> d2(6);
- std::unique_ptr<A[], CDeleter<A[]>&> s2(new A[3], d2);
- assert(A::count == 9);
- s2 = std::move(s1);
- assert(A::count == 6);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- assert(d1.state() == 5);
- assert(d2.state() == 5);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move03.fail.cpp
deleted file mode 100644
index 3712a2796392..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move03.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// Can't copy from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete p;}
-};
-
-int main()
-{
- {
- std::unique_ptr<A, Deleter> s(new A);
- A* p = s.get();
- std::unique_ptr<A, Deleter> s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move04.fail.cpp
deleted file mode 100644
index 4e85e5b0fb90..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move04.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test move ctor. Can't copy from const lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete p;}
-};
-
-int main()
-{
- {
- const std::unique_ptr<A, Deleter> s(new A);
- A* p = s.get();
- std::unique_ptr<A, Deleter> s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert01.fail.cpp
deleted file mode 100644
index 9461958a431d..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert01.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// Can't assign from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert02.fail.cpp
deleted file mode 100644
index 1737136f4d72..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert02.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- boost::unique_ptr<B[], Deleter<B> > s(new B);
- A* p = s.get();
- boost::unique_ptr<A[], Deleter<A> > s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert03.fail.cpp
deleted file mode 100644
index 3c89bb12344e..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert03.fail.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- Deleter<B> db(5);
- boost::unique_ptr<B[], Deleter<B>&> s(new B, db);
- A* p = s.get();
- Deleter<A> da(6);
- boost::unique_ptr<A[], Deleter<A>&> s2(new A, da);
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert04.fail.cpp
deleted file mode 100644
index 970beb5a150e..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert04.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// Can't assign from const lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const boost::unique_ptr<B[]> s(new B);
- A* p = s.get();
- boost::unique_ptr<A[]> s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert05.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert05.fail.cpp
deleted file mode 100644
index 786858dd4016..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert05.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from const lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const boost::unique_ptr<B[], Deleter<B> > s(new B);
- A* p = s.get();
- boost::unique_ptr<A[], Deleter<A> > s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert06.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert06.fail.cpp
deleted file mode 100644
index 46d4c0985d71..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert06.fail.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from const lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- Deleter<B> db(5);
- const boost::unique_ptr<B[], Deleter<B>&> s(new B, db);
- A* p = s.get();
- Deleter<A> da(6);
- boost::unique_ptr<A[], Deleter<A>&> s2(new A, da);
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert07.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert07.fail.cpp
deleted file mode 100644
index 65ee2694156f..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert07.fail.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- boost::unique_ptr<B[]> s(new B);
- A* p = s.get();
- boost::unique_ptr<A[]> s2(new A);
- assert(A::count == 2);
- s2 = boost::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert08.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert08.fail.cpp
deleted file mode 100644
index da08195ffdd3..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert08.fail.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- boost::unique_ptr<B[], Deleter<B> > s(new B);
- A* p = s.get();
- boost::unique_ptr<A[], Deleter<A> > s2(new A);
- assert(A::count == 2);
- s2 = (boost::move(s));
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert09.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert09.fail.cpp
deleted file mode 100644
index aeec076cb86a..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert09.fail.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// test converting move assignment with reference deleters
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- Deleter<B> db(5);
- boost::unique_ptr<B[], Deleter<B>&> s(new B, db);
- A* p = s.get();
- Deleter<A> da(6);
- boost::unique_ptr<A[], Deleter<A>&> s2(new A, da);
- s2 = boost::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_asgn.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_asgn.pass.cpp
deleted file mode 100644
index e2d7956cda64..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_asgn.pass.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-#include <cassert>
-
-// test assignment from null
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> s2(new A);
- assert(A::count == 1);
- s2 = 0;
- assert(A::count == 0);
- assert(s2.get() == 0);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_ctor.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_ctor.pass.cpp
deleted file mode 100644
index 50389978e8ab..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/null_ctor.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// The deleter is not called if get() == 0
-
-#include <memory>
-#include <cassert>
-
-#include "test_macros.h"
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(0) {}
-
- int state() const {return state_;}
-
- void operator()(void*) {++state_;}
-};
-
-int main()
-{
- Deleter d;
- assert(d.state() == 0);
- {
- std::unique_ptr<int[], Deleter&> p(nullptr, d);
- assert(p.get() == 0);
- assert(&p.get_deleter() == &d);
- }
-#if defined(_LIBCPP_VERSION)
- {
- // The standard only requires the constructor accept nullptr, but libc++
- // also supports the literal 0.
- std::unique_ptr<int[], Deleter&> p(0, d);
- assert(p.get() == 0);
- assert(&p.get_deleter() == &d);
- }
-#endif
- assert(d.state() == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/nullptr_asgn.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/nullptr_asgn.pass.cpp
deleted file mode 100644
index 30ecdded3cf7..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/nullptr_asgn.pass.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-#include <cassert>
-
-// test assignment from null
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> s2(new A[3]);
- assert(A::count == 3);
- s2 = nullptr;
- assert(A::count == 0);
- assert(s2.get() == 0);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
deleted file mode 100644
index b6bcad9a91c6..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr default ctor
-
-// default unique_ptr ctor should require default Deleter ctor
-
-
-#include <memory>
-
-class Deleter
-{
- // expected-error@memory:* {{base class 'Deleter' has private default constructor}}
- // expected-note@memory:* + {{in instantiation of member function}}
- Deleter() {} // expected-note {{implicitly declared private here}}
-
-public:
-
- Deleter(Deleter&) {}
- Deleter& operator=(Deleter&) { return *this; }
-
- void operator()(void*) const {}
-};
-
-int main()
-{
- std::unique_ptr<int[], Deleter> p;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.pass.cpp
deleted file mode 100644
index 0cc54382b98d..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.pass.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr default ctor
-
-// default unique_ptr ctor should only require default Deleter ctor
-
-#include <memory>
-#include <cassert>
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(void*) {}
-};
-
-int main()
-{
- {
- std::unique_ptr<int[]> p;
- assert(p.get() == 0);
- }
- {
- std::unique_ptr<int[], Deleter> p;
- assert(p.get() == 0);
- assert(p.get_deleter().state() == 5);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.pass.cpp
deleted file mode 100644
index 3ded41c419c8..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.pass.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test default unique_ptr<T[]> ctor
-
-// default unique_ptr<T[]> ctor shouldn't require complete type
-
-#include <memory>
-#include <cassert>
-
-struct A;
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p);
-};
-
-void check(int i);
-
-template <class D = std::default_delete<A> >
-struct B
-{
- std::unique_ptr<A[], D> a_;
- B();
- ~B();
-
- A* get() const {return a_.get();}
- D& get_deleter() {return a_.get_deleter();}
-};
-
-int main()
-{
- {
- B<> s;
- assert(s.get() == 0);
- }
- check(0);
- {
- B<Deleter> s;
- assert(s.get() == 0);
- assert(s.get_deleter().state() == 5);
- }
- check(0);
-}
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-void Deleter::operator()(A* p) {delete p;}
-
-void check(int i)
-{
- assert(A::count == i);
-}
-
-template <class D>
-B<D>::B() {}
-
-template <class D>
-B<D>::~B() {}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.fail.cpp
deleted file mode 100644
index bc49a0e5c31e..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.fail.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <cassert>
-
-// test move ctor. Can't copy from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> s(new A[3]);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp
deleted file mode 100644
index 5088a4410e79..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-// test move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> s(new A[3]);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 3);
- }
- assert(A::count == 0);
- {
- std::unique_ptr<A[], Deleter<A[]> > s(new A[3], Deleter<A[]>(5));
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 3);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- {
- NCDeleter<A[]> d;
- std::unique_ptr<A[], NCDeleter<A[]>&> s(new A[3], d);
- A* p = s.get();
- std::unique_ptr<A[], NCDeleter<A[]>&> s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 3);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.fail.cpp
deleted file mode 100644
index 8e44c78bf1e9..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.fail.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-// test move ctor. Can't copy from const lvalue
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<A[]> s(new A[3]);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
deleted file mode 100644
index 89b6fa248845..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-// test move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-
-std::unique_ptr<A[]>
-source1()
-{
- return std::unique_ptr<A[]>(new A[3]);
-}
-
-void sink1(std::unique_ptr<A[]>)
-{
-}
-
-std::unique_ptr<A[], Deleter<A[]> >
-source2()
-{
- return std::unique_ptr<A[], Deleter<A[]> >(new A[3]);
-}
-
-void sink2(std::unique_ptr<A[], Deleter<A[]> >)
-{
-}
-
-std::unique_ptr<A[], NCDeleter<A[]>&>
-source3()
-{
- static NCDeleter<A[]> d;
- return std::unique_ptr<A[], NCDeleter<A[]>&>(new A[3], d);
-}
-
-void sink3(std::unique_ptr<A[], NCDeleter<A[]>&>)
-{
-}
-
-int main()
-{
- sink1(source1());
- sink2(source2());
- sink3(source3());
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move03.fail.cpp
deleted file mode 100644
index c952cf2d4e13..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move03.fail.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-// test move ctor. Can't copy from lvalue
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- std::unique_ptr<A[], Deleter> s(new A[3]);
- A* p = s.get();
- std::unique_ptr<A[], Deleter> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move04.fail.cpp
deleted file mode 100644
index 0d091ff346d1..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move04.fail.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-// test move ctor. Can't copy from const lvalue
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- const std::unique_ptr<A[], Deleter> s(new A[3]);
- A* p = s.get();
- std::unique_ptr<A[], Deleter> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert01.fail.cpp
deleted file mode 100644
index d175fbf93adc..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert01.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert02.fail.cpp
deleted file mode 100644
index 1838511b4929..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert02.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert03.fail.cpp
deleted file mode 100644
index 36ad75d8331a..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert03.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert04.fail.cpp
deleted file mode 100644
index 3a19bde92889..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert04.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// implicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert05.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert05.fail.cpp
deleted file mode 100644
index bda2a70a4ef3..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert05.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Implicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert06.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert06.fail.cpp
deleted file mode 100644
index fba895137b05..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert06.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert07.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert07.fail.cpp
deleted file mode 100644
index 24c646988f0a..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert07.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert08.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert08.fail.cpp
deleted file mode 100644
index 486d90825d9e..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert08.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert09.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert09.fail.cpp
deleted file mode 100644
index e4cbef5c0560..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert09.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- const std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert10.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert10.fail.cpp
deleted file mode 100644
index 73423d1b3751..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert10.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// implicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert11.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert11.fail.cpp
deleted file mode 100644
index cfc097ba0b84..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert11.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Implicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert12.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert12.fail.cpp
deleted file mode 100644
index fdb088250b9f..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert12.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- const std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert13.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert13.fail.cpp
deleted file mode 100644
index d9ef8e96fe8f..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert13.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2(std::move(s));
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert14.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert14.fail.cpp
deleted file mode 100644
index b4577a126c68..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert14.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2(std::move(s));
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert15.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert15.fail.cpp
deleted file mode 100644
index 9325d07d0d0c..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert15.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2(std::move(s));
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert16.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert16.fail.cpp
deleted file mode 100644
index b090e593ec62..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert16.fail.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// implicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[]> s(new B);
- A* p = s.get();
- std::unique_ptr<A[]> s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert17.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert17.fail.cpp
deleted file mode 100644
index b2af3c7a6938..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert17.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Implicit version
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B[], Deleter<B[]> > s(new B);
- A* p = s.get();
- std::unique_ptr<A[], Deleter<A[]> > s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert18.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert18.fail.cpp
deleted file mode 100644
index d1c0e8a781e6..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move_convert18.fail.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B[], CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A[], CDeleter<A>&> s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/nullptr.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/nullptr.pass.cpp
deleted file mode 100644
index 9a8c17547bca..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/nullptr.pass.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// unique_ptr(nullptr_t);
-
-#include <memory>
-#include <cassert>
-
-// default unique_ptr ctor should only require default Deleter ctor
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(void*) {}
-};
-
-int main()
-{
- {
- std::unique_ptr<int[]> p(nullptr);
- assert(p.get() == 0);
- }
- {
- std::unique_ptr<int[], Deleter> p(nullptr);
- assert(p.get() == 0);
- assert(p.get_deleter().state() == 5);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.fail.cpp
deleted file mode 100644
index 4c3161150831..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.fail.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr<T[]>(pointer) ctor
-
-// unique_ptr<T[]>(pointer) ctor should require default Deleter ctor
-
-#include <memory>
-
-class Deleter
-{
-
- Deleter() {}
-
-public:
-
- Deleter(Deleter&) {}
- Deleter& operator=(Deleter&) {}
-
- void operator()(void*) const {}
-};
-
-int main()
-{
- std::unique_ptr<int[], Deleter> p(new int);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.pass.cpp
deleted file mode 100644
index dab42f277411..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer01.pass.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-// unique_ptr<T[]>(pointer) ctor should only require default Deleter ctor
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- A* p = new A[3];
- assert(A::count == 3);
- std::unique_ptr<A[]> s(p);
- assert(s.get() == p);
- }
- assert(A::count == 0);
- {
- A* p = new A[3];
- assert(A::count == 3);
- std::unique_ptr<A[], Deleter> s(p);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.pass.cpp
deleted file mode 100644
index 1afb1c32ce8c..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02.pass.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr<T[]>(pointer) ctor
-
-// unique_ptr<T[]>(pointer) ctor shouldn't require complete type
-
-#include <memory>
-#include <cassert>
-
-struct A;
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p);
-};
-
-void check(int i);
-
-template <class D = std::default_delete<A[]> >
-struct B
-{
- std::unique_ptr<A[], D> a_;
- explicit B(A*);
- ~B();
-
- A* get() const {return a_.get();}
- D& get_deleter() {return a_.get_deleter();}
-};
-
-A* get();
-
-int main()
-{
- {
- A* p = get();
- check(3);
- B<> s(p);
- assert(s.get() == p);
- }
- check(0);
- {
- A* p = get();
- check(3);
- B<Deleter> s(p);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- }
- check(0);
-}
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-A* get() {return new A[3];}
-
-void Deleter::operator()(A* p) {delete [] p;}
-
-void check(int i)
-{
- assert(A::count == i);
-}
-
-template <class D>
-B<D>::B(A* a) : a_(a) {}
-
-template <class D>
-B<D>::~B() {}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer04.fail.cpp
deleted file mode 100644
index 591144f7aa58..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer04.fail.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-// unique_ptr(pointer) ctor should not work with derived pointers
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- B* p = new B[3];
- std::unique_ptr<A[]> s(p);
- }
- {
- B* p = new B[3];
- std::unique_ptr<A[], Deleter> s(p);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp
deleted file mode 100644
index 3de556563f97..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr(pointer, deleter()) only requires MoveConstructible deleter
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- A* p = new A[3];
- assert(A::count == 3);
- std::unique_ptr<A[], Deleter<A[]> > s(p, Deleter<A[]>());
- assert(s.get() == p);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
-
- { // LWG#2520 says that nullptr is a valid input as well as null
-#ifdef _LIBCPP_VERSION
- std::unique_ptr<A[], Deleter<A[]> > s1(NULL, Deleter<A[]>());
-#endif
- std::unique_ptr<A[], Deleter<A[]> > s2(nullptr, Deleter<A[]>());
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter02.pass.cpp
deleted file mode 100644
index a92fdbc1d2c4..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter02.pass.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr(pointer, d) requires CopyConstructible deleter
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- A* p = new A[3];
- assert(A::count == 3);
- Deleter d;
- std::unique_ptr<A[], Deleter> s(p, d);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- d.set_state(6);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- {
- Deleter d;
- std::unique_ptr<A[], Deleter> s(nullptr, d);
- assert(s.get() == nullptr);
- assert(s.get_deleter().state() == 5);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter03.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter03.pass.cpp
deleted file mode 100644
index dd27401731a6..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter03.pass.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr<T[], D&>(pointer, d) does not requires CopyConstructible deleter
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
- Deleter(const Deleter&);
- Deleter& operator=(const Deleter&);
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- {
- A* p = new A[3];
- assert(A::count == 3);
- Deleter d;
- std::unique_ptr<A[], Deleter&> s(p, d);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- d.set_state(6);
- assert(s.get_deleter().state() == 6);
- }
- assert(A::count == 0);
- {
- Deleter d;
- std::unique_ptr<A[], Deleter&> s(nullptr, d);
- assert(s.get() == nullptr);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.fail.cpp
deleted file mode 100644
index 9d3f94098a08..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.fail.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// XFAIL: c++98, c++03
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr<T, const D&>(pointer, D()) should not compile
-
-#include <memory>
-
-class Deleter
-{
-public:
- Deleter() {}
- void operator()(int* p) const {delete [] p;}
-};
-
-int main()
-{
- int* p = nullptr;
- std::unique_ptr<int[], const Deleter&> s(p, Deleter()); // expected-error@memory:* {{static_assert failed "rvalue deleter bound to reference"}}
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.pass.cpp
deleted file mode 100644
index 02f44d357561..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter04.pass.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr<T[], const D&>(pointer, d) does not requires CopyConstructible deleter
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
- Deleter(const Deleter&);
- Deleter& operator=(const Deleter&);
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(A* p) const {delete [] p;}
-};
-
-int main()
-{
- {
- A* p = new A[3];
- assert(A::count == 3);
- Deleter d;
- std::unique_ptr<A[], const Deleter&> s(p, d);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- {
- Deleter d;
- std::unique_ptr<A[], const Deleter&> s(nullptr, d);
- assert(s.get() == nullptr);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter05.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter05.fail.cpp
deleted file mode 100644
index 0e03a7da07fb..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter05.fail.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer, deleter) ctor
-
-// unique_ptr(pointer, deleter) should not work with derived pointers
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete [] p;}
-};
-
-int main()
-{
- B* p = new B[3];
- std::unique_ptr<A[], Deleter> s(p, Deleter());
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/release.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/release.pass.cpp
deleted file mode 100644
index d79a4e396eed..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/release.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test release
-
-#include <memory>
-#include <cassert>
-
-int main()
-{
- std::unique_ptr<int[]> p(new int[3]);
- int* i = p.get();
- int* j = p.release();
- assert(p.get() == 0);
- assert(i == j);
- delete [] j;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset1.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset1.pass.cpp
deleted file mode 100644
index 195d877bbb70..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset1.pass.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test reset
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> p(new A[3]);
- assert(A::count == 3);
- A* i = p.get();
- assert(i != nullptr);
- p.reset();
- assert(A::count == 0);
- assert(p.get() == 0);
- }
- assert(A::count == 0);
- {
- std::unique_ptr<A[]> p(new A[4]);
- assert(A::count == 4);
- A* i = p.get();
- assert(i != nullptr);
- p.reset(new A[5]);
- assert(A::count == 5);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset2.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset2.fail.cpp
deleted file mode 100644
index bca6cb2470ac..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/reset2.fail.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test reset
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A[]> p(new A);
- assert(A::count == 1);
- assert(B::count == 0);
- A* i = p.get();
- p.reset(new B);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- std::unique_ptr<A[]> p(new B);
- assert(A::count == 1);
- assert(B::count == 1);
- A* i = p.get();
- p.reset(new B);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/swap.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/swap.pass.cpp
deleted file mode 100644
index e9754cc0f226..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.modifiers/swap.pass.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test swap
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- int state_;
- static int count;
- A() : state_(0) {++count;}
- explicit A(int i) : state_(i) {++count;}
- A(const A& a) : state_(a.state_) {++count;}
- A& operator=(const A& a) {state_ = a.state_; return *this;}
- ~A() {--count;}
-
- friend bool operator==(const A& x, const A& y)
- {return x.state_ == y.state_;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- A* p1 = new A[3];
- std::unique_ptr<A[], Deleter<A[]> > s1(p1, Deleter<A[]>(1));
- A* p2 = new A[3];
- std::unique_ptr<A[], Deleter<A[]> > s2(p2, Deleter<A[]>(2));
- assert(s1.get() == p1);
- assert(s1.get_deleter().state() == 1);
- assert(s2.get() == p2);
- assert(s2.get_deleter().state() == 2);
- s1.swap(s2);
- assert(s1.get() == p2);
- assert(s1.get_deleter().state() == 2);
- assert(s2.get() == p1);
- assert(s2.get_deleter().state() == 1);
- assert(A::count == 6);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/dereference.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/dereference.fail.cpp
deleted file mode 100644
index 46ba1395bb85..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/dereference.fail.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test op*()
-
-#include <memory>
-#include <cassert>
-
-int main()
-{
- std::unique_ptr<int[]> p(new int(3));
- assert(*p == 3);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get_deleter.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get_deleter.pass.cpp
deleted file mode 100644
index 4496740715a5..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get_deleter.pass.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test get_deleter()
-
-#include <memory>
-#include <cassert>
-
-struct Deleter
-{
- void operator()(void*) {}
-
- int test() {return 5;}
- int test() const {return 6;}
-};
-
-int main()
-{
- {
- std::unique_ptr<int[], Deleter> p;
- assert(p.get_deleter().test() == 5);
- }
- {
- const std::unique_ptr<int[], Deleter> p;
- assert(p.get_deleter().test() == 6);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/index.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/index.pass.cpp
deleted file mode 100644
index 519eae688ec1..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/index.pass.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test op[](size_t)
-
-#include <memory>
-#include <cassert>
-
-class A
-{
- int state_;
- static int next_;
-public:
- A() : state_(++next_) {}
- int get() const {return state_;}
-
- friend bool operator==(const A& x, int y)
- {return x.state_ == y;}
-
- A& operator=(int i) {state_ = i; return *this;}
-};
-
-int A::next_ = 0;
-
-int main()
-{
- std::unique_ptr<A[]> p(new A[3]);
- assert(p[0] == 1);
- assert(p[1] == 2);
- assert(p[2] == 3);
- p[0] = 3;
- p[1] = 2;
- p[2] = 1;
- assert(p[0] == 3);
- assert(p[1] == 2);
- assert(p[2] == 1);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp
deleted file mode 100644
index 380f2e100eb6..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr::pointer type
-
-#include <memory>
-#include <type_traits>
-
-#include "test_macros.h"
-
-struct Deleter
-{
- struct pointer {};
-};
-
-struct D2 {
-private:
- typedef void pointer;
-};
-
-struct D3 {
- static long pointer;
-};
-
-int main()
-{
- {
- typedef std::unique_ptr<int> P;
- static_assert((std::is_same<P::pointer, int*>::value), "");
- }
- {
- typedef std::unique_ptr<int, Deleter> P;
- static_assert((std::is_same<P::pointer, Deleter::pointer>::value), "");
- }
-#if TEST_STD_VER >= 11
- {
- typedef std::unique_ptr<int, D2> P;
- static_assert(std::is_same<P::pointer, int*>::value, "");
- }
- {
- typedef std::unique_ptr<int, D3> P;
- static_assert(std::is_same<P::pointer, int*>::value, "");
- }
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.fail.cpp
deleted file mode 100644
index 87cfb72ad6e0..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.fail.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-
-// Can't copy from lvalue
-int main()
-{
- std::unique_ptr<int> s, s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{cannot be assigned because its copy assignment operator is implicitly deleted}}
-#else
- s2 = s; // expected-error {{'operator=' is a private member}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.pass.cpp
deleted file mode 100644
index 9535ed0295d4..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.pass.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-// test move assignment. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> s1(new A);
- A* p = s1.get();
- std::unique_ptr<A> s2(new A);
- assert(A::count == 2);
- s2 = std::move(s1);
- assert(A::count == 1);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- }
- assert(A::count == 0);
- {
- std::unique_ptr<A, Deleter<A> > s1(new A, Deleter<A>(5));
- A* p = s1.get();
- std::unique_ptr<A, Deleter<A> > s2(new A);
- assert(A::count == 2);
- s2 = std::move(s1);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- assert(A::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s1.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- {
- CDeleter<A> d1(5);
- std::unique_ptr<A, CDeleter<A>&> s1(new A, d1);
- A* p = s1.get();
- CDeleter<A> d2(6);
- std::unique_ptr<A, CDeleter<A>&> s2(new A, d2);
- s2 = std::move(s1);
- assert(s2.get() == p);
- assert(s1.get() == 0);
- assert(A::count == 1);
- assert(d1.state() == 5);
- assert(d2.state() == 5);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move02.fail.cpp
deleted file mode 100644
index 9cea12b1249f..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move02.fail.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-
-// Can't copy from const lvalue
-
-int main()
-{
- const std::unique_ptr<int> s(new int);
- std::unique_ptr<int> s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{cannot be assigned because its copy assignment operator is implicitly deleted}}
-#else
- // NOTE: The error says "constructor" because the assignment operator takes
- // 's' by value and attempts to copy construct it.
- s2 = s; // expected-error {{no matching constructor for initialization}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move03.fail.cpp
deleted file mode 100644
index 05a057f9bb32..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move03.fail.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-
-struct Deleter {
- void operator()(int* p) {delete p;}
-};
-
-// Can't copy from lvalue
-int main()
-{
- std::unique_ptr<int, Deleter> s, s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{cannot be assigned because its copy assignment operator is implicitly deleted}}
-#else
- s2 = s; // expected-error {{'operator=' is a private member}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move04.fail.cpp
deleted file mode 100644
index 24703ec98238..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move04.fail.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-
-struct Deleter {
- void operator()(int* p) {delete p;}
-};
-
-// Can't copy from a const lvalue
-int main()
-{
- const std::unique_ptr<int, Deleter> s(new int);
- std::unique_ptr<int, Deleter> s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{cannot be assigned because its copy assignment operator is implicitly deleted}}
-#else
- // NOTE: The error says "constructor" because the assignment operator takes
- // 's' by value and attempts to copy construct it.
- s2 = s; // expected-error {{no matching constructor for initialization}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert.pass.cpp
deleted file mode 100644
index 4c4a32035641..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert.pass.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-
-template <class APtr, class BPtr>
-void testAssign(APtr& aptr, BPtr& bptr) {
- A* p = bptr.get();
- assert(A::count == 2);
- aptr = std::move(bptr);
- assert(aptr.get() == p);
- assert(bptr.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
-}
-
-template <class LHS, class RHS>
-void checkDeleter(LHS& lhs, RHS& rhs, int LHSState, int RHSState) {
- assert(lhs.get_deleter().state() == LHSState);
- assert(rhs.get_deleter().state() == RHSState);
-}
-
-int main()
-{
- {
- std::unique_ptr<B> bptr(new B);
- std::unique_ptr<A> aptr(new A);
- testAssign(aptr, bptr);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- Deleter<B> del(42);
- std::unique_ptr<B, Deleter<B> > bptr(new B, std::move(del));
- std::unique_ptr<A, Deleter<A> > aptr(new A);
- testAssign(aptr, bptr);
- checkDeleter(aptr, bptr, 42, 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- CDeleter<A> adel(6);
- CDeleter<B> bdel(42);
- std::unique_ptr<B, CDeleter<B>&> bptr(new B, bdel);
- std::unique_ptr<A, CDeleter<A>&> aptr(new A, adel);
- testAssign(aptr, bptr);
- checkDeleter(aptr, bptr, 42, 42);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.fail.cpp
deleted file mode 100644
index 816a598d9a23..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.fail.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-
-struct A
-{
- A() {}
- virtual ~A() {}
-};
-
-struct B : public A
-{
-};
-
-// Can't assign from lvalue
-int main()
-{
- std::unique_ptr<B> s;
- std::unique_ptr<A> s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{no viable overloaded '='}}
-#else
- // NOTE: The move-semantic emulation creates an ambiguous overload set
- // so that assignment from an lvalue does not compile
- s2 = s; // expected-error {{use of overloaded operator '=' is ambiguous}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.fail.cpp
deleted file mode 100644
index 1ddf1d811651..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.fail.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-#include "../../deleter.h"
-
-struct A
-{
- A() {}
- virtual ~A() {}
-};
-
-struct B : public A
-{
-};
-
-// Can't assign from lvalue
-int main()
-{
- std::unique_ptr<B, Deleter<B> > s;
- std::unique_ptr<A, Deleter<A> > s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{no viable overloaded '='}}
-#else
- // NOTE: The move-semantic emulation creates an ambiguous overload set
- // so that assignment from an lvalue does not compile
- s2 = s; // expected-error {{use of overloaded operator '=' is ambiguous}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.fail.cpp
deleted file mode 100644
index 570c1c42f4fe..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.fail.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from lvalue
-
-#include <memory>
-
-#include "test_macros.h"
-#include "../../deleter.h"
-
-struct A
-{
- A() {}
- virtual ~A() {}
-};
-
-struct B : public A
-{
-};
-
-// Can't assign from lvalue
-int main()
-{
- Deleter<B> db;
- std::unique_ptr<B, Deleter<B>& > s(new B, db);
- Deleter<A> da;
- std::unique_ptr<A, Deleter<A> &> s2(new A, da);
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{no viable overloaded '='}}
-#else
- // NOTE: The move-semantic emulation creates an ambiguous overload set
- // so that assignment from an lvalue does not compile
- s2 = s; // expected-error {{use of overloaded operator '=' is ambiguous}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert04.fail.cpp
deleted file mode 100644
index 2ebc33d21d81..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert04.fail.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-#include <memory>
-
-#include "test_macros.h"
-#include "../../deleter.h"
-
-struct A
-{
- A() {}
- virtual ~A() {}
-};
-
-struct B : public A
-{
-};
-
-// Can't assign from lvalue
-int main()
-{
- const std::unique_ptr<B> s(new B);
- std::unique_ptr<A> s2;
-#if TEST_STD_VER >= 11
- s2 = s; // expected-error {{no viable overloaded '='}}
-#else
- // NOTE: The error says "constructor" because the assignment operator takes
- // 's' by value and attempts to copy construct it.
- s2 = s; // expected-error {{no matching constructor for initialization}}
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert05.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert05.fail.cpp
deleted file mode 100644
index 4694986c6773..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert05.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from const lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B, Deleter<B> > s(new B);
- A* p = s.get();
- std::unique_ptr<A, Deleter<A> > s2;
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert06.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert06.fail.cpp
deleted file mode 100644
index 220677cd6fa7..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert06.fail.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Can't assign from const lvalue
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- Deleter<B> db(5);
- const std::unique_ptr<B, Deleter<B>&> s(new B, db);
- A* p = s.get();
- Deleter<A> da(6);
- std::unique_ptr<A, Deleter<A>&> s2(new A, da);
- s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert13.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert13.fail.cpp
deleted file mode 100644
index 412648420d46..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert13.fail.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move assignment
-
-// Do not convert from an array unique_ptr
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-struct A
-{
-};
-
-struct Deleter
-{
- void operator()(void*) {}
-};
-
-int main()
-{
- std::unique_ptr<A[], Deleter> s;
- std::unique_ptr<A, Deleter> s2;
- s2 = std::move(s); // expected-error {{no viable overloaded '='}}
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp
deleted file mode 100644
index 7c3ac462c287..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// libc++ cannot safely provide the auto_ptr constructor without rvalue
-// references.
-// XFAIL: c++98, c++03
-
-// <memory>
-
-// unique_ptr
-
-// template <class U> unique_ptr(auto_ptr<U>&&) noexcept
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "test_macros.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- B* p = new B;
- std::auto_ptr<B> ap(p);
- std::unique_ptr<A> up(std::move(ap));
- assert(up.get() == p);
- assert(ap.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- B* p = new B;
- std::auto_ptr<B> ap(p);
- std::unique_ptr<A> up;
- up = std::move(ap);
- assert(up.get() == p);
- assert(ap.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-#if TEST_STD_VER >= 11
- {
- static_assert(std::is_nothrow_constructible<
- std::unique_ptr<A>,
- std::auto_ptr<B>&&
- >::value, "");
- }
-#endif
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer01.fail.cpp
deleted file mode 100644
index 1f317c782454..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer01.fail.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-#include <cassert>
-
-// template <class U> explicit unique_ptr(auto_ptr<U>&);
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
-// : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- B* p = new B;
- std::auto_ptr<B> ap(p);
- std::unique_ptr<A> up(ap);
- assert(up.get() == p);
- assert(ap.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- B* p = new B;
- std::auto_ptr<B> ap(p);
- std::unique_ptr<A> up;
- up = ap;
- assert(up.get() == p);
- assert(ap.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer02.fail.cpp
deleted file mode 100644
index 2dd5ea30049b..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer02.fail.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-#include <cassert>
-
-// template <class U> explicit unique_ptr(auto_ptr<U>&);
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-struct Deleter
-{
- template <class T>
- void operator()(T*) {}
-};
-
-int main()
-{
- {
- B* p = new B;
- std::auto_ptr<B> ap(p);
- std::unique_ptr<A, Deleter> up(ap);
- assert(up.get() == p);
- assert(ap.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default.pass.cpp
deleted file mode 100644
index 2694538145b9..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default.pass.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-//=============================================================================
-// TESTING std::unique_ptr::unique_ptr()
-//
-// Concerns:
-// 1 The default constructor works for any default constructible deleter types.
-// 2 The stored type 'T' is allowed to be incomplete.
-//
-// Plan
-// 1 Default construct unique_ptr's with various deleter types (C-1)
-// 2 Default construct a unique_ptr with a incomplete element_type and
-// various deleter types (C-1,2)
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct IncompleteT;
-
-void checkNumIncompleteTypeAlive(int i);
-
-template <class Del = std::default_delete<IncompleteT> >
-struct StoresIncomplete {
- std::unique_ptr<IncompleteT, Del> m_ptr;
- StoresIncomplete() {}
- ~StoresIncomplete();
-
- IncompleteT* get() const { return m_ptr.get(); }
- Del& get_deleter() { return m_ptr.get_deleter(); }
-};
-
-int main()
-{
- {
- std::unique_ptr<int> p;
- assert(p.get() == 0);
- }
- {
- std::unique_ptr<int, NCDeleter<int> > p;
- assert(p.get() == 0);
- assert(p.get_deleter().state() == 0);
- p.get_deleter().set_state(5);
- assert(p.get_deleter().state() == 5);
- }
- {
- StoresIncomplete<> s;
- assert(s.get() == 0);
- checkNumIncompleteTypeAlive(0);
- }
- checkNumIncompleteTypeAlive(0);
- {
- StoresIncomplete< Deleter<IncompleteT> > s;
- assert(s.get() == 0);
- assert(s.get_deleter().state() == 0);
- checkNumIncompleteTypeAlive(0);
- }
- checkNumIncompleteTypeAlive(0);
-}
-
-struct IncompleteT {
- static int count;
- IncompleteT() { ++count; }
- ~IncompleteT() {--count; }
-};
-
-int IncompleteT::count = 0;
-
-void checkNumIncompleteTypeAlive(int i) {
- assert(IncompleteT::count == i);
-}
-
-template <class Del>
-StoresIncomplete<Del>::~StoresIncomplete() { } \ No newline at end of file
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02.fail.cpp
deleted file mode 100644
index 690750143414..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02.fail.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr default ctor
-
-#include <memory>
-
-// default unique_ptr ctor should require non-reference Deleter ctor
-class Deleter
-{
-public:
-
- void operator()(void*) {}
-};
-
-int main()
-{
- std::unique_ptr<int, Deleter&> p;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default03.fail.cpp
deleted file mode 100644
index 78f6e73a1d55..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default03.fail.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr default ctor
-
-#include <memory>
-
-// default unique_ptr ctor should require non-pointer Deleter
-
-int main()
-{
- std::unique_ptr<int, void (*)(void*)> p;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move.pass.cpp
deleted file mode 100644
index 4c5cc843a138..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move.pass.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-//=============================================================================
-// TESTING unique_ptr(unique_ptr&&)
-//
-// Concerns
-// 1 The moved from pointer is empty and the new pointer stores the old value.
-// 2 The only requirement on the deleter is that it is MoveConstructible
-// or a reference.
-// 3 The constructor works for explicitly moved values (ie std::move(x))
-// 4 The constructor works for true temporaries (ie a return value)
-//
-// Plan
-// 1 Explicitly construct unique_ptr<T, D> for various deleter types 'D'.
-// check that the value and deleter have been properly moved. (C-1,2,3)
-//
-// 2 Use the expression 'sink(source())' to move construct a unique_ptr<T, D>
-// from a temporary. 'source' should return the unique_ptr by value and
-// 'sink' should accept the unique_ptr by value. (C-1,2,4)
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-template <class Expect>
-void sinkFunction(Expect)
-{
-}
-
-typedef std::unique_ptr<A> APtrSource1;
-typedef std::unique_ptr<A, Deleter<A> > APtrSource2;
-typedef std::unique_ptr<A, NCDeleter<A>& > APtrSource3;
-
-APtrSource1 source1() {
- return APtrSource1 (new A);
-}
-
-void sink1(APtrSource1 p) {
- assert(p.get() != nullptr);
-}
-
-APtrSource2 source2() {
- return APtrSource2(new A, Deleter<A>(5));
-}
-
-void sink2(APtrSource2 p) {
- assert(p.get() != nullptr);
- assert(p.get_deleter().state() == 5);
-}
-
-APtrSource3 source3() {
- static NCDeleter<A> d(5);
- return APtrSource3(new A, d);
-}
-
-void sink3(APtrSource3 p) {
- assert(p.get() != nullptr);
- assert(p.get_deleter().state() == 5);
- assert(&p.get_deleter() == &source3().get_deleter());
-}
-
-int main()
-{
- {
- typedef std::unique_ptr<A> APtr;
- APtr s(new A);
- A* p = s.get();
- APtr s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
- {
- typedef Deleter<A> MoveDel;
- typedef std::unique_ptr<A, MoveDel> APtr;
- MoveDel d(5);
- APtr s(new A, std::move(d));
- assert(d.state() == 0);
- assert(s.get_deleter().state() == 5);
- A* p = s.get();
- APtr s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- {
- typedef NCDeleter<A> NonCopyDel;
- typedef std::unique_ptr<A, NonCopyDel&> APtr;
-
- NonCopyDel d;
- APtr s(new A, d);
- A* p = s.get();
- APtr s2 = std::move(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- {
- sink1(source1());
- assert(A::count == 0);
- sink2(source2());
- assert(A::count == 0);
- sink3(source3());
- assert(A::count == 0);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.fail.cpp
deleted file mode 100644
index 68ad589b1148..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.fail.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <cassert>
-
-// test move ctor. Can't copy from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> s(new A);
- A* p = s.get();
- std::unique_ptr<A> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.fail.cpp
deleted file mode 100644
index 897b889d6778..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.fail.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <cassert>
-
-// test move ctor. Can't copy from const lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<A> s(new A);
- A* p = s.get();
- std::unique_ptr<A> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move03.fail.cpp
deleted file mode 100644
index 7fb1a0a74811..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move03.fail.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <cassert>
-
-// test move ctor. Can't copy from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete p;}
-};
-
-int main()
-{
- {
- std::unique_ptr<A, Deleter> s(new A);
- A* p = s.get();
- std::unique_ptr<A, Deleter> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move04.fail.cpp
deleted file mode 100644
index 671e343fd7f5..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move04.fail.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr move ctor
-
-#include <memory>
-#include <cassert>
-
-// test move ctor. Can't copy from const lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-class Deleter
-{
- int state_;
-
-public:
-
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(A* p) {delete p;}
-};
-
-int main()
-{
- {
- const std::unique_ptr<A, Deleter> s(new A);
- A* p = s.get();
- std::unique_ptr<A, Deleter> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert.pass.cpp
deleted file mode 100644
index f00fcfe15b80..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert.pass.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// NOTE: unique_ptr does not provide converting constructors in c++03
-// XFAIL: c++98, c++03
-
-
-
-#include <memory>
-#include <type_traits>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-
-template <class LHS, class RHS>
-void checkReferenceDeleter(LHS& lhs, RHS& rhs) {
- typedef typename LHS::deleter_type NewDel;
- static_assert(std::is_reference<NewDel>::value, "");
- rhs.get_deleter().set_state(42);
- assert(rhs.get_deleter().state() == 42);
- assert(lhs.get_deleter().state() == 42);
- lhs.get_deleter().set_state(99);
- assert(lhs.get_deleter().state() == 99);
- assert(rhs.get_deleter().state() == 99);
-}
-
-template <class LHS, class RHS>
-void checkDeleter(LHS& lhs, RHS& rhs, int LHSVal, int RHSVal) {
- assert(lhs.get_deleter().state() == LHSVal);
- assert(rhs.get_deleter().state() == RHSVal);
-}
-
-template <class LHS, class RHS>
-void checkCtor(LHS& lhs, RHS& rhs, A* RHSVal) {
- assert(lhs.get() == RHSVal);
- assert(rhs.get() == nullptr);
- assert(A::count == 1);
- assert(B::count == 1);
-}
-
-void checkNoneAlive() {
- assert(A::count == 0);
- assert(B::count == 0);
-}
-
-int main()
-{
- {
- typedef std::unique_ptr<A> APtr;
- typedef std::unique_ptr<B> BPtr;
- { // explicit
- BPtr b(new B);
- A* p = b.get();
- APtr a(std::move(b));
- checkCtor(a, b, p);
- }
- checkNoneAlive();
- { // implicit
- BPtr b(new B);
- A* p = b.get();
- APtr a = std::move(b);
- checkCtor(a, b, p);
- }
- checkNoneAlive();
- }
- { // test with moveable deleters
- typedef std::unique_ptr<A, Deleter<A> > APtr;
- typedef std::unique_ptr<B, Deleter<B> > BPtr;
- {
- Deleter<B> del(5);
- BPtr b(new B, std::move(del));
- A* p = b.get();
- APtr a(std::move(b));
- checkCtor(a, b, p);
- checkDeleter(a, b, 5, 0);
- }
- checkNoneAlive();
- {
- Deleter<B> del(5);
- BPtr b(new B, std::move(del));
- A* p = b.get();
- APtr a = std::move(b);
- checkCtor(a, b, p);
- checkDeleter(a, b, 5, 0);
- }
- checkNoneAlive();
-
- }
- { // test with reference deleters
- typedef std::unique_ptr<A, NCDeleter<A>& > APtr;
- typedef std::unique_ptr<B, NCDeleter<A>& > BPtr;
- NCDeleter<A> del(5);
- {
- BPtr b(new B, del);
- A* p = b.get();
- APtr a(std::move(b));
- checkCtor(a, b, p);
- checkReferenceDeleter(a, b);
- }
- checkNoneAlive();
- {
- BPtr b(new B, del);
- A* p = b.get();
- APtr a = std::move(b);
- checkCtor(a, b, p);
- checkReferenceDeleter(a, b);
- }
- checkNoneAlive();
- }
- {
- typedef std::unique_ptr<A, CDeleter<A> > APtr;
- typedef std::unique_ptr<B, CDeleter<B>& > BPtr;
- CDeleter<B> del(5);
- {
- BPtr b(new B, del);
- A* p = b.get();
- APtr a(std::move(b));
- checkCtor(a, b, p);
- checkDeleter(a, b, 5, 5);
- }
- checkNoneAlive();
- {
- BPtr b(new B, del);
- A* p = b.get();
- APtr a = std::move(b);
- checkCtor(a, b, p);
- checkDeleter(a, b, 5, 5);
- }
- checkNoneAlive();
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.fail.cpp
deleted file mode 100644
index ed1fe8c2bdd4..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.fail.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// Can't construct from lvalue
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B> s(new B);
- A* p = s.get();
- std::unique_ptr<A> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.fail.cpp
deleted file mode 100644
index a1bf634b9995..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.fail.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B, Deleter<B> > s(new B);
- A* p = s.get();
- std::unique_ptr<A, Deleter<A> > s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- assert(s2.get_deleter().state() == 5);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.fail.cpp
deleted file mode 100644
index 7409199791b5..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.fail.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B, CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A, CDeleter<A>&> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.fail.cpp
deleted file mode 100644
index 981ea706eb29..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.fail.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// implicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<B> s(new B);
- A* p = s.get();
- std::unique_ptr<A> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.fail.cpp
deleted file mode 100644
index d055b80627f9..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.fail.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-#include "../../deleter.h"
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Implicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- std::unique_ptr<B, Deleter<B> > s(new B);
- std::unique_ptr<A, Deleter<A> > s2 = s;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.fail.cpp
deleted file mode 100644
index 5b9b12e0d60b..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.fail.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- std::unique_ptr<B, CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A, CDeleter<A>&> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.fail.cpp
deleted file mode 100644
index bef022cfc143..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.fail.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B> s(new B);
- A* p = s.get();
- std::unique_ptr<A> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp
deleted file mode 100644
index 016eadcb2460..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class Deleter
-{
- int state_;
- Deleter(const Deleter&);
- Deleter& operator=(const Deleter&);
-
-public:
- Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;}
- Deleter& operator=(Deleter&& r)
- {
- state_ = r.state_;
- r.state_ = 0;
- return *this;
- }
-
- Deleter() : state_(5) {}
-
- template <class U>
- Deleter(Deleter<U>&& d,
- typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
- : state_(d.state()) {d.set_state(0);}
-
-private:
- template <class U>
- Deleter(const Deleter<U>& d,
- typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
-
-public:
- int state() const {return state_;}
- void set_state(int i) {state_ = i;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- const std::unique_ptr<B, Deleter<B> > s;
- std::unique_ptr<A, Deleter<A> > s2(s); // expected-error {{no matching constructor}}
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert09.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert09.fail.cpp
deleted file mode 100644
index a475c17547c9..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert09.fail.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- const std::unique_ptr<B, CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A, CDeleter<A>&> s2(s);
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert10.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert10.fail.cpp
deleted file mode 100644
index f0da5efb6917..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert10.fail.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// implicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
- const std::unique_ptr<B> s(new B);
- A* p = s.get();
- std::unique_ptr<A> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp
deleted file mode 100644
index 1b8bb736df20..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Implicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class Deleter
-{
- int state_;
-
- Deleter(const Deleter&);
- Deleter& operator=(const Deleter&);
-public:
- Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;}
- Deleter& operator=(Deleter&& r)
- {
- state_ = r.state_;
- r.state_ = 0;
- return *this;
- }
-
- Deleter() : state_(5) {}
-
- template <class U>
- Deleter(Deleter<U>&& d,
- typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
- : state_(d.state()) {d.set_state(0);}
-
-private:
- template <class U>
- Deleter(const Deleter<U>& d,
- typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
-
-public:
- int state() const {return state_;}
- void set_state(int i) {state_ = i;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- const std::unique_ptr<B, Deleter<B> > s;
- std::unique_ptr<A, Deleter<A> > s2 = s; // expected-error {{no viable conversion}}
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert12.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert12.fail.cpp
deleted file mode 100644
index 095bec65669b..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert12.fail.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr converting move ctor
-
-#include <memory>
-#include <utility>
-#include <cassert>
-
-// test converting move ctor. Should only require a MoveConstructible deleter, or if
-// deleter is a reference, not even that.
-// Explicit version
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-template <class T>
-class CDeleter
-{
- int state_;
-
- CDeleter(CDeleter&);
- CDeleter& operator=(CDeleter&);
-public:
-
- CDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(T* p) {delete p;}
-};
-
-int main()
-{
- {
- CDeleter<A> d;
- const std::unique_ptr<B, CDeleter<A>&> s(new B, d);
- A* p = s.get();
- std::unique_ptr<A, CDeleter<A>&> s2 = s;
- assert(s2.get() == p);
- assert(s.get() == 0);
- assert(A::count == 1);
- assert(B::count == 1);
- d.set_state(6);
- assert(s2.get_deleter().state() == d.state());
- assert(s.get_deleter().state() == d.state());
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/nullptr.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/nullptr.pass.cpp
deleted file mode 100644
index 67a48a3e7a12..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/nullptr.pass.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// unique_ptr(nullptr_t);
-
-#include <memory>
-#include <cassert>
-
-// default unique_ptr ctor should only require default Deleter ctor
-class Deleter
-{
- int state_;
-
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
-
-public:
- Deleter() : state_(5) {}
-
- int state() const {return state_;}
-
- void operator()(void*) {}
-};
-
-int main()
-{
- {
- std::unique_ptr<int> p(nullptr);
- assert(p.get() == 0);
- }
- {
- std::unique_ptr<int, Deleter> p(nullptr);
- assert(p.get() == 0);
- assert(p.get_deleter().state() == 5);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer.pass.cpp
deleted file mode 100644
index faa554d8b320..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer.pass.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-//=============================================================================
-// TESTING std::unique_ptr::unique_ptr()
-//
-// Concerns:
-// 1 The pointer constructor works for any default constructible deleter types.
-// 2 The pointer constructor accepts pointers to derived types.
-// 2 The stored type 'T' is allowed to be incomplete.
-//
-// Plan
-// 1 Construct unique_ptr<T, D>'s with a pointer to 'T' and various deleter
-// types (C-1)
-// 2 Construct unique_ptr<T, D>'s with a pointer to 'D' and various deleter
-// types where 'D' is derived from 'T'. (C-1,2)
-// 3 Construct a unique_ptr<T, D> with a pointer to 'T' and various deleter
-// types where 'T' is an incomplete type (C-1,3)
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-// unique_ptr(pointer) ctor should only require default Deleter ctor
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-
-struct IncompleteT;
-
-IncompleteT* getIncomplete();
-void checkNumIncompleteTypeAlive(int i);
-
-template <class Del = std::default_delete<IncompleteT> >
-struct StoresIncomplete {
- std::unique_ptr<IncompleteT, Del> m_ptr;
- StoresIncomplete() {}
- explicit StoresIncomplete(IncompleteT* ptr) : m_ptr(ptr) {}
- ~StoresIncomplete();
-
- IncompleteT* get() const { return m_ptr.get(); }
- Del& get_deleter() { return m_ptr.get_deleter(); }
-};
-
-void test_pointer()
-{
- {
- A* p = new A;
- assert(A::count == 1);
- std::unique_ptr<A> s(p);
- assert(s.get() == p);
- }
- assert(A::count == 0);
- {
- A* p = new A;
- assert(A::count == 1);
- std::unique_ptr<A, NCDeleter<A> > s(p);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
-}
-
-void test_derived()
-{
- {
- B* p = new B;
- assert(A::count == 1);
- assert(B::count == 1);
- std::unique_ptr<A> s(p);
- assert(s.get() == p);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
- B* p = new B;
- assert(A::count == 1);
- assert(B::count == 1);
- std::unique_ptr<A, NCDeleter<A> > s(p);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 0);
- }
- assert(A::count == 0);
- assert(B::count == 0);
-}
-
-void test_incomplete()
-{
- {
- IncompleteT* p = getIncomplete();
- checkNumIncompleteTypeAlive(1);
- StoresIncomplete<> s(p);
- assert(s.get() == p);
- }
- checkNumIncompleteTypeAlive(0);
- {
- IncompleteT* p = getIncomplete();
- checkNumIncompleteTypeAlive(1);
- StoresIncomplete< NCDeleter<IncompleteT> > s(p);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 0);
- }
- checkNumIncompleteTypeAlive(0);
-}
-
-struct IncompleteT {
- static int count;
- IncompleteT() { ++count; }
- ~IncompleteT() {--count; }
-};
-
-int IncompleteT::count = 0;
-
-IncompleteT* getIncomplete() {
- return new IncompleteT;
-}
-
-void checkNumIncompleteTypeAlive(int i) {
- assert(IncompleteT::count == i);
-}
-
-template <class Del>
-StoresIncomplete<Del>::~StoresIncomplete() { }
-
-int main()
-{
- test_pointer();
- test_derived();
- test_incomplete();
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer01.fail.cpp
deleted file mode 100644
index 1af04b2c0033..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer01.fail.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-
-// unique_ptr(pointer) ctor should require default Deleter ctor
-class Deleter
-{
-
- Deleter() {}
-
-public:
-
- Deleter(Deleter&) {}
- Deleter& operator=(Deleter&) {}
-
- void operator()(void*) const {}
-};
-
-int main()
-{
- std::unique_ptr<int, Deleter> p(new int);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02.fail.cpp
deleted file mode 100644
index 9b7dd8c70f28..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02.fail.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-
-// unique_ptr(pointer) ctor should require non-reference Deleter ctor
-class Deleter
-{
-public:
-
- void operator()(void*) {}
-};
-
-int main()
-{
- std::unique_ptr<int, Deleter&> p(new int);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer03.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer03.fail.cpp
deleted file mode 100644
index a917d87eeede..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer03.fail.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// Test unique_ptr(pointer) ctor
-
-#include <memory>
-
-// unique_ptr(pointer) ctor should require non-pointer Deleter
-
-int main()
-{
- std::unique_ptr<int, void (*)(void*)> p(new int);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter.pass.cpp
deleted file mode 100644
index 7ddd16265107..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter.pass.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-//=============================================================================
-// TESTING unique_ptr(pointer, deleter)
-//
-// Concerns:
-// 1 unique_ptr(pointer, deleter&&) only requires a MoveConstructible deleter.
-// 2 unique_ptr(pointer, deleter&) requires a CopyConstructible deleter.
-// 3 unique_ptr<T, D&>(pointer, deleter) does not require a CopyConstructible deleter.
-// 4 unique_ptr<T, D const&>(pointer, deleter) does not require a CopyConstructible deleter.
-// 5 unique_ptr(pointer, deleter) should work for derived pointers.
-// 6 unique_ptr(pointer, deleter) should work with function pointers.
-// 7 unique_ptr<void> should work.
-
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
-
-int A::count = 0;
-
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-bool my_free_called = false;
-
-void my_free(void*) {
- my_free_called = true;
-}
-
-int main()
-{
- { // MoveConstructible deleter (C-1)
- A* p = new A;
- assert(A::count == 1);
- std::unique_ptr<A, Deleter<A> > s(p, Deleter<A>(5));
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- { // CopyConstructible deleter (C-2)
- A* p = new A;
- assert(A::count == 1);
- CopyDeleter<A> d(5);
- std::unique_ptr<A, CopyDeleter<A> > s(p, d);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- d.set_state(6);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- { // Reference deleter (C-3)
- A* p = new A;
- assert(A::count == 1);
- NCDeleter<A> d(5);
- std::unique_ptr<A, NCDeleter<A>&> s(p, d);
- assert(s.get() == p);
- assert(&s.get_deleter() == &d);
- assert(s.get_deleter().state() == 5);
- d.set_state(6);
- assert(s.get_deleter().state() == 6);
- }
- assert(A::count == 0);
- { // Const Reference deleter (C-4)
- A* p = new A;
- assert(A::count == 1);
- NCConstDeleter<A> d(5);
- std::unique_ptr<A, NCConstDeleter<A> const&> s(p, d);
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- assert(&s.get_deleter() == &d);
- }
- assert(A::count == 0);
- { // Derived pointers (C-5)
- B* p = new B;
- assert(A::count == 1);
- assert(B::count == 1);
- std::unique_ptr<A, Deleter<A> > s(p, Deleter<A>(5));
- assert(s.get() == p);
- assert(s.get_deleter().state() == 5);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- { // Void and function pointers (C-6,7)
- {
- int i = 0;
- std::unique_ptr<void, void(*)(void*)> s(&i, my_free);
- assert(s.get() == &i);
- assert(s.get_deleter() == my_free);
- assert(!my_free_called);
- }
- assert(my_free_called);
- }
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/release.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/release.pass.cpp
deleted file mode 100644
index dadd4ecbe590..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/release.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test release
-
-#include <memory>
-#include <cassert>
-
-int main()
-{
- std::unique_ptr<int> p(new int(3));
- int* i = p.get();
- int* j = p.release();
- assert(p.get() == 0);
- assert(i == j);
- delete j;
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset1.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset1.pass.cpp
deleted file mode 100644
index 2cf7f8b77568..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset1.pass.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test reset
-
-#include <memory>
-#include <cassert>
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> p(new A);
- assert(A::count == 1);
- A* i = p.get();
- assert(i != nullptr);
- p.reset();
- assert(A::count == 0);
- assert(p.get() == 0);
- }
- assert(A::count == 0);
- {
- std::unique_ptr<A> p(new A);
- assert(A::count == 1);
- A* i = p.get();
- assert(i != nullptr);
- p.reset(new A);
- assert(A::count == 1);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/swap.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/swap.pass.cpp
deleted file mode 100644
index d0a03be80326..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/swap.pass.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test swap
-
-#include <memory>
-#include <cassert>
-
-#include "../../deleter.h"
-
-struct A
-{
- int state_;
- static int count;
- explicit A(int i) : state_(i) {++count;}
- A(const A& a) : state_(a.state_) {++count;}
- A& operator=(const A& a) {state_ = a.state_; return *this;}
- ~A() {--count;}
-
- friend bool operator==(const A& x, const A& y)
- {return x.state_ == y.state_;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- A* p1 = new A(1);
- std::unique_ptr<A, Deleter<A> > s1(p1, Deleter<A>(1));
- A* p2 = new A(2);
- std::unique_ptr<A, Deleter<A> > s2(p2, Deleter<A>(2));
- assert(s1.get() == p1);
- assert(*s1 == A(1));
- assert(s1.get_deleter().state() == 1);
- assert(s2.get() == p2);
- assert(*s2 == A(2));
- assert(s2.get_deleter().state() == 2);
- s1.swap(s2);
- assert(s1.get() == p2);
- assert(*s1 == A(2));
- assert(s1.get_deleter().state() == 2);
- assert(s2.get() == p1);
- assert(*s2 == A(1));
- assert(s2.get_deleter().state() == 1);
- assert(A::count == 2);
- }
- assert(A::count == 0);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get.pass.cpp
deleted file mode 100644
index 24fa6beb4273..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get.pass.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test get
-
-#include <memory>
-#include <cassert>
-
-int main()
-{
- int* p = new int;
- std::unique_ptr<int> s(p);
- assert(s.get() == p);
-}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get_deleter.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get_deleter.pass.cpp
deleted file mode 100644
index 5ed8a22b14c4..000000000000
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/get_deleter.pass.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// unique_ptr
-
-// test get_deleter()
-
-#include <memory>
-#include <cassert>
-
-struct Deleter
-{
- void operator()(void*) {}
-
- int test() {return 5;}
- int test() const {return 6;}
-};
-
-int main()
-{
- {
- std::unique_ptr<int, Deleter> p;
- assert(p.get_deleter().test() == 5);
- }
- {
- const std::unique_ptr<int, Deleter> p;
- assert(p.get_deleter().test() == 6);
- }
-}
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
index b9f8ee0746c3..5a0d9259c11d 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
@@ -51,11 +51,11 @@ struct Bar : public Foo {
int main()
{
- { // https://llvm.org/bugs/show_bug.cgi?id=18843
+ { // https://bugs.llvm.org/show_bug.cgi?id=18843
std::shared_ptr<T const> t1(new T);
std::shared_ptr<T const> t2(std::make_shared<T>());
}
- { // https://llvm.org/bugs/show_bug.cgi?id=27115
+ { // https://bugs.llvm.org/show_bug.cgi?id=27115
int x = 42;
std::shared_ptr<Bar> t1(new Bar(42));
assert(t1->shared_from_this() == t1);
@@ -84,12 +84,12 @@ int main()
T* ptr = new T;
std::shared_ptr<T> s(ptr);
{
- // Don't re-initialize the "enabled_shared_from_this" base
+ // Don't re-initialize the "enable_shared_from_this" base
// because it already references a non-expired shared_ptr.
std::shared_ptr<T> s2(ptr, &nullDeleter);
}
#if TEST_STD_VER > 14
- // The enabled_shared_from_this base should still be referencing
+ // The enable_shared_from_this base should still be referencing
// the original shared_ptr.
assert(!ptr->weak_from_this().expired());
#endif
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer03.fail.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp
index 31f7ce367e3d..e9237c534fba 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer03.fail.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/enabled_hash.pass.cpp
@@ -7,17 +7,17 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
-
-// unique_ptr
+// UNSUPPORTED: c++98, c++03
-// Test unique_ptr<T[]>(pointer) ctor
+// <memory>
-// unique_ptr<T[]>(pointer) ctor should require non-pointer Deleter
+// Test that <memory> provides all of the arithmetic, enum, and pointer
+// hash specializations.
#include <memory>
-int main()
-{
- std::unique_ptr<int[], void (*)(void*)> p(new int);
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
}
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp
index 990cb58722b1..5fba1fc0460b 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp
@@ -20,11 +20,25 @@
#include <memory>
#include <cassert>
+#if TEST_STD_VER >= 11
+#include "poisoned_hash_helper.hpp"
+
+struct A {};
+#endif
+
int main()
{
+ {
int* ptr = new int;
std::shared_ptr<int> p(ptr);
std::hash<std::shared_ptr<int> > f;
std::size_t h = f(p);
assert(h == std::hash<int*>()(ptr));
+ }
+#if TEST_STD_VER >= 11
+ {
+ test_hash_enabled_for_type<std::shared_ptr<int>>();
+ test_hash_enabled_for_type<std::shared_ptr<A>>();
+ }
+#endif
}
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
index 5cd4ab1f83d0..fc346d4dce7d 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
@@ -20,11 +20,80 @@
#include <memory>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER >= 11
+#include "poisoned_hash_helper.hpp"
+#include "deleter_types.h"
+#include "min_allocator.h"
+
+template <class ValueT, class Del>
+void test_enabled_with_deleter() {
+ using UPtr = std::unique_ptr<ValueT, Del>;
+ using pointer = typename UPtr::pointer;
+ using RawDel = typename std::decay<Del>::type;
+ RawDel d(1);
+ UPtr p(nullptr, std::forward<Del>(d));
+ test_hash_enabled_for_type<UPtr>(p);
+ test_hash_enabled_for_type<pointer>();
+}
+
+template <class ValueT, class Del>
+void test_disabled_with_deleter() {
+ using UPtr = std::unique_ptr<ValueT, Del>;
+ using pointer = typename UPtr::pointer;
+ test_hash_disabled_for_type<UPtr>();
+ test_hash_disabled_for_type<pointer>();
+}
+
+namespace std {
+
+template <class T>
+struct hash<::min_pointer<T, std::integral_constant<size_t, 1>>> {
+ size_t operator()(::min_pointer<T, std::integral_constant<size_t, 1>> p) const noexcept(false) {
+ if (!p) return 0;
+ return std::hash<T*>{}(std::addressof(*p));
+ }
+};
+}
+
+struct A {};
+
+#endif // TEST_STD_VER >= 11
+
int main()
{
+ {
int* ptr = new int;
std::unique_ptr<int> p(ptr);
std::hash<std::unique_ptr<int> > f;
+ ASSERT_NOT_NOEXCEPT(f(p));
std::size_t h = f(p);
assert(h == std::hash<int*>()(ptr));
+ }
+#if TEST_STD_VER >= 11
+ {
+ test_enabled_with_deleter<int, Deleter<int>>();
+ test_enabled_with_deleter<int[], Deleter<int[]>>();
+ test_enabled_with_deleter<int, CopyDeleter<int>>();
+ test_enabled_with_deleter<int, CopyDeleter<int[]>>();
+ test_enabled_with_deleter<int, NCDeleter<int>&>();
+ test_enabled_with_deleter<int[], NCDeleter<int[]>&>();
+ test_enabled_with_deleter<int, NCConstDeleter<int> const&>();
+ test_enabled_with_deleter<int[], NCConstDeleter<int[]> const&>();
+ }
+ {
+ test_enabled_with_deleter<int, PointerDeleter<int, 1>>();
+ test_enabled_with_deleter<int[], PointerDeleter<int[], 1>>();
+ test_enabled_with_deleter<A, PointerDeleter<A, 1>>();
+ test_enabled_with_deleter<A[], PointerDeleter<A[], 1>>();
+
+#if TEST_STD_VER > 14
+ test_disabled_with_deleter<int, PointerDeleter<int, 0>>();
+ test_disabled_with_deleter<int[], PointerDeleter<int[], 0>>();
+ test_disabled_with_deleter<A, PointerDeleter<A, 0>>();
+ test_disabled_with_deleter<A[], PointerDeleter<A[], 0>>();
+#endif
+ }
+#endif
}
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 3bad537e3431..d1e13139bce3 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 5cc1234ad34e..08e31e8d7d70 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 a89c0dbd2207..f8f550deb051 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 821cea6868e4..1ea11ceed43d 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 66be756d54fd..9a5792f519d5 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 493ba7fcc94d..aac9af082d74 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 4820d05420a2..fa79e7cdd9ad 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 ef8dc822102f..c650899f764a 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 a13a7d57ab96..cbcc4ddbbc2c 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-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 6dfe3166c8c5..eb5e246833c2 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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.7
+// XFAIL: with_system_cxx_lib=x86_64-apple-macosx10.8
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h
deleted file mode 100644
index 6b3f1e2ab0de..000000000000
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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.
-//
-//===----------------------------------------------------------------------===//
-
-// <memory>
-
-// shared_ptr
-
-// Example move-only deleter
-
-#ifndef DELETER_H
-#define DELETER_H
-
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-#if TEST_STD_VER >= 11
-#define DELETE_FUNCTION = delete
-#else
-#define DELETE_FUNCTION { assert(false); }
-#endif
-
-struct test_deleter_base
-{
- static int count;
- static int dealloc_count;
-};
-
-int test_deleter_base::count = 0;
-int test_deleter_base::dealloc_count = 0;
-
-template <class T>
-class test_deleter
- : public test_deleter_base
-{
- int state_;
-
-public:
-
- test_deleter() : state_(0) {++count;}
- explicit test_deleter(int s) : state_(s) {++count;}
- test_deleter(const test_deleter& d)
- : state_(d.state_) {++count;}
- ~test_deleter() {assert(state_ >= 0); --count; state_ = -1;}
-
- int state() const {return state_;}
- void set_state(int i) {state_ = i;}
-
- void operator()(T* p) {assert(state_ >= 0); ++dealloc_count; delete p;}
-
- test_deleter* operator&() const DELETE_FUNCTION;
-};
-
-template <class T>
-void
-swap(test_deleter<T>& x, test_deleter<T>& y)
-{
- test_deleter<T> t(std::move(x));
- x = std::move(y);
- y = std::move(t);
-}
-
-#endif // DELETER_H
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp
index a6c62496fd62..05a199cced63 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/get_deleter.pass.cpp
@@ -15,7 +15,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
index 21cdf4a13e47..10d53c1268aa 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
@@ -10,6 +10,7 @@
// <memory>
// shared_ptr
+// REQUIRES: c++98 || c++03 || c++11 || c++14
// template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r);
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
index f8fdb7a09478..3ad3232a90b4 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
@@ -10,6 +10,7 @@
// <memory>
// template<class Y> explicit shared_ptr(auto_ptr<Y>&& r);
+// REQUIRES: c++98 || c++03 || c++11 || c++14
#include <memory>
@@ -85,6 +86,7 @@ int main()
// Without rvalue references, ptr got copied into
// the shared_ptr destructor and the copy was
// destroyed during unwinding.
+ (void) raw_ptr; // silence 'unused variable' warning
assert(A::count == 0);
assert(B::count == 0);
#endif
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp
index 7d4dc38d4b9a..bf2a304011c8 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp
@@ -15,7 +15,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp
index 8a6cd0f352ff..aabc66a03c40 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp
@@ -13,7 +13,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
#include "test_allocator.h"
#include "min_allocator.h"
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp
index 2e6441d66316..55e52f49c752 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator_throw.pass.cpp
@@ -14,7 +14,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
#include "test_allocator.h"
struct A
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp
index 009b4cfc00f9..e82f0fdcc9ed 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_throw.pass.cpp
@@ -24,7 +24,7 @@
#include "test_macros.h"
#include "count_new.hpp"
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
index 43eedee176c2..c813f6f6f9c5 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
@@ -15,7 +15,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
index b0facfc1a6eb..96a1779fe870 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
@@ -13,7 +13,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
#include "test_allocator.h"
#include "min_allocator.h"
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp
index 388599bd7015..47d24c349871 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator_throw.pass.cpp
@@ -14,7 +14,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
#include "test_allocator.h"
struct A
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp
index 7b40d6df2164..13c2d435b93a 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_throw.pass.cpp
@@ -22,7 +22,7 @@
#include <cstdlib>
#include "count_new.hpp"
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
index 877577c9ce58..17289197d35e 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
@@ -80,6 +80,7 @@ int main()
assert(B::count == 1);
assert(ptr.get() == raw_ptr);
#else
+ (void) raw_ptr; // silence 'unused variable' warning
assert(A::count == 0);
assert(B::count == 0);
assert(ptr.get() == 0);
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
index 8d782716b94f..2a7ac9979d02 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
@@ -59,7 +59,7 @@ int main()
assert(p->get_char() == 'e');
}
- { // https://llvm.org/bugs/show_bug.cgi?id=24137
+ { // https://bugs.llvm.org/show_bug.cgi?id=24137
std::shared_ptr<Foo> p1 = std::make_shared<Foo>();
assert(p1.get());
std::shared_ptr<const Foo> p2 = std::make_shared<const Foo>();
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
index 33965dfeb33c..c33133d79fdc 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
@@ -15,7 +15,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
struct B
{
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
index 09070e2c059b..58262eb4334e 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
@@ -15,7 +15,7 @@
#include <memory>
#include <cassert>
-#include "../test_deleter.h"
+#include "deleter_types.h"
#include "test_allocator.h"
struct B
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp
index 3acd2f8c6f2d..9f6f1bc75c71 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_shared_ptr.pass.cpp
@@ -11,10 +11,11 @@
// shared_ptr
-// template <class U> bool owner_before(shared_ptr<U> const& b) const;
+// template <class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
#include <memory>
#include <cassert>
+#include "test_macros.h"
int main()
{
@@ -25,4 +26,5 @@ int main()
assert(!p2.owner_before(p1));
assert(p1.owner_before(p3) || p3.owner_before(p1));
assert(p3.owner_before(p1) == p3.owner_before(p2));
+ ASSERT_NOEXCEPT(p1.owner_before(p2));
}
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp
index 33447ba7da00..560293bbedb7 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/owner_before_weak_ptr.pass.cpp
@@ -11,10 +11,11 @@
// shared_ptr
-// template <class U> bool owner_before(weak_ptr<U> const& b) const;
+// template <class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
#include <memory>
#include <cassert>
+#include "test_macros.h"
int main()
{
@@ -28,4 +29,5 @@ int main()
assert(!p2.owner_before(w1));
assert(p1.owner_before(w3) || p3.owner_before(w1));
assert(p3.owner_before(w1) == p3.owner_before(w2));
+ ASSERT_NOEXCEPT(p1.owner_before(w2));
}
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 142eba2d9647..7ab60da77c7d 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
@@ -16,9 +16,9 @@
// : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
// {
// typedef bool result_type;
-// bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const;
-// bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
-// bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
+// bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
+// bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+// bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
// };
//
// template <class T>
@@ -26,22 +26,22 @@
// : binary_function<weak_ptr<T>, weak_ptr<T>, bool>
// {
// typedef bool result_type;
-// bool operator()(weak_ptr<T> const&, weak_ptr<T> const&) const;
-// bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
-// bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
+// bool operator()(weak_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+// bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
+// bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
// };
//
// Added in C++17
// template<> struct owner_less<void>
// {
// template<class T, class U>
-// bool operator()(shared_ptr<T> const&, shared_ptr<U> const&) const;
+// bool operator()(shared_ptr<T> const&, shared_ptr<U> const&) const noexcept;
// template<class T, class U>
-// bool operator()(shared_ptr<T> const&, weak_ptr<U> const&) const;
+// bool operator()(shared_ptr<T> const&, weak_ptr<U> const&) const noexcept;
// template<class T, class U>
-// bool operator()(weak_ptr<T> const&, shared_ptr<U> const&) const;
+// bool operator()(weak_ptr<T> const&, shared_ptr<U> const&) const noexcept;
// template<class T, class U>
-// bool operator()(weak_ptr<T> const&, weak_ptr<U> const&) const;
+// bool operator()(weak_ptr<T> const&, weak_ptr<U> const&) const noexcept;
//
// typedef unspecified is_transparent;
// };
@@ -69,16 +69,19 @@ 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));
assert(cs(p3, p1) == cs(p3, p2));
+ ASSERT_NOEXCEPT(cs(p1, p1));
assert(!cs(p1, w2));
assert(!cs(p2, w1));
assert(cs(p1, w3) || cs(p3, w1));
assert(cs(p3, w1) == cs(p3, w2));
+ ASSERT_NOEXCEPT(cs(p1, w1));
+ ASSERT_NOEXCEPT(cs(w1, p1));
}
{
typedef std::owner_less<std::weak_ptr<int> > CS;
@@ -92,11 +95,14 @@ int main()
assert(!cs(w2, w1));
assert(cs(w1, w3) || cs(w3, w1));
assert(cs(w3, w1) == cs(w3, w2));
+ ASSERT_NOEXCEPT(cs(w1, w1));
assert(!cs(w1, p2));
assert(!cs(w2, p1));
assert(cs(w1, p3) || cs(w3, p1));
assert(cs(w3, p1) == cs(w3, p2));
+ ASSERT_NOEXCEPT(cs(w1, p1));
+ ASSERT_NOEXCEPT(cs(p1, w1));
}
#if TEST_STD_VER > 14
{
@@ -111,6 +117,10 @@ int main()
cmp(sp1, sp3);
cmp(wp1, sp1);
cmp(wp1, wp1);
+ ASSERT_NOEXCEPT(cmp(sp1, sp1));
+ ASSERT_NOEXCEPT(cmp(sp1, wp1));
+ ASSERT_NOEXCEPT(cmp(wp1, sp1));
+ ASSERT_NOEXCEPT(cmp(wp1, wp1));
}
{
// test heterogeneous lookups
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp
index 4aa49cfe8a24..458f8a11ed12 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_shared_ptr.pass.cpp
@@ -11,10 +11,11 @@
// weak_ptr
-// template<class U> bool owner_before(const shared_ptr<U>& b);
+// template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept;
#include <memory>
#include <cassert>
+#include "test_macros.h"
int main()
{
@@ -28,4 +29,6 @@ int main()
assert(!w2.owner_before(p1));
assert(w1.owner_before(p3) || w3.owner_before(p1));
assert(w3.owner_before(p1) == w3.owner_before(p2));
+// change to 'ASSERT_NOEXCEPT' when LWG2942 is adopted
+ LIBCPP_ASSERT_NOEXCEPT(w1.owner_before(p2));
}
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp
index 9fe2b6e39035..5cd171a53021 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/owner_before_weak_ptr.pass.cpp
@@ -11,10 +11,11 @@
// weak_ptr
-// template<class U> bool owner_before(const weak_ptr<U>& b);
+// template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
#include <memory>
#include <cassert>
+#include "test_macros.h"
int main()
{
@@ -28,4 +29,6 @@ int main()
assert(!w2.owner_before(w1));
assert(w1.owner_before(w3) || w3.owner_before(w1));
assert(w3.owner_before(w1) == w3.owner_before(w2));
+// change to 'ASSERT_NOEXCEPT' when LWG2942 is adopted
+ LIBCPP_ASSERT_NOEXCEPT(w1.owner_before(w2));
}
diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
index 61523e4872d4..85b14726617f 100644
--- a/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
+++ b/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
@@ -37,8 +37,16 @@ namespace std
typedef S<T> type;
};
+// P0548
+ template <class T>
+ struct common_type< ::S<T>, ::S<T> > {
+ typedef S<T> type;
+ };
+
template <> struct common_type< ::S<long>, long> {};
template <> struct common_type<long, ::S<long> > {};
+ template <> struct common_type< ::X<float> > {};
+ template <> struct common_type< ::X<double>, ::X<double> > {};
}
#if TEST_STD_VER >= 11
@@ -88,6 +96,9 @@ void test_bullet_two() {
static_assert(std::is_same<CommonType<int const>, int>::value, "");
static_assert(std::is_same<CommonType<int volatile[]>, int volatile*>::value, "");
static_assert(std::is_same<CommonType<void(&)()>, void(*)()>::value, "");
+
+ static_assert(no_common_type<X<float> >::value, "");
+ static_assert(no_common_type<X<double> >::value, "");
}
template <class T, class U, class Expect>
@@ -284,4 +295,18 @@ int main()
test_bullet_three_two();
test_bullet_four();
#endif
+
+// P0548
+ static_assert((std::is_same<std::common_type<S<int> >::type, S<int> >::value), "");
+ static_assert((std::is_same<std::common_type<S<int>, S<int> >::type, S<int> >::value), "");
+
+ static_assert((std::is_same<std::common_type<int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<const int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<volatile int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<const volatile int>::type, int>::value), "");
+
+ static_assert((std::is_same<std::common_type<int, int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<const int, int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<int, const int>::type, int>::value), "");
+ static_assert((std::is_same<std::common_type<const int, const int>::type, int>::value), "");
}
diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp
index bcd839849453..4f45a0340a91 100644
--- a/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp
+++ b/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp
@@ -33,4 +33,10 @@ int main()
test_decay<int[3], int*>();
test_decay<const int[3], const int*>();
test_decay<void(), void (*)()>();
+#if TEST_STD_VER > 11
+ test_decay<int(int) const, int(int) const>();
+ test_decay<int(int) volatile, int(int) volatile>();
+ test_decay<int(int) &, int(int) &>();
+ test_decay<int(int) &&, int(int) &&>();
+#endif
}
diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
index 8cb5853bbc6d..eac4e4a089fe 100644
--- a/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
+++ b/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
@@ -26,7 +26,6 @@ struct wat
struct F {};
struct FD : public F {};
-struct NotDerived {};
template <class T, class U>
void test_result_of_imp()
@@ -43,7 +42,6 @@ void test_result_of_imp()
int main()
{
- typedef NotDerived ND;
{
typedef char F::*PMD;
test_result_of_imp<PMD(F &), char &>();
diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
index 410e47e03bcc..b00798b72240 100644
--- a/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
+++ b/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
@@ -17,24 +17,32 @@
#include "test_macros.h"
enum E { V = INT_MIN };
-enum F { W = UINT_MAX };
-int main()
-{
#if !defined(_WIN32) || defined(__MINGW32__)
- typedef unsigned ExpectUnsigned;
+ #define TEST_UNSIGNED_UNDERLYING_TYPE 1
#else
- typedef int ExpectUnsigned; // MSVC's ABI doesn't follow the Standard
+ #define TEST_UNSIGNED_UNDERLYING_TYPE 0 // MSVC's ABI doesn't follow the Standard
#endif
+
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+enum F { W = UINT_MAX };
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
+
+int main()
+{
static_assert((std::is_same<std::underlying_type<E>::type, int>::value),
"E has the wrong underlying type");
- static_assert((std::is_same<std::underlying_type<F>::type, ExpectUnsigned>::value),
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+ static_assert((std::is_same<std::underlying_type<F>::type, unsigned>::value),
"F has the wrong underlying type");
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
#if TEST_STD_VER > 11
static_assert((std::is_same<std::underlying_type_t<E>, int>::value), "");
- static_assert((std::is_same<std::underlying_type_t<F>, ExpectUnsigned>::value), "");
-#endif
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+ static_assert((std::is_same<std::underlying_type_t<F>, unsigned>::value), "");
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
+#endif // TEST_STD_VER > 11
#if TEST_STD_VER >= 11
enum G : char { };
@@ -43,6 +51,6 @@ int main()
"G has the wrong underlying type");
#if TEST_STD_VER > 11
static_assert((std::is_same<std::underlying_type_t<G>, char>::value), "");
-#endif
+#endif // TEST_STD_VER > 11
#endif // TEST_STD_VER >= 11
}
diff --git a/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp b/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp
index 05ef99d0ebf4..2d10fb0040a7 100644
--- a/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp
+++ b/test/std/utilities/meta/meta.unary.prop.query/void_t.pass.cpp
@@ -13,7 +13,7 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// XFAIL: gcc-5.1 gcc-5.2
+// XFAIL: gcc-5.1, gcc-5.2
#include <type_traits>
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 32e4f06beb04..c340ba69cda3 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
@@ -13,6 +13,7 @@
#include <type_traits>
#include <cstddef> // for std::nullptr_t
+
#include "test_macros.h"
template <class T>
@@ -79,22 +80,27 @@ int main()
test_is_function<int(Abstract *)>();
test_is_function<void(...)>();
- test_is_not_function<std::nullptr_t>();
- test_is_not_function<void>();
- test_is_not_function<int>();
- test_is_not_function<int&>();
- test_is_not_function<int&&>();
- test_is_not_function<int*>();
- test_is_not_function<double>();
- test_is_not_function<char[3]>();
- test_is_not_function<char[]>();
- test_is_not_function<Union>();
- test_is_not_function<Enum>();
- test_is_not_function<FunctionPtr>(); // function pointer is not a function
- test_is_not_function<Empty>();
- test_is_not_function<bit_zero>();
- test_is_not_function<NotEmpty>();
- test_is_not_function<Abstract>();
- test_is_not_function<Abstract*>();
- test_is_not_function<incomplete_type>();
+ test_is_not_function<std::nullptr_t>();
+ test_is_not_function<void>();
+ test_is_not_function<int>();
+ test_is_not_function<int&>();
+ test_is_not_function<int&&>();
+ test_is_not_function<int*>();
+ test_is_not_function<double>();
+ test_is_not_function<char[3]>();
+ test_is_not_function<char[]>();
+ test_is_not_function<Union>();
+ test_is_not_function<Enum>();
+ test_is_not_function<FunctionPtr>(); // function pointer is not a function
+ test_is_not_function<Empty>();
+ test_is_not_function<bit_zero>();
+ test_is_not_function<NotEmpty>();
+ test_is_not_function<Abstract>();
+ test_is_not_function<Abstract*>();
+ test_is_not_function<incomplete_type>();
+
+#if TEST_STD_VER >= 11
+ test_is_function<void() noexcept>();
+ test_is_function<void() const && noexcept>();
+#endif
}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp
index d4043f48f98e..a63a88c4d18b 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_member_pointer.pass.cpp
@@ -97,4 +97,10 @@ int main()
test_is_not_member_pointer<NotEmpty>();
test_is_not_member_pointer<Abstract>();
test_is_not_member_pointer<incomplete_type>();
+
+#if TEST_STD_VER >= 11
+ test_is_member_pointer<int (Empty::*)(int, ...) const>();
+ test_is_member_pointer<int (Empty::*)(int, long, long) const noexcept>();
+ test_is_member_pointer<int (Empty::*)() & noexcept>();
+#endif
}
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 a895a8d447b6..691c549b5e78 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
@@ -52,90 +52,175 @@ struct incomplete_type;
int main()
{
- test_member_function_pointer<void (Class::*)()>();
- test_member_function_pointer<void (Class::*)(int)>();
- test_member_function_pointer<void (Class::*)(int, char)>();
+ test_member_function_pointer<void (Class::*)()>();
+ test_member_function_pointer<void (Class::*)(int)>();
+ test_member_function_pointer<void (Class::*)(int, char)>();
- test_member_function_pointer<void (Class::*)() const>();
- test_member_function_pointer<void (Class::*)(int) const>();
- test_member_function_pointer<void (Class::*)(int, char) const>();
+ test_member_function_pointer<void (Class::*)() const>();
+ test_member_function_pointer<void (Class::*)(int) const>();
+ test_member_function_pointer<void (Class::*)(int, char) const>();
- test_member_function_pointer<void (Class::*)() volatile>();
- test_member_function_pointer<void (Class::*)(int) volatile>();
- test_member_function_pointer<void (Class::*)(int, char) volatile>();
+ test_member_function_pointer<void (Class::*)() volatile>();
+ test_member_function_pointer<void (Class::*)(int) volatile>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile>();
- test_member_function_pointer<void (Class::*)(...)>();
- test_member_function_pointer<void (Class::*)(int, ...)>();
- test_member_function_pointer<void (Class::*)(int, char, ...)>();
+ test_member_function_pointer<void (Class::*)(...)>();
+ test_member_function_pointer<void (Class::*)(int, ...)>();
+ test_member_function_pointer<void (Class::*)(int, char, ...)>();
- test_member_function_pointer<void (Class::*)(...) const>();
- test_member_function_pointer<void (Class::*)(int, ...) const>();
- test_member_function_pointer<void (Class::*)(int, char, ...) const>();
+ test_member_function_pointer<void (Class::*)(...) const>();
+ test_member_function_pointer<void (Class::*)(int, ...) const>();
+ test_member_function_pointer<void (Class::*)(int, char, ...) const>();
+
+ test_member_function_pointer<void (Class::*)(...) volatile>();
+ test_member_function_pointer<void (Class::*)(int, ...) volatile>();
+ test_member_function_pointer<void (Class::*)(int, char, ...) volatile>();
- test_member_function_pointer<void (Class::*)(...) volatile>();
- test_member_function_pointer<void (Class::*)(int, ...) volatile>();
- test_member_function_pointer<void (Class::*)(int, char, ...) volatile>();
// reference qualifiers on functions are a C++11 extension
#if TEST_STD_VER >= 11
- test_member_function_pointer<void (Class::*)() &>();
- test_member_function_pointer<void (Class::*)(int) &>();
- test_member_function_pointer<void (Class::*)(int, char) &>();
- test_member_function_pointer<void (Class::*)(...) &>();
- test_member_function_pointer<void (Class::*)(int,...) &>();
- test_member_function_pointer<void (Class::*)(int, char,...) &>();
-
- test_member_function_pointer<void (Class::*)() const &>();
- test_member_function_pointer<void (Class::*)(int) const &>();
- test_member_function_pointer<void (Class::*)(int, char) const &>();
- test_member_function_pointer<void (Class::*)(...) const &>();
- test_member_function_pointer<void (Class::*)(int,...) const &>();
- test_member_function_pointer<void (Class::*)(int, char,...) const &>();
-
- test_member_function_pointer<void (Class::*)() volatile &>();
- test_member_function_pointer<void (Class::*)(int) volatile &>();
- test_member_function_pointer<void (Class::*)(int, char) volatile &>();
- test_member_function_pointer<void (Class::*)(...) volatile &>();
- test_member_function_pointer<void (Class::*)(int,...) volatile &>();
- test_member_function_pointer<void (Class::*)(int, char,...) volatile &>();
-
- test_member_function_pointer<void (Class::*)() const volatile &>();
- test_member_function_pointer<void (Class::*)(int) const volatile &>();
- test_member_function_pointer<void (Class::*)(int, char) const volatile &>();
- test_member_function_pointer<void (Class::*)(...) const volatile &>();
- test_member_function_pointer<void (Class::*)(int,...) const volatile &>();
- test_member_function_pointer<void (Class::*)(int, char,...) const volatile &>();
-
- // RValue qualifiers
- test_member_function_pointer<void (Class::*)() &&>();
- test_member_function_pointer<void (Class::*)(int) &&>();
- test_member_function_pointer<void (Class::*)(int, char) &&>();
- test_member_function_pointer<void (Class::*)(...) &&>();
- test_member_function_pointer<void (Class::*)(int,...) &&>();
- test_member_function_pointer<void (Class::*)(int, char,...) &&>();
-
- test_member_function_pointer<void (Class::*)() const &&>();
- test_member_function_pointer<void (Class::*)(int) const &&>();
- test_member_function_pointer<void (Class::*)(int, char) const &&>();
- test_member_function_pointer<void (Class::*)(...) const &&>();
- test_member_function_pointer<void (Class::*)(int,...) const &&>();
- test_member_function_pointer<void (Class::*)(int, char,...) const &&>();
-
- test_member_function_pointer<void (Class::*)() volatile &&>();
- test_member_function_pointer<void (Class::*)(int) volatile &&>();
- test_member_function_pointer<void (Class::*)(int, char) volatile &&>();
- test_member_function_pointer<void (Class::*)(...) volatile &&>();
- test_member_function_pointer<void (Class::*)(int,...) volatile &&>();
- test_member_function_pointer<void (Class::*)(int, char,...) volatile &&>();
-
- test_member_function_pointer<void (Class::*)() const volatile &&>();
- test_member_function_pointer<void (Class::*)(int) const volatile &&>();
- test_member_function_pointer<void (Class::*)(int, char) const volatile &&>();
- test_member_function_pointer<void (Class::*)(...) const volatile &&>();
- test_member_function_pointer<void (Class::*)(int,...) const volatile &&>();
- test_member_function_pointer<void (Class::*)(int, char,...) const volatile &&>();
+ // Noexcept qualifiers
+ test_member_function_pointer<void (Class::*)() noexcept>();
+ test_member_function_pointer<void (Class::*)(int) noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) noexcept>();
+
+ test_member_function_pointer<void (Class::*)() const noexcept>();
+ test_member_function_pointer<void (Class::*)(int) const noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) const noexcept>();
+
+ test_member_function_pointer<void (Class::*)() volatile noexcept>();
+ test_member_function_pointer<void (Class::*)(int) volatile noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile noexcept>();
+
+ test_member_function_pointer<void (Class::*)(...) noexcept>();
+ test_member_function_pointer<void (Class::*)(int, ...) noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char, ...) noexcept>();
+
+ test_member_function_pointer<void (Class::*)(...) const noexcept>();
+ test_member_function_pointer<void (Class::*)(int, ...) const noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char, ...) const noexcept>();
+
+ test_member_function_pointer<void (Class::*)(...) volatile noexcept>();
+ test_member_function_pointer<void (Class::*)(int, ...) volatile noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char, ...) volatile noexcept>();
+
+ // lvalue qualifiers
+ test_member_function_pointer<void (Class::*)() &>();
+ test_member_function_pointer<void (Class::*)(int) &>();
+ test_member_function_pointer<void (Class::*)(int, char) &>();
+ test_member_function_pointer<void (Class::*)(...) &>();
+ test_member_function_pointer<void (Class::*)(int,...) &>();
+ test_member_function_pointer<void (Class::*)(int, char,...) &>();
+
+ test_member_function_pointer<void (Class::*)() const &>();
+ test_member_function_pointer<void (Class::*)(int) const &>();
+ test_member_function_pointer<void (Class::*)(int, char) const &>();
+ test_member_function_pointer<void (Class::*)(...) const &>();
+ test_member_function_pointer<void (Class::*)(int,...) const &>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const &>();
+
+ test_member_function_pointer<void (Class::*)() volatile &>();
+ test_member_function_pointer<void (Class::*)(int) volatile &>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile &>();
+ test_member_function_pointer<void (Class::*)(...) volatile &>();
+ test_member_function_pointer<void (Class::*)(int,...) volatile &>();
+ test_member_function_pointer<void (Class::*)(int, char,...) volatile &>();
+
+ test_member_function_pointer<void (Class::*)() const volatile &>();
+ test_member_function_pointer<void (Class::*)(int) const volatile &>();
+ test_member_function_pointer<void (Class::*)(int, char) const volatile &>();
+ test_member_function_pointer<void (Class::*)(...) const volatile &>();
+ test_member_function_pointer<void (Class::*)(int,...) const volatile &>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const volatile &>();
+
+ // Lvalue qualifiers with noexcept
+ test_member_function_pointer<void (Class::*)() & noexcept>();
+ test_member_function_pointer<void (Class::*)(int) & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) & noexcept>();
+ test_member_function_pointer<void (Class::*)(...) & noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) & noexcept>();
+
+ test_member_function_pointer<void (Class::*)() const & noexcept>();
+ test_member_function_pointer<void (Class::*)(int) const & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) const & noexcept>();
+ test_member_function_pointer<void (Class::*)(...) const & noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) const & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const & noexcept>();
+
+ test_member_function_pointer<void (Class::*)() volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int) volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(...) volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) volatile & noexcept>();
+
+ test_member_function_pointer<void (Class::*)() const volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int) const volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) const volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(...) const volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) const volatile & noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const volatile & noexcept>();
+
+ // RValue qualifiers
+ test_member_function_pointer<void (Class::*)() &&>();
+ test_member_function_pointer<void (Class::*)(int) &&>();
+ test_member_function_pointer<void (Class::*)(int, char) &&>();
+ test_member_function_pointer<void (Class::*)(...) &&>();
+ test_member_function_pointer<void (Class::*)(int,...) &&>();
+ test_member_function_pointer<void (Class::*)(int, char,...) &&>();
+
+ test_member_function_pointer<void (Class::*)() const &&>();
+ test_member_function_pointer<void (Class::*)(int) const &&>();
+ test_member_function_pointer<void (Class::*)(int, char) const &&>();
+ test_member_function_pointer<void (Class::*)(...) const &&>();
+ test_member_function_pointer<void (Class::*)(int,...) const &&>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const &&>();
+
+ test_member_function_pointer<void (Class::*)() volatile &&>();
+ test_member_function_pointer<void (Class::*)(int) volatile &&>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile &&>();
+ test_member_function_pointer<void (Class::*)(...) volatile &&>();
+ test_member_function_pointer<void (Class::*)(int,...) volatile &&>();
+ test_member_function_pointer<void (Class::*)(int, char,...) volatile &&>();
+
+ test_member_function_pointer<void (Class::*)() const volatile &&>();
+ test_member_function_pointer<void (Class::*)(int) const volatile &&>();
+ test_member_function_pointer<void (Class::*)(int, char) const volatile &&>();
+ test_member_function_pointer<void (Class::*)(...) const volatile &&>();
+ test_member_function_pointer<void (Class::*)(int,...) const volatile &&>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const volatile &&>();
+
+ // RValue qualifiers with noexcept
+ test_member_function_pointer<void (Class::*)() && noexcept>();
+ test_member_function_pointer<void (Class::*)(int) && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) && noexcept>();
+ test_member_function_pointer<void (Class::*)(...) && noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) && noexcept>();
+
+ test_member_function_pointer<void (Class::*)() const && noexcept>();
+ test_member_function_pointer<void (Class::*)(int) const && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) const && noexcept>();
+ test_member_function_pointer<void (Class::*)(...) const && noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) const && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const && noexcept>();
+
+ test_member_function_pointer<void (Class::*)() volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int) volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(...) volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) volatile && noexcept>();
+
+ test_member_function_pointer<void (Class::*)() const volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int) const volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char) const volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(...) const volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int,...) const volatile && noexcept>();
+ test_member_function_pointer<void (Class::*)(int, char,...) const volatile && noexcept>();
#endif
// LWG#2582
- static_assert(!std::is_member_function_pointer<incomplete_type>::value, "");
+ static_assert(!std::is_member_function_pointer<incomplete_type>::value, "");
}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
index a54adf10258f..99ca74cc2fa9 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
@@ -65,6 +65,14 @@ class Abstract
virtual ~Abstract() = 0;
};
+template <class>
+struct AbstractTemplate {
+ virtual void test() = 0;
+};
+
+template <>
+struct AbstractTemplate<double> {};
+
int main()
{
test_is_not_abstract<void>();
@@ -81,4 +89,6 @@ int main()
test_is_not_abstract<NotEmpty>();
test_is_abstract<Abstract>();
+ test_is_abstract<AbstractTemplate<int> >();
+ test_is_not_abstract<AbstractTemplate<double> >();
}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp
new file mode 100644
index 000000000000..9c72d4d44ce5
--- /dev/null
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_aggregate.pass.cpp
@@ -0,0 +1,79 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// <type_traits>
+
+// template <class T> struct is_aggregate;
+// template <class T> constexpr bool is_aggregate_v = is_aggregate<T>::value;
+
+#include <type_traits>
+#include "test_macros.h"
+
+template <class T>
+void test_true()
+{
+#if !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
+ static_assert( std::is_aggregate<T>::value, "");
+ static_assert( std::is_aggregate<const T>::value, "");
+ static_assert( std::is_aggregate<volatile T>::value, "");
+ static_assert( std::is_aggregate<const volatile T>::value, "");
+ static_assert( std::is_aggregate_v<T>, "");
+ static_assert( std::is_aggregate_v<const T>, "");
+ static_assert( std::is_aggregate_v<volatile T>, "");
+ static_assert( std::is_aggregate_v<const volatile T>, "");
+#endif
+}
+
+template <class T>
+void test_false()
+{
+#if !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
+ static_assert(!std::is_aggregate<T>::value, "");
+ static_assert(!std::is_aggregate<const T>::value, "");
+ static_assert(!std::is_aggregate<volatile T>::value, "");
+ static_assert(!std::is_aggregate<const volatile T>::value, "");
+ static_assert(!std::is_aggregate_v<T>, "");
+ static_assert(!std::is_aggregate_v<const T>, "");
+ static_assert(!std::is_aggregate_v<volatile T>, "");
+ static_assert(!std::is_aggregate_v<const volatile T>, "");
+#endif
+}
+
+struct Aggregate {};
+struct HasCons { HasCons(int); };
+struct HasPriv {
+ void PreventUnusedPrivateMemberWarning();
+private:
+ int x;
+};
+struct Union { int x; void* y; };
+
+
+int main ()
+{
+ {
+ test_false<void>();
+ test_false<int>();
+ test_false<void*>();
+ test_false<void()>();
+ test_false<void() const>();
+ test_false<void(Aggregate::*)(int) const>();
+ test_false<Aggregate&>();
+ test_false<HasCons>();
+ test_false<HasPriv>();
+ }
+ {
+ test_true<Aggregate>();
+ test_true<Aggregate[]>();
+ test_true<Aggregate[42][101]>();
+ test_true<Union>();
+ }
+}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
index f4736e713422..3955d4bc3306 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
@@ -82,5 +82,4 @@ int main()
// pointer to incomplete template type
test_is_assignable<X<D>*&, X<D>*> ();
- test_is_not_assignable<Incomplete&, Incomplete const&>();
}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
index f6ae401533a9..9d2ec5edea58 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -251,6 +251,7 @@ int main()
LIBCPP_STATIC_ASSERT(
clang_disallows_valid_static_cast_bug !=
std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");
+ ((void)clang_disallows_valid_static_cast_bug); // Prevent unused warning
#else
static_assert(clang_disallows_valid_static_cast_bug == false, "");
LIBCPP_STATIC_ASSERT(std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
index 59aa5e26a292..7ead5f5d5df9 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
@@ -77,7 +77,7 @@ int main()
#endif
// Before C++14, void was not a literal type
-// In C++14, cv-void is is a literal type
+// In C++14, cv-void is a literal type
#if TEST_STD_VER < 14
test_is_not_literal_type<void>();
#else
diff --git a/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp
index b54a08f5575b..29fb7a8431f1 100644
--- a/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp
@@ -17,37 +17,48 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator == ( const X &lhs, const X &rhs )
- { return lhs.i_ == rhs.i_ ; }
+constexpr bool operator==(const X& lhs, const X& rhs) {
+ return lhs.i_ == rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 == T(1)), "" );
- static_assert ( (o2 == T(1)), "" );
- static_assert ( !(o3 == T(1)), "" );
- static_assert ( (o3 == T(2)), "" );
- static_assert ( (o3 == val), "" );
-
- static_assert ( !(T(1) == o1), "" );
- static_assert ( (T(1) == o2), "" );
- static_assert ( !(T(1) == o3), "" );
- static_assert ( (T(2) == o3), "" );
- static_assert ( (val == o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert(!(o1 == T(1)), "");
+ static_assert((o2 == T(1)), "");
+ static_assert(!(o3 == T(1)), "");
+ static_assert((o3 == T(2)), "");
+ static_assert((o3 == val), "");
+
+ static_assert(!(T(1) == o1), "");
+ static_assert((T(1) == o2), "");
+ static_assert(!(T(1) == o3), "");
+ static_assert((T(2) == o3), "");
+ static_assert((val == o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 == 42l, "");
+ static_assert(!(101l == o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 == 42, "");
+ static_assert(!(101 == o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
index 064114fb9db2..ae34eb20517e 100644
--- a/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp
@@ -17,39 +17,48 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator > ( const X &lhs, const X &rhs )
- { return lhs.i_ > rhs.i_ ; }
+constexpr bool operator>(const X& lhs, const X& rhs) { return lhs.i_ > rhs.i_; }
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 > T(1)), "" );
- static_assert ( !(o2 > T(1)), "" ); // equal
- static_assert ( (o3 > T(1)), "" );
- static_assert ( !(o2 > val), "" );
- static_assert ( !(o3 > val), "" ); // equal
- static_assert ( !(o3 > T(3)), "" );
-
- static_assert ( (T(1) > o1), "" );
- static_assert ( !(T(1) > o2), "" ); // equal
- static_assert ( !(T(1) > o3), "" );
- static_assert ( (val > o2), "" );
- static_assert ( !(val > o3), "" ); // equal
- static_assert ( (T(3) > o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert(!(o1 > T(1)), "");
+ static_assert(!(o2 > T(1)), ""); // equal
+ static_assert((o3 > T(1)), "");
+ static_assert(!(o2 > val), "");
+ static_assert(!(o3 > val), ""); // equal
+ static_assert(!(o3 > T(3)), "");
+
+ static_assert((T(1) > o1), "");
+ static_assert(!(T(1) > o2), ""); // equal
+ static_assert(!(T(1) > o3), "");
+ static_assert((val > o2), "");
+ static_assert(!(val > o3), ""); // equal
+ static_assert((T(3) > o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 > 11l, "");
+ static_assert(!(42l > o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 > 11, "");
+ static_assert(!(42 > o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
index 663686cdf347..dac94002661f 100644
--- a/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp
@@ -17,39 +17,50 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator >= ( const X &lhs, const X &rhs )
- { return lhs.i_ >= rhs.i_ ; }
+constexpr bool operator>=(const X& lhs, const X& rhs) {
+ return lhs.i_ >= rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( !(o1 >= T(1)), "" );
- static_assert ( (o2 >= T(1)), "" ); // equal
- static_assert ( (o3 >= T(1)), "" );
- static_assert ( !(o2 >= val), "" );
- static_assert ( (o3 >= val), "" ); // equal
- static_assert ( !(o3 >= T(3)), "" );
-
- static_assert ( (T(1) >= o1), "" );
- static_assert ( (T(1) >= o2), "" ); // equal
- static_assert ( !(T(1) >= o3), "" );
- static_assert ( (val >= o2), "" );
- static_assert ( (val >= o3), "" ); // equal
- static_assert ( (T(3) >= o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert(!(o1 >= T(1)), "");
+ static_assert((o2 >= T(1)), ""); // equal
+ static_assert((o3 >= T(1)), "");
+ static_assert(!(o2 >= val), "");
+ static_assert((o3 >= val), ""); // equal
+ static_assert(!(o3 >= T(3)), "");
+
+ static_assert((T(1) >= o1), "");
+ static_assert((T(1) >= o2), ""); // equal
+ static_assert(!(T(1) >= o3), "");
+ static_assert((val >= o2), "");
+ static_assert((val >= o3), ""); // equal
+ static_assert((T(3) >= o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 >= 42l, "");
+ static_assert(!(11l >= o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 >= 42, "");
+ static_assert(!(11 >= o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
index 05ac5eb12b48..b71f8363b0a6 100644
--- a/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp
@@ -17,39 +17,50 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator <= ( const X &lhs, const X &rhs )
- { return lhs.i_ <= rhs.i_ ; }
+constexpr bool operator<=(const X& lhs, const X& rhs) {
+ return lhs.i_ <= rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 <= T(1)), "" );
- static_assert ( (o2 <= T(1)), "" ); // equal
- static_assert ( !(o3 <= T(1)), "" );
- static_assert ( (o2 <= val), "" );
- static_assert ( (o3 <= val), "" ); // equal
- static_assert ( (o3 <= T(3)), "" );
-
- static_assert ( !(T(1) <= o1), "" );
- static_assert ( (T(1) <= o2), "" ); // equal
- static_assert ( (T(1) <= o3), "" );
- static_assert ( !(val <= o2), "" );
- static_assert ( (val <= o3), "" ); // equal
- static_assert ( !(T(3) <= o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert((o1 <= T(1)), "");
+ static_assert((o2 <= T(1)), ""); // equal
+ static_assert(!(o3 <= T(1)), "");
+ static_assert((o2 <= val), "");
+ static_assert((o3 <= val), ""); // equal
+ static_assert((o3 <= T(3)), "");
+
+ static_assert(!(T(1) <= o1), "");
+ static_assert((T(1) <= o2), ""); // equal
+ static_assert((T(1) <= o3), "");
+ static_assert(!(val <= o2), "");
+ static_assert((val <= o3), ""); // equal
+ static_assert(!(T(3) <= o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 <= 42l, "");
+ static_assert(!(101l <= o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 <= 42, "");
+ static_assert(!(101 <= o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
index d1891a286d7b..84456b3baa6e 100644
--- a/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp
@@ -17,39 +17,48 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator < ( const X &lhs, const X &rhs )
- { return lhs.i_ < rhs.i_ ; }
+constexpr bool operator<(const X& lhs, const X& rhs) { return lhs.i_ < rhs.i_; }
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 < T(1)), "" );
- static_assert ( !(o2 < T(1)), "" ); // equal
- static_assert ( !(o3 < T(1)), "" );
- static_assert ( (o2 < val), "" );
- static_assert ( !(o3 < val), "" ); // equal
- static_assert ( (o3 < T(3)), "" );
-
- static_assert ( !(T(1) < o1), "" );
- static_assert ( !(T(1) < o2), "" ); // equal
- static_assert ( (T(1) < o3), "" );
- static_assert ( !(val < o2), "" );
- static_assert ( !(val < o3), "" ); // equal
- static_assert ( !(T(3) < o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert((o1 < T(1)), "");
+ static_assert(!(o2 < T(1)), ""); // equal
+ static_assert(!(o3 < T(1)), "");
+ static_assert((o2 < val), "");
+ static_assert(!(o3 < val), ""); // equal
+ static_assert((o3 < T(3)), "");
+
+ static_assert(!(T(1) < o1), "");
+ static_assert(!(T(1) < o2), ""); // equal
+ static_assert((T(1) < o3), "");
+ static_assert(!(val < o2), "");
+ static_assert(!(val < o3), ""); // equal
+ static_assert(!(T(3) < o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 < 101l, "");
+ static_assert(!(42l < o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 < 101, "");
+ static_assert(!(42 < o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp b/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
index ae2ff808fb25..a4ffdc25e721 100644
--- a/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp
@@ -17,37 +17,48 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator != ( const X &lhs, const X &rhs )
- { return lhs.i_ != rhs.i_ ; }
+constexpr bool operator!=(const X& lhs, const X& rhs) {
+ return lhs.i_ != rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
constexpr T val(2);
- constexpr O o1; // disengaged
- constexpr O o2{1}; // engaged
- constexpr O o3{val}; // engaged
-
- static_assert ( (o1 != T(1)), "" );
- static_assert ( !(o2 != T(1)), "" );
- static_assert ( (o3 != T(1)), "" );
- static_assert ( !(o3 != T(2)), "" );
- static_assert ( !(o3 != val), "" );
-
- static_assert ( (T(1) != o1), "" );
- static_assert ( !(T(1) != o2), "" );
- static_assert ( (T(1) != o3), "" );
- static_assert ( !(T(2) != o3), "" );
- static_assert ( !(val != o3), "" );
- }
+ constexpr O o1; // disengaged
+ constexpr O o2{1}; // engaged
+ constexpr O o3{val}; // engaged
+
+ static_assert((o1 != T(1)), "");
+ static_assert(!(o2 != T(1)), "");
+ static_assert((o3 != T(1)), "");
+ static_assert(!(o3 != T(2)), "");
+ static_assert(!(o3 != val), "");
+
+ static_assert((T(1) != o1), "");
+ static_assert(!(T(1) != o2), "");
+ static_assert((T(1) != o3), "");
+ static_assert(!(T(2) != o3), "");
+ static_assert(!(val != o3), "");
+ }
+ {
+ using O = optional<int>;
+ constexpr O o1(42);
+ static_assert(o1 != 101l, "");
+ static_assert(!(42l != o1), "");
+ }
+ {
+ using O = optional<const int>;
+ constexpr O o1(42);
+ static_assert(o1 != 101, "");
+ static_assert(!(42 != o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp b/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp
new file mode 100644
index 000000000000..e54a4ced8411
--- /dev/null
+++ b/test/std/utilities/optional/optional.hash/enabled_hash.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// <optional>
+
+// Test that <optional> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <optional>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+
+ }
+}
diff --git a/test/std/utilities/optional/optional.hash/hash.pass.cpp b/test/std/utilities/optional/optional.hash/hash.pass.cpp
index dfdd07ddf452..8c91d6da761e 100644
--- a/test/std/utilities/optional/optional.hash/hash.pass.cpp
+++ b/test/std/utilities/optional/optional.hash/hash.pass.cpp
@@ -17,6 +17,19 @@
#include <memory>
#include <cassert>
+#include "poisoned_hash_helper.hpp"
+
+struct A {};
+struct B {};
+
+namespace std {
+
+template <>
+struct hash<B> {
+ size_t operator()(B const&) noexcept(false) { return 0; }
+};
+
+}
int main()
{
@@ -27,6 +40,7 @@ int main()
{
typedef int T;
optional<T> opt;
+ ASSERT_NOT_NOEXCEPT(std::hash<optional<T>>()(opt));
assert(std::hash<optional<T>>{}(opt) == nullopt_hash);
opt = 2;
assert(std::hash<optional<T>>{}(opt) == std::hash<T>{}(*opt));
@@ -34,6 +48,7 @@ int main()
{
typedef std::string T;
optional<T> opt;
+ ASSERT_NOT_NOEXCEPT(std::hash<optional<T>>()(opt));
assert(std::hash<optional<T>>{}(opt) == nullopt_hash);
opt = std::string("123");
assert(std::hash<optional<T>>{}(opt) == std::hash<T>{}(*opt));
@@ -41,8 +56,21 @@ int main()
{
typedef std::unique_ptr<int> T;
optional<T> opt;
+ ASSERT_NOT_NOEXCEPT(std::hash<optional<T>>()(opt));
assert(std::hash<optional<T>>{}(opt) == nullopt_hash);
opt = std::unique_ptr<int>(new int(3));
assert(std::hash<optional<T>>{}(opt) == std::hash<T>{}(*opt));
}
+ {
+ test_hash_enabled_for_type<std::optional<int> >();
+ test_hash_enabled_for_type<std::optional<int*> >();
+ test_hash_enabled_for_type<std::optional<const int> >();
+ test_hash_enabled_for_type<std::optional<int* const> >();
+
+ test_hash_disabled_for_type<std::optional<A>>();
+ test_hash_disabled_for_type<std::optional<const A>>();
+
+ test_hash_enabled_for_type<std::optional<B>>();
+ test_hash_enabled_for_type<std::optional<const B>>();
+ }
}
diff --git a/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp b/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp
new file mode 100644
index 000000000000..f9ea7b47911f
--- /dev/null
+++ b/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// <optional>
+
+// struct nullopt_t{see below};
+// constexpr nullopt_t nullopt(unspecified);
+
+// [optional.nullopt]/2:
+// Type nullopt_t shall not have a default constructor or an initializer-list constructor.
+// It shall not be an aggregate and shall be a literal type.
+// Constant nullopt shall be initialized with an argument of literal type.
+
+#include <optional>
+#include "test_macros.h"
+
+int main()
+{
+ std::nullopt_t n = {};
+}
diff --git a/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp b/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp
index 84bb29fabac8..9b752a665a83 100644
--- a/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp
+++ b/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp
@@ -13,6 +13,11 @@
// struct nullopt_t{see below};
// constexpr nullopt_t nullopt(unspecified);
+// [optional.nullopt]/2:
+// Type nullopt_t shall not have a default constructor or an initializer-list constructor.
+// It shall not be an aggregate and shall be a literal type.
+// Constant nullopt shall be initialized with an argument of literal type.
+
#include <optional>
#include <type_traits>
@@ -29,9 +34,9 @@ test(const nullopt_t&)
int main()
{
- static_assert((std::is_class<nullopt_t>::value), "");
- static_assert((std::is_empty<nullopt_t>::value), "");
- static_assert((std::is_literal_type<nullopt_t>::value), "");
+ static_assert(( std::is_class<nullopt_t>::value), "");
+ static_assert(( std::is_empty<nullopt_t>::value), "");
+ static_assert(( std::is_literal_type<nullopt_t>::value), "");
static_assert((!std::is_default_constructible<nullopt_t>::value), "");
static_assert(test(nullopt) == 3, "");
diff --git a/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp
index 1207e24150ff..0fcc52be1354 100644
--- a/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp
@@ -216,7 +216,6 @@ void test_throws()
#ifndef TEST_HAS_NO_EXCEPTIONS
using T = ThrowAssign;
{
- using T = ThrowAssign;
optional<T> opt;
try {
opt = 42;
diff --git a/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp
index b5362589963c..0696c11526d5 100644
--- a/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp
@@ -10,7 +10,7 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// <optional>
-// template <class... Args> void optional<T>::emplace(Args&&... args);
+// template <class... Args> T& optional<T>::emplace(Args&&... args);
#include <optional>
#include <type_traits>
@@ -51,27 +51,35 @@ void test_one_arg() {
using Opt = std::optional<T>;
{
Opt opt;
- opt.emplace();
+ auto & v = opt.emplace();
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
assert(*opt == T(0));
+ assert(&v == &*opt);
}
{
Opt opt;
- opt.emplace(1);
+ auto & v = opt.emplace(1);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
assert(*opt == T(1));
+ assert(&v == &*opt);
}
{
Opt opt(2);
- opt.emplace();
+ auto & v = opt.emplace();
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
assert(*opt == T(0));
+ assert(&v == &*opt);
}
{
Opt opt(2);
- opt.emplace(1);
+ auto & v = opt.emplace(1);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
assert(*opt == T(1));
+ assert(&v == &*opt);
}
}
@@ -83,20 +91,26 @@ void test_multi_arg()
using Opt = std::optional<T>;
{
Opt opt;
- opt.emplace(101, 41);
+ auto &v = opt.emplace(101, 41);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
+ assert( v == T(101, 41));
assert(*opt == T(101, 41));
}
{
Opt opt;
- opt.emplace({1, 2, 3, 4});
+ auto &v = opt.emplace({1, 2, 3, 4});
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
- assert(*opt == T(4)); // T sets its value to the size of the init list
+ assert( v == T(4)); // T sets its value to the size of the init list
+ assert(*opt == T(4));
}
{
Opt opt;
- opt.emplace({1, 2, 3, 4, 5}, 6);
+ auto &v = opt.emplace({1, 2, 3, 4, 5}, 6);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(static_cast<bool>(opt) == true);
+ assert( v == T(5)); // T sets its value to the size of the init list
assert(*opt == T(5)); // T sets its value to the size of the init list
}
}
@@ -109,73 +123,87 @@ void test_on_test_type() {
assert(T::alive == 0);
{
T::reset_constructors();
- opt.emplace();
+ auto &v = opt.emplace();
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::default_constructed == 1);
assert(T::destroyed == 0);
assert(static_cast<bool>(opt) == true);
assert(*opt == T());
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace();
+ auto &v = opt.emplace();
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::default_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T());
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace(101);
+ auto &v = opt.emplace(101);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::value_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T(101));
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace(-10, 99);
+ auto &v = opt.emplace(-10, 99);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::value_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T(-10, 99));
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace(-10, 99);
+ auto &v = opt.emplace(-10, 99);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::value_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T(-10, 99));
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace({-10, 99, 42, 1});
+ auto &v = opt.emplace({-10, 99, 42, 1});
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::value_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T(4)); // size of the initializer list
+ assert(&v == &*opt);
}
{
T::reset_constructors();
- opt.emplace({-10, 99, 42, 1}, 42);
+ auto &v = opt.emplace({-10, 99, 42, 1}, 42);
+ static_assert( std::is_same_v<T&, decltype(v)>, "" );
assert(T::alive == 1);
assert(T::constructed == 1);
assert(T::value_constructed == 1);
assert(T::destroyed == 1);
assert(static_cast<bool>(opt) == true);
assert(*opt == T(4)); // size of the initializer list
+ assert(&v == &*opt);
}
}
@@ -210,8 +238,10 @@ int main()
}
{
optional<const int> opt;
- opt.emplace(42);
+ auto &v = opt.emplace(42);
+ static_assert( std::is_same_v<const int&, decltype(v)>, "" );
assert(*opt == 42);
+ assert( v == 42);
opt.emplace();
assert(*opt == 0);
}
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 c4d4763a6f0a..d068fbc2db7e 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
@@ -35,6 +35,11 @@ struct ExplicitThrow
constexpr explicit ExplicitThrow(int x) { if (x != -1) TEST_THROW(6);}
};
+struct ImplicitAny {
+ template <class U>
+ constexpr ImplicitAny(U&&) {}
+};
+
template <class To, class From>
constexpr bool implicit_conversion(optional<To>&& opt, const From& v)
@@ -61,11 +66,9 @@ constexpr bool explicit_conversion(Input&& in, const Expect& v)
void test_implicit()
{
{
- using T = long long;
static_assert(implicit_conversion<long long>(42, 42), "");
}
{
- using T = long double;
static_assert(implicit_conversion<long double>(3.14, 3.14), "");
}
{
@@ -81,6 +84,15 @@ void test_implicit()
using T = TestTypes::TestType;
assert(implicit_conversion<T>(3, T(3)));
}
+ {
+ using O = optional<ImplicitAny>;
+ static_assert(!test_convertible<O, std::in_place_t>(), "");
+ static_assert(!test_convertible<O, std::in_place_t&>(), "");
+ static_assert(!test_convertible<O, const std::in_place_t&>(), "");
+ static_assert(!test_convertible<O, std::in_place_t&&>(), "");
+ static_assert(!test_convertible<O, const std::in_place_t&&>(), "");
+
+ }
#ifndef TEST_HAS_NO_EXCEPTIONS
{
try {
@@ -97,18 +109,15 @@ void test_implicit()
void test_explicit() {
{
using T = ExplicitTrivialTestTypes::TestType;
- using O = optional<T>;
static_assert(explicit_conversion<T>(42, 42), "");
}
{
using T = ExplicitConstexprTestTypes::TestType;
- using O = optional<T>;
static_assert(explicit_conversion<T>(42, 42), "");
static_assert(!std::is_convertible<int, T>::value, "");
}
{
using T = ExplicitTestTypes::TestType;
- using O = optional<T>;
T::reset();
{
assert(explicit_conversion<T>(42, 42));
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
new file mode 100644
index 000000000000..d9e5ca821e85
--- /dev/null
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// <optional>
+
+// constexpr optional(const optional<T>& rhs);
+// If is_trivially_copy_constructible_v<T> is true,
+// this constructor shall be a constexpr constructor.
+
+#include <optional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct S {
+ constexpr S() : v_(0) {}
+ S(int v) : v_(v) {}
+ S(const S &rhs) : v_(rhs.v_) {} // make it not trivially copyable
+ int v_;
+ };
+
+
+int main()
+{
+ static_assert (!std::is_trivially_copy_constructible_v<S>, "" );
+ constexpr std::optional<S> o1;
+ constexpr std::optional<S> o2 = o1; // not constexpr
+}
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
new file mode 100644
index 000000000000..c7458d95abfd
--- /dev/null
+++ b/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// <optional>
+
+// constexpr optional(const optional<T>&& rhs);
+// If is_trivially_move_constructible_v<T> is true,
+// this constructor shall be a constexpr constructor.
+
+#include <optional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct S {
+ constexpr S() : v_(0) {}
+ S(int v) : v_(v) {}
+ constexpr S(const S &rhs) : v_(rhs.v_) {} // not trivially moveable
+ constexpr S(const S &&rhs) : v_(rhs.v_) {} // not trivially moveable
+ int v_;
+ };
+
+
+int main()
+{
+ static_assert (!std::is_trivially_move_constructible_v<S>, "" );
+ constexpr std::optional<S> o1;
+ constexpr std::optional<S> o2 = std::move(o1); // not constexpr
+}
diff --git a/test/std/utilities/optional/optional.relops/equal.pass.cpp b/test/std/utilities/optional/optional.relops/equal.pass.cpp
index 6650b6720a8e..7667540f9760 100644
--- a/test/std/utilities/optional/optional.relops/equal.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/equal.pass.cpp
@@ -18,57 +18,69 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator == ( const X &lhs, const X &rhs )
- { return lhs.i_ == rhs.i_ ; }
+constexpr bool operator==(const X& lhs, const X& rhs) {
+ return lhs.i_ == rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
-
- static_assert ( o1 == o1 , "" );
- static_assert ( o1 == o2 , "" );
- static_assert ( !(o1 == o3), "" );
- static_assert ( !(o1 == o4), "" );
- static_assert ( !(o1 == o5), "" );
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( o2 == o1 , "" );
- static_assert ( o2 == o2 , "" );
- static_assert ( !(o2 == o3), "" );
- static_assert ( !(o2 == o4), "" );
- static_assert ( !(o2 == o5), "" );
+ static_assert(o1 == o1, "");
+ static_assert(o1 == o2, "");
+ static_assert(!(o1 == o3), "");
+ static_assert(!(o1 == o4), "");
+ static_assert(!(o1 == o5), "");
- static_assert ( !(o3 == o1), "" );
- static_assert ( !(o3 == o2), "" );
- static_assert ( o3 == o3 , "" );
- static_assert ( !(o3 == o4), "" );
- static_assert ( o3 == o5 , "" );
+ static_assert(o2 == o1, "");
+ static_assert(o2 == o2, "");
+ static_assert(!(o2 == o3), "");
+ static_assert(!(o2 == o4), "");
+ static_assert(!(o2 == o5), "");
- static_assert ( !(o4 == o1), "" );
- static_assert ( !(o4 == o2), "" );
- static_assert ( !(o4 == o3), "" );
- static_assert ( o4 == o4 , "" );
- static_assert ( !(o4 == o5), "" );
+ static_assert(!(o3 == o1), "");
+ static_assert(!(o3 == o2), "");
+ static_assert(o3 == o3, "");
+ static_assert(!(o3 == o4), "");
+ static_assert(o3 == o5, "");
- static_assert ( !(o5 == o1), "" );
- static_assert ( !(o5 == o2), "" );
- static_assert ( o5 == o3 , "" );
- static_assert ( !(o5 == o4), "" );
- static_assert ( o5 == o5 , "" );
+ static_assert(!(o4 == o1), "");
+ static_assert(!(o4 == o2), "");
+ static_assert(!(o4 == o3), "");
+ static_assert(o4 == o4, "");
+ static_assert(!(o4 == o5), "");
- }
+ static_assert(!(o5 == o1), "");
+ static_assert(!(o5 == o2), "");
+ static_assert(o5 == o3, "");
+ static_assert(!(o5 == o4), "");
+ static_assert(o5 == o5, "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 == O2(42), "");
+ static_assert(!(O2(101) == o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 == O2(42), "");
+ static_assert(!(O2(101) == o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp b/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp
index f9b30449638a..0e05834c147a 100644
--- a/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp
@@ -16,55 +16,68 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator >= ( const X &lhs, const X &rhs )
- { return lhs.i_ >= rhs.i_ ; }
+constexpr bool operator>=(const X& lhs, const X& rhs) {
+ return lhs.i_ >= rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef optional<X> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( (o1 >= o1), "" );
- static_assert ( (o1 >= o2), "" );
- static_assert ( !(o1 >= o3), "" );
- static_assert ( !(o1 >= o4), "" );
- static_assert ( !(o1 >= o5), "" );
+ static_assert((o1 >= o1), "");
+ static_assert((o1 >= o2), "");
+ static_assert(!(o1 >= o3), "");
+ static_assert(!(o1 >= o4), "");
+ static_assert(!(o1 >= o5), "");
- static_assert ( (o2 >= o1), "" );
- static_assert ( (o2 >= o2), "" );
- static_assert ( !(o2 >= o3), "" );
- static_assert ( !(o2 >= o4), "" );
- static_assert ( !(o2 >= o5), "" );
+ static_assert((o2 >= o1), "");
+ static_assert((o2 >= o2), "");
+ static_assert(!(o2 >= o3), "");
+ static_assert(!(o2 >= o4), "");
+ static_assert(!(o2 >= o5), "");
- static_assert ( (o3 >= o1), "" );
- static_assert ( (o3 >= o2), "" );
- static_assert ( (o3 >= o3), "" );
- static_assert ( !(o3 >= o4), "" );
- static_assert ( (o3 >= o5), "" );
+ static_assert((o3 >= o1), "");
+ static_assert((o3 >= o2), "");
+ static_assert((o3 >= o3), "");
+ static_assert(!(o3 >= o4), "");
+ static_assert((o3 >= o5), "");
- static_assert ( (o4 >= o1), "" );
- static_assert ( (o4 >= o2), "" );
- static_assert ( (o4 >= o3), "" );
- static_assert ( (o4 >= o4), "" );
- static_assert ( (o4 >= o5), "" );
+ static_assert((o4 >= o1), "");
+ static_assert((o4 >= o2), "");
+ static_assert((o4 >= o3), "");
+ static_assert((o4 >= o4), "");
+ static_assert((o4 >= o5), "");
- static_assert ( (o5 >= o1), "" );
- static_assert ( (o5 >= o2), "" );
- static_assert ( (o5 >= o3), "" );
- static_assert ( !(o5 >= o4), "" );
- static_assert ( (o5 >= o5), "" );
- }
+ static_assert((o5 >= o1), "");
+ static_assert((o5 >= o2), "");
+ static_assert((o5 >= o3), "");
+ static_assert(!(o5 >= o4), "");
+ static_assert((o5 >= o5), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 >= O2(42), "");
+ static_assert(!(O2(11) >= o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 >= O2(42), "");
+ static_assert(!(O2(1) >= o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.relops/greater_than.pass.cpp b/test/std/utilities/optional/optional.relops/greater_than.pass.cpp
index 8a27eb471f28..3946a6102ba9 100644
--- a/test/std/utilities/optional/optional.relops/greater_than.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/greater_than.pass.cpp
@@ -16,55 +16,66 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator > ( const X &lhs, const X &rhs )
- { return lhs.i_ > rhs.i_ ; }
+constexpr bool operator>(const X& lhs, const X& rhs) { return lhs.i_ > rhs.i_; }
-int main()
-{
- {
+int main() {
+ {
typedef optional<X> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( !(o1 > o1), "" );
- static_assert ( !(o1 > o2), "" );
- static_assert ( !(o1 > o3), "" );
- static_assert ( !(o1 > o4), "" );
- static_assert ( !(o1 > o5), "" );
+ static_assert(!(o1 > o1), "");
+ static_assert(!(o1 > o2), "");
+ static_assert(!(o1 > o3), "");
+ static_assert(!(o1 > o4), "");
+ static_assert(!(o1 > o5), "");
- static_assert ( !(o2 > o1), "" );
- static_assert ( !(o2 > o2), "" );
- static_assert ( !(o2 > o3), "" );
- static_assert ( !(o2 > o4), "" );
- static_assert ( !(o2 > o5), "" );
+ static_assert(!(o2 > o1), "");
+ static_assert(!(o2 > o2), "");
+ static_assert(!(o2 > o3), "");
+ static_assert(!(o2 > o4), "");
+ static_assert(!(o2 > o5), "");
- static_assert ( (o3 > o1), "" );
- static_assert ( (o3 > o2), "" );
- static_assert ( !(o3 > o3), "" );
- static_assert ( !(o3 > o4), "" );
- static_assert ( !(o3 > o5), "" );
+ static_assert((o3 > o1), "");
+ static_assert((o3 > o2), "");
+ static_assert(!(o3 > o3), "");
+ static_assert(!(o3 > o4), "");
+ static_assert(!(o3 > o5), "");
- static_assert ( (o4 > o1), "" );
- static_assert ( (o4 > o2), "" );
- static_assert ( (o4 > o3), "" );
- static_assert ( !(o4 > o4), "" );
- static_assert ( (o4 > o5), "" );
+ static_assert((o4 > o1), "");
+ static_assert((o4 > o2), "");
+ static_assert((o4 > o3), "");
+ static_assert(!(o4 > o4), "");
+ static_assert((o4 > o5), "");
- static_assert ( (o5 > o1), "" );
- static_assert ( (o5 > o2), "" );
- static_assert ( !(o5 > o3), "" );
- static_assert ( !(o5 > o4), "" );
- static_assert ( !(o5 > o5), "" );
- }
+ static_assert((o5 > o1), "");
+ static_assert((o5 > o2), "");
+ static_assert(!(o5 > o3), "");
+ static_assert(!(o5 > o4), "");
+ static_assert(!(o5 > o5), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 > O2(1), "");
+ static_assert(!(O2(42) > o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 > O2(1), "");
+ static_assert(!(O2(42) > o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.relops/less_equal.pass.cpp b/test/std/utilities/optional/optional.relops/less_equal.pass.cpp
index a7d594dd34a2..5a1954154f44 100644
--- a/test/std/utilities/optional/optional.relops/less_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/less_equal.pass.cpp
@@ -16,55 +16,68 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator <= ( const X &lhs, const X &rhs )
- { return lhs.i_ <= rhs.i_ ; }
+constexpr bool operator<=(const X& lhs, const X& rhs) {
+ return lhs.i_ <= rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef optional<X> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( (o1 <= o1), "" );
- static_assert ( (o1 <= o2), "" );
- static_assert ( (o1 <= o3), "" );
- static_assert ( (o1 <= o4), "" );
- static_assert ( (o1 <= o5), "" );
+ static_assert((o1 <= o1), "");
+ static_assert((o1 <= o2), "");
+ static_assert((o1 <= o3), "");
+ static_assert((o1 <= o4), "");
+ static_assert((o1 <= o5), "");
- static_assert ( (o2 <= o1), "" );
- static_assert ( (o2 <= o2), "" );
- static_assert ( (o2 <= o3), "" );
- static_assert ( (o2 <= o4), "" );
- static_assert ( (o2 <= o5), "" );
+ static_assert((o2 <= o1), "");
+ static_assert((o2 <= o2), "");
+ static_assert((o2 <= o3), "");
+ static_assert((o2 <= o4), "");
+ static_assert((o2 <= o5), "");
- static_assert ( !(o3 <= o1), "" );
- static_assert ( !(o3 <= o2), "" );
- static_assert ( (o3 <= o3), "" );
- static_assert ( (o3 <= o4), "" );
- static_assert ( (o3 <= o5), "" );
+ static_assert(!(o3 <= o1), "");
+ static_assert(!(o3 <= o2), "");
+ static_assert((o3 <= o3), "");
+ static_assert((o3 <= o4), "");
+ static_assert((o3 <= o5), "");
- static_assert ( !(o4 <= o1), "" );
- static_assert ( !(o4 <= o2), "" );
- static_assert ( !(o4 <= o3), "" );
- static_assert ( (o4 <= o4), "" );
- static_assert ( !(o4 <= o5), "" );
+ static_assert(!(o4 <= o1), "");
+ static_assert(!(o4 <= o2), "");
+ static_assert(!(o4 <= o3), "");
+ static_assert((o4 <= o4), "");
+ static_assert(!(o4 <= o5), "");
- static_assert ( !(o5 <= o1), "" );
- static_assert ( !(o5 <= o2), "" );
- static_assert ( (o5 <= o3), "" );
- static_assert ( (o5 <= o4), "" );
- static_assert ( (o5 <= o5), "" );
- }
+ static_assert(!(o5 <= o1), "");
+ static_assert(!(o5 <= o2), "");
+ static_assert((o5 <= o3), "");
+ static_assert((o5 <= o4), "");
+ static_assert((o5 <= o5), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 <= O2(42), "");
+ static_assert(!(O2(101) <= o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 <= O2(42), "");
+ static_assert(!(O2(101) <= o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.relops/less_than.pass.cpp b/test/std/utilities/optional/optional.relops/less_than.pass.cpp
index deffa5e849f9..35956e6f4a70 100644
--- a/test/std/utilities/optional/optional.relops/less_than.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/less_than.pass.cpp
@@ -16,55 +16,66 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator < ( const X &lhs, const X &rhs )
- { return lhs.i_ < rhs.i_ ; }
+constexpr bool operator<(const X& lhs, const X& rhs) { return lhs.i_ < rhs.i_; }
-int main()
-{
- {
+int main() {
+ {
typedef optional<X> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( !(o1 < o1), "" );
- static_assert ( !(o1 < o2), "" );
- static_assert ( (o1 < o3), "" );
- static_assert ( (o1 < o4), "" );
- static_assert ( (o1 < o5), "" );
+ static_assert(!(o1 < o1), "");
+ static_assert(!(o1 < o2), "");
+ static_assert((o1 < o3), "");
+ static_assert((o1 < o4), "");
+ static_assert((o1 < o5), "");
- static_assert ( !(o2 < o1), "" );
- static_assert ( !(o2 < o2), "" );
- static_assert ( (o2 < o3), "" );
- static_assert ( (o2 < o4), "" );
- static_assert ( (o2 < o5), "" );
+ static_assert(!(o2 < o1), "");
+ static_assert(!(o2 < o2), "");
+ static_assert((o2 < o3), "");
+ static_assert((o2 < o4), "");
+ static_assert((o2 < o5), "");
- static_assert ( !(o3 < o1), "" );
- static_assert ( !(o3 < o2), "" );
- static_assert ( !(o3 < o3), "" );
- static_assert ( (o3 < o4), "" );
- static_assert ( !(o3 < o5), "" );
+ static_assert(!(o3 < o1), "");
+ static_assert(!(o3 < o2), "");
+ static_assert(!(o3 < o3), "");
+ static_assert((o3 < o4), "");
+ static_assert(!(o3 < o5), "");
- static_assert ( !(o4 < o1), "" );
- static_assert ( !(o4 < o2), "" );
- static_assert ( !(o4 < o3), "" );
- static_assert ( !(o4 < o4), "" );
- static_assert ( !(o4 < o5), "" );
+ static_assert(!(o4 < o1), "");
+ static_assert(!(o4 < o2), "");
+ static_assert(!(o4 < o3), "");
+ static_assert(!(o4 < o4), "");
+ static_assert(!(o4 < o5), "");
- static_assert ( !(o5 < o1), "" );
- static_assert ( !(o5 < o2), "" );
- static_assert ( !(o5 < o3), "" );
- static_assert ( (o5 < o4), "" );
- static_assert ( !(o5 < o5), "" );
- }
+ static_assert(!(o5 < o1), "");
+ static_assert(!(o5 < o2), "");
+ static_assert(!(o5 < o3), "");
+ static_assert((o5 < o4), "");
+ static_assert(!(o5 < o5), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 < O2(101), "");
+ static_assert(!(O2(101) < o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 < O2(101), "");
+ static_assert(!(O2(101) < o1), "");
+ }
}
diff --git a/test/std/utilities/optional/optional.relops/not_equal.pass.cpp b/test/std/utilities/optional/optional.relops/not_equal.pass.cpp
index fd11b2a207ca..1256537d6a86 100644
--- a/test/std/utilities/optional/optional.relops/not_equal.pass.cpp
+++ b/test/std/utilities/optional/optional.relops/not_equal.pass.cpp
@@ -18,57 +18,69 @@
using std::optional;
-struct X
-{
- int i_;
+struct X {
+ int i_;
- constexpr X(int i) : i_(i) {}
+ constexpr X(int i) : i_(i) {}
};
-constexpr bool operator != ( const X &lhs, const X &rhs )
- { return lhs.i_ != rhs.i_ ; }
+constexpr bool operator!=(const X& lhs, const X& rhs) {
+ return lhs.i_ != rhs.i_;
+}
-int main()
-{
- {
+int main() {
+ {
typedef X T;
typedef optional<T> O;
- constexpr O o1; // disengaged
- constexpr O o2; // disengaged
- constexpr O o3{1}; // engaged
- constexpr O o4{2}; // engaged
- constexpr O o5{1}; // engaged
-
- static_assert ( !(o1 != o1), "" );
- static_assert ( !(o1 != o2), "" );
- static_assert ( (o1 != o3), "" );
- static_assert ( (o1 != o4), "" );
- static_assert ( (o1 != o5), "" );
+ constexpr O o1; // disengaged
+ constexpr O o2; // disengaged
+ constexpr O o3{1}; // engaged
+ constexpr O o4{2}; // engaged
+ constexpr O o5{1}; // engaged
- static_assert ( !(o2 != o1), "" );
- static_assert ( !(o2 != o2), "" );
- static_assert ( (o2 != o3), "" );
- static_assert ( (o2 != o4), "" );
- static_assert ( (o2 != o5), "" );
+ static_assert(!(o1 != o1), "");
+ static_assert(!(o1 != o2), "");
+ static_assert((o1 != o3), "");
+ static_assert((o1 != o4), "");
+ static_assert((o1 != o5), "");
- static_assert ( (o3 != o1), "" );
- static_assert ( (o3 != o2), "" );
- static_assert ( !(o3 != o3), "" );
- static_assert ( (o3 != o4), "" );
- static_assert ( !(o3 != o5), "" );
+ static_assert(!(o2 != o1), "");
+ static_assert(!(o2 != o2), "");
+ static_assert((o2 != o3), "");
+ static_assert((o2 != o4), "");
+ static_assert((o2 != o5), "");
- static_assert ( (o4 != o1), "" );
- static_assert ( (o4 != o2), "" );
- static_assert ( (o4 != o3), "" );
- static_assert ( !(o4 != o4), "" );
- static_assert ( (o4 != o5), "" );
+ static_assert((o3 != o1), "");
+ static_assert((o3 != o2), "");
+ static_assert(!(o3 != o3), "");
+ static_assert((o3 != o4), "");
+ static_assert(!(o3 != o5), "");
- static_assert ( (o5 != o1), "" );
- static_assert ( (o5 != o2), "" );
- static_assert ( !(o5 != o3), "" );
- static_assert ( (o5 != o4), "" );
- static_assert ( !(o5 != o5), "" );
+ static_assert((o4 != o1), "");
+ static_assert((o4 != o2), "");
+ static_assert((o4 != o3), "");
+ static_assert(!(o4 != o4), "");
+ static_assert((o4 != o5), "");
- }
+ static_assert((o5 != o1), "");
+ static_assert((o5 != o2), "");
+ static_assert(!(o5 != o3), "");
+ static_assert((o5 != o4), "");
+ static_assert(!(o5 != o5), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<long>;
+ constexpr O1 o1(42);
+ static_assert(o1 != O2(101), "");
+ static_assert(!(O2(42) != o1), "");
+ }
+ {
+ using O1 = optional<int>;
+ using O2 = optional<const int>;
+ constexpr O1 o1(42);
+ static_assert(o1 != O2(101), "");
+ static_assert(!(O2(42) != o1), "");
+ }
}
diff --git a/test/std/utilities/smartptr/unique.ptr/README.TXT b/test/std/utilities/smartptr/unique.ptr/README.TXT
new file mode 100644
index 000000000000..20f77f61827c
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/README.TXT
@@ -0,0 +1,16 @@
+Test Naming and Directory Structure
+===================================
+
+The directory structure for the unique_ptr class templates differs from the
+normal test directory naming conventions (e.g. matching the stable name in the standard).
+
+Instead of having a [unique.ptr.single] and [unique.ptr.runtime] directory,
+each containing their own tests, a single directory, "unique.ptr.class",
+contains both sets of tests.
+
+This allows the common behavior of the two unique_ptr specializations to be
+tested in the same place without duplication.
+
+Tests specific to [unique.ptr.single] have the suffix ".single.pass.cpp"
+and those specific to [unique.ptr.runtime] are named "*.runtime.pass.cpp".
+Tests for both specializations are named normally.
diff --git a/test/std/utilities/memory/unique.ptr/nothing_to_do.pass.cpp b/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp
index b58f5c55b643..b58f5c55b643 100644
--- a/test/std/utilities/memory/unique.ptr/nothing_to_do.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/nothing_to_do.pass.cpp
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp
new file mode 100644
index 000000000000..54c2cf16ecc7
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/pointer_type.pass.cpp
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr::pointer type
+
+#include <memory>
+#include <type_traits>
+
+#include "test_macros.h"
+
+struct Deleter {
+ struct pointer {};
+};
+
+struct D2 {
+private:
+ typedef void pointer;
+};
+
+struct D3 {
+ static long pointer;
+};
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, int[], int>::type VT;
+ {
+ typedef std::unique_ptr<VT> P;
+ static_assert((std::is_same<typename P::pointer, int*>::value), "");
+ }
+ {
+ typedef std::unique_ptr<VT, Deleter> P;
+ static_assert((std::is_same<typename P::pointer, Deleter::pointer>::value),
+ "");
+ }
+#if TEST_STD_VER >= 11
+ {
+ typedef std::unique_ptr<VT, D2> P;
+ static_assert(std::is_same<typename P::pointer, int*>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, D3> P;
+ static_assert(std::is_same<typename P::pointer, int*>::value, "");
+ }
+#endif
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp
new file mode 100644
index 000000000000..5d2f955aa185
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp
@@ -0,0 +1,120 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr move assignment
+
+// test move assignment. Should only require a MoveConstructible deleter, or if
+// deleter is a reference, not even that.
+
+#include <memory>
+#include <utility>
+#include <cassert>
+
+#include "deleter_types.h"
+#include "unique_ptr_test_helper.h"
+
+struct GenericDeleter {
+ void operator()(void*) const;
+};
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+ {
+ std::unique_ptr<VT> s1(newValue<VT>(expect_alive));
+ A* p = s1.get();
+ std::unique_ptr<VT> s2(newValue<VT>(expect_alive));
+ assert(A::count == (expect_alive * 2));
+ s2 = std::move(s1);
+ assert(A::count == expect_alive);
+ assert(s2.get() == p);
+ assert(s1.get() == 0);
+ }
+ assert(A::count == 0);
+ {
+ std::unique_ptr<VT, Deleter<VT> > s1(newValue<VT>(expect_alive),
+ Deleter<VT>(5));
+ A* p = s1.get();
+ std::unique_ptr<VT, Deleter<VT> > s2(newValue<VT>(expect_alive));
+ assert(A::count == (expect_alive * 2));
+ s2 = std::move(s1);
+ assert(s2.get() == p);
+ assert(s1.get() == 0);
+ assert(A::count == expect_alive);
+ assert(s2.get_deleter().state() == 5);
+ assert(s1.get_deleter().state() == 0);
+ }
+ assert(A::count == 0);
+ {
+ CDeleter<VT> d1(5);
+ std::unique_ptr<VT, CDeleter<VT>&> s1(newValue<VT>(expect_alive), d1);
+ A* p = s1.get();
+ CDeleter<VT> d2(6);
+ std::unique_ptr<VT, CDeleter<VT>&> s2(newValue<VT>(expect_alive), d2);
+ s2 = std::move(s1);
+ assert(s2.get() == p);
+ assert(s1.get() == 0);
+ assert(A::count == expect_alive);
+ assert(d1.state() == 5);
+ assert(d2.state() == 5);
+ }
+ assert(A::count == 0);
+}
+
+template <bool IsArray>
+void test_sfinae() {
+ typedef typename std::conditional<IsArray, int[], int>::type VT;
+ {
+ typedef std::unique_ptr<VT> U;
+ static_assert(!std::is_assignable<U, U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U, U&&>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, GenericDeleter> U;
+ static_assert(!std::is_assignable<U, U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U, U&&>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, NCDeleter<VT>&> U;
+ static_assert(!std::is_assignable<U, U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U, U&&>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, const NCDeleter<VT>&> U;
+ static_assert(!std::is_assignable<U, U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&>::value, "");
+ static_assert(!std::is_assignable<U, const U&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U, U&&>::value, "");
+ }
+}
+
+
+int main() {
+ {
+ test_basic</*IsArray*/ false>();
+ test_sfinae<false>();
+ }
+ {
+ test_basic</*IsArray*/ true>();
+ test_sfinae<true>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp
new file mode 100644
index 000000000000..8d83c3c8888a
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.pass.cpp
@@ -0,0 +1,420 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move ctor
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+#include "type_id.h"
+
+template <int ID = 0>
+struct GenericDeleter {
+ void operator()(void*) const {}
+};
+
+template <int ID = 0>
+struct GenericConvertingDeleter {
+
+ template <int OID>
+ GenericConvertingDeleter(GenericConvertingDeleter<OID>) {}
+
+ template <int OID>
+ GenericConvertingDeleter& operator=(GenericConvertingDeleter<OID> const&) {
+ return *this;
+ }
+
+ void operator()(void*) const {}
+};
+
+template <class T, class U>
+using EnableIfNotSame = typename std::enable_if<
+ !std::is_same<typename std::decay<T>::type, typename std::decay<U>::type>::value
+>::type;
+
+template <class Templ, class Other>
+struct is_specialization;
+
+template <template <int> class Templ, int ID1, class Other>
+struct is_specialization<Templ<ID1>, Other> : std::false_type {};
+
+template <template <int> class Templ, int ID1, int ID2>
+struct is_specialization<Templ<ID1>, Templ<ID2> > : std::true_type {};
+
+template <class Templ, class Other>
+using EnableIfSpecialization = typename std::enable_if<
+ is_specialization<Templ, typename std::decay<Other>::type >::value
+ >::type;
+
+template <int ID> struct TrackingDeleter;
+template <int ID> struct ConstTrackingDeleter;
+
+template <int ID>
+struct TrackingDeleter {
+ TrackingDeleter() : arg_type(&makeArgumentID<>()) {}
+
+ TrackingDeleter(TrackingDeleter const&)
+ : arg_type(&makeArgumentID<TrackingDeleter const&>()) {}
+
+ TrackingDeleter(TrackingDeleter&&)
+ : arg_type(&makeArgumentID<TrackingDeleter &&>()) {}
+
+ template <class T, class = EnableIfSpecialization<TrackingDeleter, T> >
+ TrackingDeleter(T&&) : arg_type(&makeArgumentID<T&&>()) {}
+
+ TrackingDeleter& operator=(TrackingDeleter const&) {
+ arg_type = &makeArgumentID<TrackingDeleter const&>();
+ return *this;
+ }
+
+ TrackingDeleter& operator=(TrackingDeleter &&) {
+ arg_type = &makeArgumentID<TrackingDeleter &&>();
+ return *this;
+ }
+
+ template <class T, class = EnableIfSpecialization<TrackingDeleter, T> >
+ TrackingDeleter& operator=(T&&) {
+ arg_type = &makeArgumentID<T&&>();
+ return *this;
+ }
+
+ void operator()(void*) const {}
+
+public:
+ TypeID const* reset() const {
+ TypeID const* tmp = arg_type;
+ arg_type = nullptr;
+ return tmp;
+ }
+
+ mutable TypeID const* arg_type;
+};
+
+template <int ID>
+struct ConstTrackingDeleter {
+ ConstTrackingDeleter() : arg_type(&makeArgumentID<>()) {}
+
+ ConstTrackingDeleter(ConstTrackingDeleter const&)
+ : arg_type(&makeArgumentID<ConstTrackingDeleter const&>()) {}
+
+ ConstTrackingDeleter(ConstTrackingDeleter&&)
+ : arg_type(&makeArgumentID<ConstTrackingDeleter &&>()) {}
+
+ template <class T, class = EnableIfSpecialization<ConstTrackingDeleter, T> >
+ ConstTrackingDeleter(T&&) : arg_type(&makeArgumentID<T&&>()) {}
+
+ const ConstTrackingDeleter& operator=(ConstTrackingDeleter const&) const {
+ arg_type = &makeArgumentID<ConstTrackingDeleter const&>();
+ return *this;
+ }
+
+ const ConstTrackingDeleter& operator=(ConstTrackingDeleter &&) const {
+ arg_type = &makeArgumentID<ConstTrackingDeleter &&>();
+ return *this;
+ }
+
+ template <class T, class = EnableIfSpecialization<ConstTrackingDeleter, T> >
+ const ConstTrackingDeleter& operator=(T&&) const {
+ arg_type = &makeArgumentID<T&&>();
+ return *this;
+ }
+
+ void operator()(void*) const {}
+
+public:
+ TypeID const* reset() const {
+ TypeID const* tmp = arg_type;
+ arg_type = nullptr;
+ return tmp;
+ }
+
+ mutable TypeID const* arg_type;
+};
+
+template <class ExpectT, int ID>
+bool checkArg(TrackingDeleter<ID> const& d) {
+ return d.arg_type && *d.arg_type == makeArgumentID<ExpectT>();
+}
+
+template <class ExpectT, int ID>
+bool checkArg(ConstTrackingDeleter<ID> const& d) {
+ return d.arg_type && *d.arg_type == makeArgumentID<ExpectT>();
+}
+
+template <class From, bool AssignIsConst = false>
+struct AssignDeleter {
+ AssignDeleter() = default;
+ AssignDeleter(AssignDeleter const&) = default;
+ AssignDeleter(AssignDeleter&&) = default;
+
+ AssignDeleter& operator=(AssignDeleter const&) = delete;
+ AssignDeleter& operator=(AssignDeleter &&) = delete;
+
+ template <class T> AssignDeleter& operator=(T&&) && = delete;
+ template <class T> AssignDeleter& operator=(T&&) const && = delete;
+
+ template <class T, class = typename std::enable_if<
+ std::is_same<T&&, From>::value && !AssignIsConst
+ >::type>
+ AssignDeleter& operator=(T&&) & { return *this; }
+
+ template <class T, class = typename std::enable_if<
+ std::is_same<T&&, From>::value && AssignIsConst
+ >::type>
+ const AssignDeleter& operator=(T&&) const & { return *this; }
+
+ template <class T>
+ void operator()(T) const {}
+};
+
+template <class VT, class DDest, class DSource>
+ void doDeleterTest() {
+ using U1 = std::unique_ptr<VT, DDest>;
+ using U2 = std::unique_ptr<VT, DSource>;
+ static_assert(std::is_nothrow_assignable<U1, U2&&>::value, "");
+ typename std::decay<DDest>::type ddest;
+ typename std::decay<DSource>::type dsource;
+ U1 u1(nullptr, ddest);
+ U2 u2(nullptr, dsource);
+ u1 = std::move(u2);
+}
+
+template <bool IsArray>
+void test_sfinae() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+
+ { // Test that different non-reference deleter types are allowed so long
+ // as they convert to each other.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ static_assert(std::is_assignable<U1, U2&&>::value, "");
+ }
+ { // Test that different non-reference deleter types are disallowed when
+ // they cannot convert.
+ using U1 = std::unique_ptr<VT, GenericDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericDeleter<1> >;
+ static_assert(!std::is_assignable<U1, U2&&>::value, "");
+ }
+ { // Test that if the deleter assignment is not valid the assignment operator
+ // SFINAEs.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> const& >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U3 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
+ using U4 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ using U5 = std::unique_ptr<VT, GenericConvertingDeleter<1> const&>;
+ static_assert(!std::is_assignable<U1, U2&&>::value, "");
+ static_assert(!std::is_assignable<U1, U3&&>::value, "");
+ static_assert(!std::is_assignable<U1, U4&&>::value, "");
+ static_assert(!std::is_assignable<U1, U5&&>::value, "");
+
+ using U1C = std::unique_ptr<const VT, GenericConvertingDeleter<0> const&>;
+ static_assert(std::is_nothrow_assignable<U1C, U1&&>::value, "");
+ }
+ { // Test that if the deleter assignment is not valid the assignment operator
+ // SFINAEs.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> & >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U3 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
+ using U4 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ using U5 = std::unique_ptr<VT, GenericConvertingDeleter<1> const&>;
+
+ static_assert(std::is_nothrow_assignable<U1, U2&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U1, U3&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U1, U4&&>::value, "");
+ static_assert(std::is_nothrow_assignable<U1, U5&&>::value, "");
+
+ using U1C = std::unique_ptr<const VT, GenericConvertingDeleter<0> &>;
+ static_assert(std::is_nothrow_assignable<U1C, U1&&>::value, "");
+ }
+ { // Test that non-reference destination deleters can be assigned
+ // from any source deleter type with a sutible conversion. Including
+ // reference types.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
+ using U3 = std::unique_ptr<VT, GenericConvertingDeleter<0> const &>;
+ using U4 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ using U5 = std::unique_ptr<VT, GenericConvertingDeleter<1> &>;
+ using U6 = std::unique_ptr<VT, GenericConvertingDeleter<1> const&>;
+ static_assert(std::is_assignable<U1, U2&&>::value, "");
+ static_assert(std::is_assignable<U1, U3&&>::value, "");
+ static_assert(std::is_assignable<U1, U4&&>::value, "");
+ static_assert(std::is_assignable<U1, U5&&>::value, "");
+ static_assert(std::is_assignable<U1, U6&&>::value, "");
+ }
+ /////////////////////////////////////////////////////////////////////////////
+ {
+ using Del = GenericDeleter<0>;
+ using AD = AssignDeleter<Del&&>;
+ using ADC = AssignDeleter<Del&&, /*AllowConstAssign*/true>;
+ doDeleterTest<VT, AD, Del>();
+ doDeleterTest<VT, AD&, Del>();
+ doDeleterTest<VT, ADC const&, Del>();
+ }
+ {
+ using Del = GenericDeleter<0>;
+ using AD = AssignDeleter<Del&>;
+ using ADC = AssignDeleter<Del&, /*AllowConstAssign*/true>;
+ doDeleterTest<VT, AD, Del&>();
+ doDeleterTest<VT, AD&, Del&>();
+ doDeleterTest<VT, ADC const&, Del&>();
+ }
+ {
+ using Del = GenericDeleter<0>;
+ using AD = AssignDeleter<Del const&>;
+ using ADC = AssignDeleter<Del const&, /*AllowConstAssign*/true>;
+ doDeleterTest<VT, AD, Del const&>();
+ doDeleterTest<VT, AD&, Del const&>();
+ doDeleterTest<VT, ADC const&, Del const&>();
+ }
+}
+
+
+template <bool IsArray>
+void test_noexcept() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ {
+ typedef std::unique_ptr<const VT> APtr;
+ typedef std::unique_ptr<VT> BPtr;
+ static_assert(std::is_nothrow_assignable<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, CDeleter<const VT> > APtr;
+ typedef std::unique_ptr<VT, CDeleter<VT> > BPtr;
+ static_assert(std::is_nothrow_assignable<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, NCDeleter<const VT>&> APtr;
+ typedef std::unique_ptr<VT, NCDeleter<const VT>&> BPtr;
+ static_assert(std::is_nothrow_assignable<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, const NCConstDeleter<const VT>&> APtr;
+ typedef std::unique_ptr<VT, const NCConstDeleter<const VT>&> BPtr;
+ static_assert(std::is_nothrow_assignable<APtr, BPtr>::value, "");
+ }
+}
+
+template <bool IsArray>
+void test_deleter_value_category() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ using TD1 = TrackingDeleter<1>;
+ using TD2 = TrackingDeleter<2>;
+ TD1 d1;
+ TD2 d2;
+ using CD1 = ConstTrackingDeleter<1>;
+ using CD2 = ConstTrackingDeleter<2>;
+ CD1 cd1;
+ CD2 cd2;
+
+ { // Test non-reference deleter conversions
+ using U1 = std::unique_ptr<VT, TD1 >;
+ using U2 = std::unique_ptr<VT, TD2 >;
+ U1 u1;
+ U2 u2;
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2&&>(u1.get_deleter()));
+ }
+ { // Test assignment to non-const ref
+ using U1 = std::unique_ptr<VT, TD1& >;
+ using U2 = std::unique_ptr<VT, TD2 >;
+ U1 u1(nullptr, d1);
+ U2 u2;
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2&&>(u1.get_deleter()));
+ }
+ { // Test assignment to const&.
+ using U1 = std::unique_ptr<VT, CD1 const& >;
+ using U2 = std::unique_ptr<VT, CD2 >;
+ U1 u1(nullptr, cd1);
+ U2 u2;
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<CD2&&>(u1.get_deleter()));
+ }
+
+ { // Test assignment from non-const ref
+ using U1 = std::unique_ptr<VT, TD1 >;
+ using U2 = std::unique_ptr<VT, TD2& >;
+ U1 u1;
+ U2 u2(nullptr, d2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2&>(u1.get_deleter()));
+ }
+ { // Test assignment from const ref
+ using U1 = std::unique_ptr<VT, TD1 >;
+ using U2 = std::unique_ptr<VT, TD2 const& >;
+ U1 u1;
+ U2 u2(nullptr, d2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2 const&>(u1.get_deleter()));
+ }
+
+ { // Test assignment from non-const ref
+ using U1 = std::unique_ptr<VT, TD1& >;
+ using U2 = std::unique_ptr<VT, TD2& >;
+ U1 u1(nullptr, d1);
+ U2 u2(nullptr, d2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2&>(u1.get_deleter()));
+ }
+ { // Test assignment from const ref
+ using U1 = std::unique_ptr<VT, TD1& >;
+ using U2 = std::unique_ptr<VT, TD2 const& >;
+ U1 u1(nullptr, d1);
+ U2 u2(nullptr, d2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<TD2 const&>(u1.get_deleter()));
+ }
+
+ { // Test assignment from non-const ref
+ using U1 = std::unique_ptr<VT, CD1 const& >;
+ using U2 = std::unique_ptr<VT, CD2 & >;
+ U1 u1(nullptr, cd1);
+ U2 u2(nullptr, cd2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<CD2 &>(u1.get_deleter()));
+ }
+ { // Test assignment from const ref
+ using U1 = std::unique_ptr<VT, CD1 const& >;
+ using U2 = std::unique_ptr<VT, CD2 const& >;
+ U1 u1(nullptr, cd1);
+ U2 u2(nullptr, cd2);
+ u1.get_deleter().reset();
+ u1 = std::move(u2);
+ assert(checkArg<CD2 const&>(u1.get_deleter()));
+ }
+}
+
+int main() {
+ {
+ test_sfinae</*IsArray*/false>();
+ test_noexcept<false>();
+ test_deleter_value_category<false>();
+ }
+ {
+ test_sfinae</*IsArray*/true>();
+ test_noexcept<true>();
+ test_deleter_value_category<true>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp
new file mode 100644
index 000000000000..9b946a733fea
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp
@@ -0,0 +1,124 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move assignment
+
+#include <memory>
+#include <utility>
+#include <cassert>
+
+#include "unique_ptr_test_helper.h"
+
+template <class APtr, class BPtr>
+void testAssign(APtr& aptr, BPtr& bptr) {
+ A* p = bptr.get();
+ assert(A::count == 2);
+ aptr = std::move(bptr);
+ assert(aptr.get() == p);
+ assert(bptr.get() == 0);
+ assert(A::count == 1);
+ assert(B::count == 1);
+}
+
+template <class LHS, class RHS>
+void checkDeleter(LHS& lhs, RHS& rhs, int LHSState, int RHSState) {
+ assert(lhs.get_deleter().state() == LHSState);
+ assert(rhs.get_deleter().state() == RHSState);
+}
+
+template <class T>
+struct NCConvertingDeleter {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+template <class T>
+struct NCConvertingDeleter<T[]> {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+struct GenericDeleter {
+ void operator()(void*) const;
+};
+
+struct NCGenericDeleter {
+ NCGenericDeleter() = default;
+ NCGenericDeleter(NCGenericDeleter const&) = delete;
+ NCGenericDeleter(NCGenericDeleter&&) = default;
+
+ void operator()(void*) const {}
+};
+
+void test_sfinae() {
+ using DA = NCConvertingDeleter<A[]>; // non-copyable deleters
+ using DAC = NCConvertingDeleter<const A[]>; // non-copyable deleters
+
+ using DB = NCConvertingDeleter<B[]>;
+ using UA = std::unique_ptr<A[]>;
+ using UAC = std::unique_ptr<const A[]>;
+ using UB = std::unique_ptr<B[]>;
+ using UAD = std::unique_ptr<A[], DA>;
+ using UACD = std::unique_ptr<const A[], DAC>;
+
+ using UBD = std::unique_ptr<B[], DB>;
+ { // cannot move from an lvalue
+ static_assert(std::is_assignable<UAC, UA&&>::value, "");
+ static_assert(!std::is_assignable<UAC, UA&>::value, "");
+ static_assert(!std::is_assignable<UAC, const UA&>::value, "");
+ }
+ { // cannot move if the deleter-types cannot convert
+ static_assert(std::is_assignable<UACD, UAD&&>::value, "");
+ static_assert(!std::is_assignable<UACD, UAC&&>::value, "");
+ static_assert(!std::is_assignable<UAC, UACD&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A[], DA&>;
+ using UA2 = std::unique_ptr<A[], DAC&>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A[], const DA&>;
+ using UA2 = std::unique_ptr<A[], const DAC&>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Single>
+ using UA1 = std::unique_ptr<A[]>;
+ using UA2 = std::unique_ptr<A>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Array[]>
+ using UA1 = std::unique_ptr<A[], NCGenericDeleter>;
+ using UA2 = std::unique_ptr<A, NCGenericDeleter>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ }
+}
+
+int main() {
+ test_sfinae();
+ // FIXME: add tests
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp
new file mode 100644
index 000000000000..3f2ea422dab3
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp
@@ -0,0 +1,145 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move assignment
+
+#include <memory>
+#include <utility>
+#include <cassert>
+
+#include "deleter_types.h"
+#include "unique_ptr_test_helper.h"
+
+template <class APtr, class BPtr>
+void testAssign(APtr& aptr, BPtr& bptr) {
+ A* p = bptr.get();
+ assert(A::count == 2);
+ aptr = std::move(bptr);
+ assert(aptr.get() == p);
+ assert(bptr.get() == 0);
+ assert(A::count == 1);
+ assert(B::count == 1);
+}
+
+template <class LHS, class RHS>
+void checkDeleter(LHS& lhs, RHS& rhs, int LHSState, int RHSState) {
+ assert(lhs.get_deleter().state() == LHSState);
+ assert(rhs.get_deleter().state() == RHSState);
+}
+
+template <class T>
+struct NCConvertingDeleter {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+template <class T>
+struct NCConvertingDeleter<T[]> {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+struct NCGenericDeleter {
+ NCGenericDeleter() = default;
+ NCGenericDeleter(NCGenericDeleter const&) = delete;
+ NCGenericDeleter(NCGenericDeleter&&) = default;
+
+ void operator()(void*) const {}
+};
+
+void test_sfinae() {
+ using DA = NCConvertingDeleter<A>; // non-copyable deleters
+ using DB = NCConvertingDeleter<B>;
+ using UA = std::unique_ptr<A>;
+ using UB = std::unique_ptr<B>;
+ using UAD = std::unique_ptr<A, DA>;
+ using UBD = std::unique_ptr<B, DB>;
+ { // cannot move from an lvalue
+ static_assert(std::is_assignable<UA, UB&&>::value, "");
+ static_assert(!std::is_assignable<UA, UB&>::value, "");
+ static_assert(!std::is_assignable<UA, const UB&>::value, "");
+ }
+ { // cannot move if the deleter-types cannot convert
+ static_assert(std::is_assignable<UAD, UBD&&>::value, "");
+ static_assert(!std::is_assignable<UAD, UB&&>::value, "");
+ static_assert(!std::is_assignable<UA, UBD&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A, DA&>;
+ using UB1 = std::unique_ptr<B, DB&>;
+ static_assert(!std::is_assignable<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A, const DA&>;
+ using UB1 = std::unique_ptr<B, const DB&>;
+ static_assert(!std::is_assignable<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Array[]>
+ using UA1 = std::unique_ptr<A>;
+ using UA2 = std::unique_ptr<A[]>;
+ using UB1 = std::unique_ptr<B[]>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ static_assert(!std::is_assignable<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Array[]>
+ using UA1 = std::unique_ptr<A, NCGenericDeleter>;
+ using UA2 = std::unique_ptr<A[], NCGenericDeleter>;
+ using UB1 = std::unique_ptr<B[], NCGenericDeleter>;
+ static_assert(!std::is_assignable<UA1, UA2&&>::value, "");
+ static_assert(!std::is_assignable<UA1, UB1&&>::value, "");
+ }
+}
+
+int main() {
+ test_sfinae();
+ {
+ std::unique_ptr<B> bptr(new B);
+ std::unique_ptr<A> aptr(new A);
+ testAssign(aptr, bptr);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ {
+ Deleter<B> del(42);
+ std::unique_ptr<B, Deleter<B> > bptr(new B, std::move(del));
+ std::unique_ptr<A, Deleter<A> > aptr(new A);
+ testAssign(aptr, bptr);
+ checkDeleter(aptr, bptr, 42, 0);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ {
+ CDeleter<A> adel(6);
+ CDeleter<B> bdel(42);
+ std::unique_ptr<B, CDeleter<B>&> bptr(new B, bdel);
+ std::unique_ptr<A, CDeleter<A>&> aptr(new A, adel);
+ testAssign(aptr, bptr);
+ checkDeleter(aptr, bptr, 42, 42);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/null.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp
index e2d7956cda64..165d48a1caa5 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/null.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp
@@ -16,26 +16,24 @@
#include <memory>
#include <cassert>
-// test assignment from null
-
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
+#include "unique_ptr_test_helper.h"
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> s2(new A);
- assert(A::count == 1);
- s2 = 0;
+// test assignment from null
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+ {
+ std::unique_ptr<VT> s2(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
+ s2 = NULL;
assert(A::count == 0);
assert(s2.get() == 0);
- }
- assert(A::count == 0);
+ }
+ assert(A::count == 0);
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/nullptr.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp
index fb1584951993..e1e2e32e23c4 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/nullptr.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp
@@ -16,26 +16,25 @@
#include <memory>
#include <cassert>
+#include "unique_ptr_test_helper.h"
+
// test assignment from null
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- ~A() {--count;}
-};
-
-int A::count = 0;
-
-int main()
-{
- {
- std::unique_ptr<A> s2(new A);
- assert(A::count == 1);
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+ {
+ std::unique_ptr<VT> s2(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
s2 = nullptr;
assert(A::count == 0);
assert(s2.get() == 0);
- }
- assert(A::count == 0);
+ }
+ assert(A::count == 0);
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
new file mode 100644
index 000000000000..7d5e9bca63c4
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.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.
+//
+//===----------------------------------------------------------------------===//
+
+// libc++ cannot safely provide the auto_ptr constructor without rvalue
+// references.
+// REQUIRES: c++11 || c++14
+
+// <memory>
+
+// unique_ptr
+
+// template <class U> unique_ptr(auto_ptr<U>&&) noexcept
+
+#include <memory>
+#include <utility>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct A {
+ static int count;
+ A() { ++count; }
+ A(const A&) { ++count; }
+ virtual ~A() { --count; }
+};
+
+int A::count = 0;
+
+struct B : public A {
+ static int count;
+ B() { ++count; }
+ B(const B&) { ++count; }
+ virtual ~B() { --count; }
+};
+
+int B::count = 0;
+
+struct C {};
+
+struct Deleter {
+ void operator()(void*) {}
+};
+
+void test_sfinae() {
+ {
+ // the auto_ptr constructor should be disable with a non-default deleter.
+ using AP = std::auto_ptr<int>;
+ using U = std::unique_ptr<int, Deleter>;
+ static_assert(!std::is_constructible<U, AP&&>::value, "");
+ }
+ {
+ // the auto_ptr constructor should be disabled when the pointer types are incompatible.
+ using AP = std::auto_ptr<A>;
+ using U = std::unique_ptr<C>;
+ static_assert(!std::is_constructible<U, AP&&>::value, "");
+ }
+}
+
+int main() {
+ {
+ B* p = new B;
+ std::auto_ptr<B> ap(p);
+ std::unique_ptr<A> up(std::move(ap));
+ assert(up.get() == p);
+ assert(ap.get() == 0);
+ assert(A::count == 1);
+ assert(B::count == 1);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ {
+ B* p = new B;
+ std::auto_ptr<B> ap(p);
+ std::unique_ptr<A> up;
+ up = std::move(ap);
+ assert(up.get() == p);
+ assert(ap.get() == 0);
+ assert(A::count == 1);
+ assert(B::count == 1);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+#if TEST_STD_VER >= 11
+ {
+ static_assert(std::is_nothrow_constructible<std::unique_ptr<A>,
+ std::auto_ptr<B>&&>::value,
+ "");
+ }
+#endif
+ test_sfinae();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
new file mode 100644
index 000000000000..51d9aa708c40
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp
@@ -0,0 +1,107 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+//=============================================================================
+// TESTING std::unique_ptr::unique_ptr()
+//
+// Concerns:
+// 1 The default constructor works for any default constructible deleter types.
+// 2 The stored type 'T' is allowed to be incomplete.
+//
+// Plan
+// 1 Default construct unique_ptr's with various deleter types (C-1)
+// 2 Default construct a unique_ptr with an incomplete element_type and
+// various deleter types (C-1,2)
+
+#include <memory>
+#include <cassert>
+#include "test_macros.h"
+
+#include "test_macros.h"
+#include "deleter_types.h"
+#include "unique_ptr_test_helper.h"
+
+#if defined(_LIBCPP_VERSION) && TEST_STD_VER >= 11
+_LIBCPP_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single;
+_LIBCPP_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime;
+#endif
+
+#if TEST_STD_VER >= 11
+struct NonDefaultDeleter {
+ NonDefaultDeleter() = delete;
+ void operator()(void*) const {}
+};
+#endif
+
+template <class ElemType>
+void test_sfinae() {
+#if TEST_STD_VER >= 11
+ { // the constructor does not participate in overload resultion when
+ // the deleter is a pointer type
+ using U = std::unique_ptr<ElemType, void (*)(void*)>;
+ static_assert(!std::is_default_constructible<U>::value, "");
+ }
+ { // the constructor does not participate in overload resolution when
+ // the deleter is not default constructible
+ using Del = CDeleter<ElemType>;
+ using U1 = std::unique_ptr<ElemType, NonDefaultDeleter>;
+ using U2 = std::unique_ptr<ElemType, Del&>;
+ using U3 = std::unique_ptr<ElemType, Del const&>;
+ static_assert(!std::is_default_constructible<U1>::value, "");
+ static_assert(!std::is_default_constructible<U2>::value, "");
+ static_assert(!std::is_default_constructible<U3>::value, "");
+ }
+#endif
+}
+
+template <class ElemType>
+void test_basic() {
+#if TEST_STD_VER >= 11
+ {
+ using U1 = std::unique_ptr<ElemType>;
+ using U2 = std::unique_ptr<ElemType, Deleter<ElemType> >;
+ static_assert(std::is_nothrow_default_constructible<U1>::value, "");
+ static_assert(std::is_nothrow_default_constructible<U2>::value, "");
+ }
+#endif
+ {
+ std::unique_ptr<ElemType> p;
+ assert(p.get() == 0);
+ }
+ {
+ std::unique_ptr<ElemType, NCDeleter<ElemType> > p;
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 0);
+ p.get_deleter().set_state(5);
+ assert(p.get_deleter().state() == 5);
+ }
+}
+
+DEFINE_AND_RUN_IS_INCOMPLETE_TEST({
+ doIncompleteTypeTest(0);
+ doIncompleteTypeTest<IncompleteType, Deleter<IncompleteType> >(0);
+} {
+ doIncompleteTypeTest<IncompleteType[]>(0);
+ doIncompleteTypeTest<IncompleteType[], Deleter<IncompleteType[]> >(0);
+})
+
+int main() {
+ {
+ test_sfinae<int>();
+ test_basic<int>();
+ }
+ {
+ test_sfinae<int[]>();
+ test_basic<int[]>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp
new file mode 100644
index 000000000000..c102f27fb8e6
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp
@@ -0,0 +1,174 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr move ctor
+
+#include <memory>
+#include <utility>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+//=============================================================================
+// TESTING unique_ptr(unique_ptr&&)
+//
+// Concerns
+// 1 The moved from pointer is empty and the new pointer stores the old value.
+// 2 The only requirement on the deleter is that it is MoveConstructible
+// or a reference.
+// 3 The constructor works for explicitly moved values (ie std::move(x))
+// 4 The constructor works for true temporaries (ie a return value)
+//
+// Plan
+// 1 Explicitly construct unique_ptr<T, D> for various deleter types 'D'.
+// check that the value and deleter have been properly moved. (C-1,2,3)
+//
+// 2 Use the expression 'sink(source())' to move construct a unique_ptr<T, D>
+// from a temporary. 'source' should return the unique_ptr by value and
+// 'sink' should accept the unique_ptr by value. (C-1,2,4)
+
+template <class VT>
+std::unique_ptr<VT> source1() {
+ return std::unique_ptr<VT>(newValue<VT>(1));
+}
+
+template <class VT>
+std::unique_ptr<VT, Deleter<VT> > source2() {
+ return std::unique_ptr<VT, Deleter<VT> >(newValue<VT>(1), Deleter<VT>(5));
+}
+
+template <class VT>
+std::unique_ptr<VT, NCDeleter<VT>&> source3() {
+ static NCDeleter<VT> d(5);
+ return std::unique_ptr<VT, NCDeleter<VT>&>(newValue<VT>(1), d);
+}
+
+template <class VT>
+void sink1(std::unique_ptr<VT> p) {
+ assert(p.get() != nullptr);
+}
+
+template <class VT>
+void sink2(std::unique_ptr<VT, Deleter<VT> > p) {
+ assert(p.get() != nullptr);
+ assert(p.get_deleter().state() == 5);
+}
+
+template <class VT>
+void sink3(std::unique_ptr<VT, NCDeleter<VT>&> p) {
+ assert(p.get() != nullptr);
+ assert(p.get_deleter().state() == 5);
+ assert(&p.get_deleter() == &source3<VT>().get_deleter());
+}
+
+template <class ValueT>
+void test_sfinae() {
+ typedef std::unique_ptr<ValueT> U;
+ { // Ensure unique_ptr is non-copyable
+ static_assert((!std::is_constructible<U, U const&>::value), "");
+ static_assert((!std::is_constructible<U, U&>::value), "");
+ }
+}
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<!IsArray, A, A[]>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+ {
+ typedef std::unique_ptr<VT> APtr;
+ APtr s(newValue<VT>(expect_alive));
+ A* p = s.get();
+ APtr s2 = std::move(s);
+ assert(s2.get() == p);
+ assert(s.get() == 0);
+ assert(A::count == expect_alive);
+ }
+ assert(A::count == 0);
+ {
+ typedef Deleter<VT> MoveDel;
+ typedef std::unique_ptr<VT, MoveDel> APtr;
+ MoveDel d(5);
+ APtr s(newValue<VT>(expect_alive), std::move(d));
+ assert(d.state() == 0);
+ assert(s.get_deleter().state() == 5);
+ A* p = s.get();
+ APtr s2 = std::move(s);
+ assert(s2.get() == p);
+ assert(s.get() == 0);
+ assert(A::count == expect_alive);
+ assert(s2.get_deleter().state() == 5);
+ assert(s.get_deleter().state() == 0);
+ }
+ assert(A::count == 0);
+ {
+ typedef NCDeleter<VT> NonCopyDel;
+ typedef std::unique_ptr<VT, NonCopyDel&> APtr;
+
+ NonCopyDel d;
+ APtr s(newValue<VT>(expect_alive), d);
+ A* p = s.get();
+ APtr s2 = std::move(s);
+ assert(s2.get() == p);
+ assert(s.get() == 0);
+ assert(A::count == expect_alive);
+ d.set_state(6);
+ assert(s2.get_deleter().state() == d.state());
+ assert(s.get_deleter().state() == d.state());
+ }
+ assert(A::count == 0);
+ {
+ sink1<VT>(source1<VT>());
+ assert(A::count == 0);
+ sink2<VT>(source2<VT>());
+ assert(A::count == 0);
+ sink3<VT>(source3<VT>());
+ assert(A::count == 0);
+ }
+ assert(A::count == 0);
+}
+
+template <class VT>
+void test_noexcept() {
+#if TEST_STD_VER >= 11
+ {
+ typedef std::unique_ptr<VT> U;
+ static_assert(std::is_nothrow_move_constructible<U>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, Deleter<VT> > U;
+ static_assert(std::is_nothrow_move_constructible<U>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, NCDeleter<VT> &> U;
+ static_assert(std::is_nothrow_move_constructible<U>::value, "");
+ }
+ {
+ typedef std::unique_ptr<VT, const NCConstDeleter<VT> &> U;
+ static_assert(std::is_nothrow_move_constructible<U>::value, "");
+ }
+#endif
+}
+
+int main() {
+ {
+ test_basic</*IsArray*/ false>();
+ test_sfinae<int>();
+ test_noexcept<int>();
+ }
+ {
+ test_basic</*IsArray*/ true>();
+ test_sfinae<int[]>();
+ test_noexcept<int[]>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp
new file mode 100644
index 000000000000..6e5db86c97fc
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.pass.cpp
@@ -0,0 +1,124 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move ctor
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <int ID = 0>
+struct GenericDeleter {
+ void operator()(void*) const {}
+};
+
+template <int ID = 0>
+struct GenericConvertingDeleter {
+ template <int OID>
+ GenericConvertingDeleter(GenericConvertingDeleter<OID>) {}
+ void operator()(void*) const {}
+};
+
+template <bool IsArray>
+void test_sfinae() {
+#if TEST_STD_VER >= 11
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+
+ { // Test that different non-reference deleter types are allowed so long
+ // as they convert to each other.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ static_assert(std::is_constructible<U1, U2&&>::value, "");
+ }
+ { // Test that different non-reference deleter types are disallowed when
+ // they cannot convert.
+ using U1 = std::unique_ptr<VT, GenericDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericDeleter<1> >;
+ static_assert(!std::is_constructible<U1, U2&&>::value, "");
+ }
+ { // Test that if the destination deleter is a reference type then only
+ // exact matches are allowed.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> const& >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U3 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
+ using U4 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ using U5 = std::unique_ptr<VT, GenericConvertingDeleter<1> const&>;
+ static_assert(!std::is_constructible<U1, U2&&>::value, "");
+ static_assert(!std::is_constructible<U1, U3&&>::value, "");
+ static_assert(!std::is_constructible<U1, U4&&>::value, "");
+ static_assert(!std::is_constructible<U1, U5&&>::value, "");
+
+ using U1C = std::unique_ptr<const VT, GenericConvertingDeleter<0> const&>;
+ static_assert(std::is_nothrow_constructible<U1C, U1&&>::value, "");
+ }
+ { // Test that non-reference destination deleters can be constructed
+ // from any source deleter type with a sutible conversion. Including
+ // reference types.
+ using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
+ using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
+ using U3 = std::unique_ptr<VT, GenericConvertingDeleter<0> const &>;
+ using U4 = std::unique_ptr<VT, GenericConvertingDeleter<1> >;
+ using U5 = std::unique_ptr<VT, GenericConvertingDeleter<1> &>;
+ using U6 = std::unique_ptr<VT, GenericConvertingDeleter<1> const&>;
+ static_assert(std::is_constructible<U1, U2&&>::value, "");
+ static_assert(std::is_constructible<U1, U3&&>::value, "");
+ static_assert(std::is_constructible<U1, U4&&>::value, "");
+ static_assert(std::is_constructible<U1, U5&&>::value, "");
+ static_assert(std::is_constructible<U1, U6&&>::value, "");
+ }
+#endif
+}
+
+
+template <bool IsArray>
+void test_noexcept() {
+#if TEST_STD_VER >= 11
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ {
+ typedef std::unique_ptr<const VT> APtr;
+ typedef std::unique_ptr<VT> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, CDeleter<const VT> > APtr;
+ typedef std::unique_ptr<VT, CDeleter<VT> > BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, NCDeleter<const VT>&> APtr;
+ typedef std::unique_ptr<VT, NCDeleter<const VT>&> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<const VT, const NCConstDeleter<const VT>&> APtr;
+ typedef std::unique_ptr<VT, const NCConstDeleter<const VT>&> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+#endif
+}
+
+
+int main() {
+ {
+ test_sfinae</*IsArray*/false>();
+ test_noexcept<false>();
+ }
+ {
+ test_sfinae</*IsArray*/true>();
+ test_noexcept<true>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp
new file mode 100644
index 000000000000..09e842b5987f
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.runtime.pass.cpp
@@ -0,0 +1,83 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move ctor
+
+#include <memory>
+#include <cassert>
+
+#include "deleter_types.h"
+#include "unique_ptr_test_helper.h"
+
+template <int ID = 0>
+struct GenericDeleter {
+ void operator()(void*) const {}
+};
+
+template <int ID = 0>
+struct GenericConvertingDeleter {
+ template <int OID>
+ GenericConvertingDeleter(GenericConvertingDeleter<OID>) {}
+ void operator()(void*) const {}
+};
+
+void test_sfinae() {
+ { // Disallow copying
+ using U1 = std::unique_ptr<A[], GenericConvertingDeleter<0> >;
+ using U2 = std::unique_ptr<A[], GenericConvertingDeleter<1> >;
+ static_assert(std::is_constructible<U1, U2&&>::value, "");
+ static_assert(!std::is_constructible<U1, U2&>::value, "");
+ static_assert(!std::is_constructible<U1, const U2&>::value, "");
+ static_assert(!std::is_constructible<U1, const U2&&>::value, "");
+ }
+ { // Disallow illegal qualified conversions
+ using U1 = std::unique_ptr<const A[]>;
+ using U2 = std::unique_ptr<A[]>;
+ static_assert(std::is_constructible<U1, U2&&>::value, "");
+ static_assert(!std::is_constructible<U2, U1&&>::value, "");
+ }
+ { // Disallow base-to-derived conversions.
+ using UA = std::unique_ptr<A[]>;
+ using UB = std::unique_ptr<B[]>;
+ static_assert(!std::is_constructible<UA, UB&&>::value, "");
+ }
+ { // Disallow base-to-derived conversions.
+ using UA = std::unique_ptr<A[], GenericConvertingDeleter<0> >;
+ using UB = std::unique_ptr<B[], GenericConvertingDeleter<1> >;
+ static_assert(!std::is_constructible<UA, UB&&>::value, "");
+ }
+ { // Disallow invalid deleter initialization
+ using U1 = std::unique_ptr<A[], GenericDeleter<0> >;
+ using U2 = std::unique_ptr<A[], GenericDeleter<1> >;
+ static_assert(!std::is_constructible<U1, U2&&>::value, "");
+ }
+ { // Disallow reference deleters with different qualifiers
+ using U1 = std::unique_ptr<A[], Deleter<A[]>&>;
+ using U2 = std::unique_ptr<A[], const Deleter<A[]>&>;
+ static_assert(!std::is_constructible<U1, U2&&>::value, "");
+ static_assert(!std::is_constructible<U2, U1&&>::value, "");
+ }
+ {
+ using U1 = std::unique_ptr<A[]>;
+ using U2 = std::unique_ptr<A>;
+ static_assert(!std::is_constructible<U1, U2&&>::value, "");
+ static_assert(!std::is_constructible<U2, U1&&>::value, "");
+ }
+}
+
+
+int main() {
+ test_sfinae();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp
new file mode 100644
index 000000000000..4e2a6dfa3dd1
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp
@@ -0,0 +1,248 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// Test unique_ptr converting move ctor
+
+// NOTE: unique_ptr does not provide converting constructors in c++03
+// UNSUPPORTED: c++98, c++03
+
+#include <memory>
+#include <type_traits>
+#include <utility>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+// test converting move ctor. Should only require a MoveConstructible deleter, or if
+// deleter is a reference, not even that.
+// Explicit version
+
+template <class LHS, class RHS>
+void checkReferenceDeleter(LHS& lhs, RHS& rhs) {
+ typedef typename LHS::deleter_type NewDel;
+ static_assert(std::is_reference<NewDel>::value, "");
+ rhs.get_deleter().set_state(42);
+ assert(rhs.get_deleter().state() == 42);
+ assert(lhs.get_deleter().state() == 42);
+ lhs.get_deleter().set_state(99);
+ assert(lhs.get_deleter().state() == 99);
+ assert(rhs.get_deleter().state() == 99);
+}
+
+template <class LHS, class RHS>
+void checkDeleter(LHS& lhs, RHS& rhs, int LHSVal, int RHSVal) {
+ assert(lhs.get_deleter().state() == LHSVal);
+ assert(rhs.get_deleter().state() == RHSVal);
+}
+
+template <class LHS, class RHS>
+void checkCtor(LHS& lhs, RHS& rhs, A* RHSVal) {
+ assert(lhs.get() == RHSVal);
+ assert(rhs.get() == nullptr);
+ assert(A::count == 1);
+ assert(B::count == 1);
+}
+
+void checkNoneAlive() {
+ assert(A::count == 0);
+ assert(B::count == 0);
+}
+
+template <class T>
+struct NCConvertingDeleter {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+template <class T>
+struct NCConvertingDeleter<T[]> {
+ NCConvertingDeleter() = default;
+ NCConvertingDeleter(NCConvertingDeleter const&) = delete;
+ NCConvertingDeleter(NCConvertingDeleter&&) = default;
+
+ template <class U>
+ NCConvertingDeleter(NCConvertingDeleter<U>&&) {}
+
+ void operator()(T*) const {}
+};
+
+struct NCGenericDeleter {
+ NCGenericDeleter() = default;
+ NCGenericDeleter(NCGenericDeleter const&) = delete;
+ NCGenericDeleter(NCGenericDeleter&&) = default;
+
+ void operator()(void*) const {}
+};
+
+void test_sfinae() {
+ using DA = NCConvertingDeleter<A>; // non-copyable deleters
+ using DB = NCConvertingDeleter<B>;
+ using UA = std::unique_ptr<A>;
+ using UB = std::unique_ptr<B>;
+ using UAD = std::unique_ptr<A, DA>;
+ using UBD = std::unique_ptr<B, DB>;
+ { // cannot move from an lvalue
+ static_assert(std::is_constructible<UA, UB&&>::value, "");
+ static_assert(!std::is_constructible<UA, UB&>::value, "");
+ static_assert(!std::is_constructible<UA, const UB&>::value, "");
+ }
+ { // cannot move if the deleter-types cannot convert
+ static_assert(std::is_constructible<UAD, UBD&&>::value, "");
+ static_assert(!std::is_constructible<UAD, UB&&>::value, "");
+ static_assert(!std::is_constructible<UA, UBD&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A, DA&>;
+ using UB1 = std::unique_ptr<B, DB&>;
+ static_assert(!std::is_constructible<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert with reference deleters of different types
+ using UA1 = std::unique_ptr<A, const DA&>;
+ using UB1 = std::unique_ptr<B, const DB&>;
+ static_assert(!std::is_constructible<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Array[]>
+ using UA1 = std::unique_ptr<A>;
+ using UA2 = std::unique_ptr<A[]>;
+ using UB1 = std::unique_ptr<B[]>;
+ static_assert(!std::is_constructible<UA1, UA2&&>::value, "");
+ static_assert(!std::is_constructible<UA1, UB1&&>::value, "");
+ }
+ { // cannot move-convert from unique_ptr<Array[]>
+ using UA1 = std::unique_ptr<A, NCGenericDeleter>;
+ using UA2 = std::unique_ptr<A[], NCGenericDeleter>;
+ using UB1 = std::unique_ptr<B[], NCGenericDeleter>;
+ static_assert(!std::is_constructible<UA1, UA2&&>::value, "");
+ static_assert(!std::is_constructible<UA1, UB1&&>::value, "");
+ }
+}
+
+void test_noexcept() {
+ {
+ typedef std::unique_ptr<A> APtr;
+ typedef std::unique_ptr<B> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<A, Deleter<A> > APtr;
+ typedef std::unique_ptr<B, Deleter<B> > BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<A, NCDeleter<A>&> APtr;
+ typedef std::unique_ptr<B, NCDeleter<A>&> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+ {
+ typedef std::unique_ptr<A, const NCConstDeleter<A>&> APtr;
+ typedef std::unique_ptr<B, const NCConstDeleter<A>&> BPtr;
+ static_assert(std::is_nothrow_constructible<APtr, BPtr>::value, "");
+ }
+}
+
+int main() {
+ {
+ test_sfinae();
+ test_noexcept();
+ }
+ {
+ typedef std::unique_ptr<A> APtr;
+ typedef std::unique_ptr<B> BPtr;
+ { // explicit
+ BPtr b(new B);
+ A* p = b.get();
+ APtr a(std::move(b));
+ checkCtor(a, b, p);
+ }
+ checkNoneAlive();
+ { // implicit
+ BPtr b(new B);
+ A* p = b.get();
+ APtr a = std::move(b);
+ checkCtor(a, b, p);
+ }
+ checkNoneAlive();
+ }
+ { // test with moveable deleters
+ typedef std::unique_ptr<A, Deleter<A> > APtr;
+ typedef std::unique_ptr<B, Deleter<B> > BPtr;
+ {
+ Deleter<B> del(5);
+ BPtr b(new B, std::move(del));
+ A* p = b.get();
+ APtr a(std::move(b));
+ checkCtor(a, b, p);
+ checkDeleter(a, b, 5, 0);
+ }
+ checkNoneAlive();
+ {
+ Deleter<B> del(5);
+ BPtr b(new B, std::move(del));
+ A* p = b.get();
+ APtr a = std::move(b);
+ checkCtor(a, b, p);
+ checkDeleter(a, b, 5, 0);
+ }
+ checkNoneAlive();
+ }
+ { // test with reference deleters
+ typedef std::unique_ptr<A, NCDeleter<A>&> APtr;
+ typedef std::unique_ptr<B, NCDeleter<A>&> BPtr;
+ NCDeleter<A> del(5);
+ {
+ BPtr b(new B, del);
+ A* p = b.get();
+ APtr a(std::move(b));
+ checkCtor(a, b, p);
+ checkReferenceDeleter(a, b);
+ }
+ checkNoneAlive();
+ {
+ BPtr b(new B, del);
+ A* p = b.get();
+ APtr a = std::move(b);
+ checkCtor(a, b, p);
+ checkReferenceDeleter(a, b);
+ }
+ checkNoneAlive();
+ }
+ {
+ typedef std::unique_ptr<A, CDeleter<A> > APtr;
+ typedef std::unique_ptr<B, CDeleter<B>&> BPtr;
+ CDeleter<B> del(5);
+ {
+ BPtr b(new B, del);
+ A* p = b.get();
+ APtr a(std::move(b));
+ checkCtor(a, b, p);
+ checkDeleter(a, b, 5, 5);
+ }
+ checkNoneAlive();
+ {
+ BPtr b(new B, del);
+ A* p = b.get();
+ APtr a = std::move(b);
+ checkCtor(a, b, p);
+ checkDeleter(a, b, 5, 5);
+ }
+ checkNoneAlive();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp
new file mode 100644
index 000000000000..8bc8a57c1c8d
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp
@@ -0,0 +1,74 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <memory>
+
+// unique_ptr
+
+// FIXME(EricWF): This test contains tests for constructing a unique_ptr from NULL.
+// The behavior demonstrated in this test is not meant to be standard; It simply
+// tests the current status quo in libc++.
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <class VT>
+void test_pointer_ctor() {
+ {
+ std::unique_ptr<VT> p(0);
+ assert(p.get() == 0);
+ }
+ {
+ std::unique_ptr<VT, Deleter<VT> > p(0);
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 0);
+ }
+}
+
+template <class VT>
+void test_pointer_deleter_ctor() {
+ {
+ std::default_delete<VT> d;
+ std::unique_ptr<VT> p(0, d);
+ assert(p.get() == 0);
+ }
+ {
+ std::unique_ptr<VT, Deleter<VT> > p(0, Deleter<VT>(5));
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 5);
+ }
+ {
+ NCDeleter<VT> d(5);
+ std::unique_ptr<VT, NCDeleter<VT>&> p(0, d);
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 5);
+ }
+ {
+ NCConstDeleter<VT> d(5);
+ std::unique_ptr<VT, NCConstDeleter<VT> const&> p(0, d);
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 5);
+ }
+}
+
+int main() {
+ {
+ // test_pointer_ctor<int>();
+ test_pointer_deleter_ctor<int>();
+ }
+ {
+ test_pointer_ctor<int[]>();
+ test_pointer_deleter_ctor<int[]>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
new file mode 100644
index 000000000000..6764935fee14
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp
@@ -0,0 +1,106 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// unique_ptr(nullptr_t);
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+
+#if defined(_LIBCPP_VERSION) && TEST_STD_VER >= 11
+_LIBCPP_SAFE_STATIC std::unique_ptr<int> global_static_unique_ptr_single(nullptr);
+_LIBCPP_SAFE_STATIC std::unique_ptr<int[]> global_static_unique_ptr_runtime(nullptr);
+#endif
+
+
+#if TEST_STD_VER >= 11
+struct NonDefaultDeleter {
+ NonDefaultDeleter() = delete;
+ void operator()(void*) const {}
+};
+#endif
+
+template <class VT>
+void test_basic() {
+#if TEST_STD_VER >= 11
+ {
+ using U1 = std::unique_ptr<VT>;
+ using U2 = std::unique_ptr<VT, Deleter<VT> >;
+ static_assert(std::is_nothrow_constructible<U1, decltype(nullptr)>::value,
+ "");
+ static_assert(std::is_nothrow_constructible<U2, decltype(nullptr)>::value,
+ "");
+ }
+#endif
+ {
+ std::unique_ptr<VT> p(nullptr);
+ assert(p.get() == 0);
+ }
+ {
+ std::unique_ptr<VT, NCDeleter<VT> > p(nullptr);
+ assert(p.get() == 0);
+ assert(p.get_deleter().state() == 0);
+ }
+}
+
+template <class VT>
+void test_sfinae() {
+#if TEST_STD_VER >= 11
+ { // the constructor does not participate in overload resultion when
+ // the deleter is a pointer type
+ using U = std::unique_ptr<VT, void (*)(void*)>;
+ static_assert(!std::is_constructible<U, decltype(nullptr)>::value, "");
+ }
+ { // the constructor does not participate in overload resolution when
+ // the deleter is not default constructible
+ using Del = CDeleter<VT>;
+ using U1 = std::unique_ptr<VT, NonDefaultDeleter>;
+ using U2 = std::unique_ptr<VT, Del&>;
+ using U3 = std::unique_ptr<VT, Del const&>;
+ static_assert(!std::is_constructible<U1, decltype(nullptr)>::value, "");
+ static_assert(!std::is_constructible<U2, decltype(nullptr)>::value, "");
+ static_assert(!std::is_constructible<U3, decltype(nullptr)>::value, "");
+ }
+#endif
+}
+
+DEFINE_AND_RUN_IS_INCOMPLETE_TEST({
+ { doIncompleteTypeTest(0, nullptr); }
+ checkNumIncompleteTypeAlive(0);
+ {
+ doIncompleteTypeTest<IncompleteType, NCDeleter<IncompleteType> >(0,
+ nullptr);
+ }
+ checkNumIncompleteTypeAlive(0);
+ { doIncompleteTypeTest<IncompleteType[]>(0, nullptr); }
+ checkNumIncompleteTypeAlive(0);
+ {
+ doIncompleteTypeTest<IncompleteType[], NCDeleter<IncompleteType[]> >(
+ 0, nullptr);
+ }
+ checkNumIncompleteTypeAlive(0);
+})
+
+int main() {
+ {
+ test_basic<int>();
+ test_sfinae<int>();
+ }
+ {
+ test_basic<int[]>();
+ test_sfinae<int[]>();
+ }
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp
new file mode 100644
index 000000000000..8df259bd4e1d
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer.pass.cpp
@@ -0,0 +1,171 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+//=============================================================================
+// TESTING std::unique_ptr::unique_ptr(pointer)
+//
+// Concerns:
+// 1 The pointer constructor works for any default constructible deleter types.
+// 2 The pointer constructor accepts pointers to derived types.
+// 2 The stored type 'T' is allowed to be incomplete.
+//
+// Plan
+// 1 Construct unique_ptr<T, D>'s with a pointer to 'T' and various deleter
+// types (C-1)
+// 2 Construct unique_ptr<T, D>'s with a pointer to 'D' and various deleter
+// types where 'D' is derived from 'T'. (C-1,2)
+// 3 Construct a unique_ptr<T, D> with a pointer to 'T' and various deleter
+// types where 'T' is an incomplete type (C-1,3)
+
+// Test unique_ptr(pointer) ctor
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+// unique_ptr(pointer) ctor should only require default Deleter ctor
+
+template <bool IsArray>
+void test_pointer() {
+ typedef typename std::conditional<!IsArray, A, A[]>::type ValueT;
+ const int expect_alive = IsArray ? 5 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U1 = std::unique_ptr<ValueT>;
+ using U2 = std::unique_ptr<ValueT, Deleter<ValueT> >;
+
+ // Test for noexcept
+ static_assert(std::is_nothrow_constructible<U1, A*>::value, "");
+ static_assert(std::is_nothrow_constructible<U2, A*>::value, "");
+
+ // Test for explicit
+ static_assert(!std::is_convertible<A*, U1>::value, "");
+ static_assert(!std::is_convertible<A*, U2>::value, "");
+ }
+#endif
+ {
+ A* p = newValue<ValueT>(expect_alive);
+ assert(A::count == expect_alive);
+ std::unique_ptr<ValueT> s(p);
+ assert(s.get() == p);
+ }
+ assert(A::count == 0);
+ {
+ A* p = newValue<ValueT>(expect_alive);
+ assert(A::count == expect_alive);
+ std::unique_ptr<ValueT, NCDeleter<ValueT> > s(p);
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 0);
+ }
+ assert(A::count == 0);
+}
+
+void test_derived() {
+ {
+ B* p = new B;
+ assert(A::count == 1);
+ assert(B::count == 1);
+ std::unique_ptr<A> s(p);
+ assert(s.get() == p);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ {
+ B* p = new B;
+ assert(A::count == 1);
+ assert(B::count == 1);
+ std::unique_ptr<A, NCDeleter<A> > s(p);
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 0);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+}
+
+#if TEST_STD_VER >= 11
+struct NonDefaultDeleter {
+ NonDefaultDeleter() = delete;
+ void operator()(void*) const {}
+};
+
+struct GenericDeleter {
+ void operator()(void*) const;
+};
+#endif
+
+template <class T>
+void test_sfinae() {
+#if TEST_STD_VER >= 11
+ { // the constructor does not participate in overload resultion when
+ // the deleter is a pointer type
+ using U = std::unique_ptr<T, void (*)(void*)>;
+ static_assert(!std::is_constructible<U, T*>::value, "");
+ }
+ { // the constructor does not participate in overload resolution when
+ // the deleter is not default constructible
+ using Del = CDeleter<T>;
+ using U1 = std::unique_ptr<T, NonDefaultDeleter>;
+ using U2 = std::unique_ptr<T, Del&>;
+ using U3 = std::unique_ptr<T, Del const&>;
+ static_assert(!std::is_constructible<U1, T*>::value, "");
+ static_assert(!std::is_constructible<U2, T*>::value, "");
+ static_assert(!std::is_constructible<U3, T*>::value, "");
+ }
+#endif
+}
+
+static void test_sfinae_runtime() {
+#if TEST_STD_VER >= 11
+ { // the constructor does not participate in overload resolution when
+ // a base <-> derived conversion would occur.
+ using UA = std::unique_ptr<A[]>;
+ using UAD = std::unique_ptr<A[], GenericDeleter>;
+ using UAC = std::unique_ptr<const A[]>;
+ using UB = std::unique_ptr<B[]>;
+ using UBD = std::unique_ptr<B[], GenericDeleter>;
+ using UBC = std::unique_ptr<const B[]>;
+
+ static_assert(!std::is_constructible<UA, B*>::value, "");
+ static_assert(!std::is_constructible<UB, A*>::value, "");
+ static_assert(!std::is_constructible<UAD, B*>::value, "");
+ static_assert(!std::is_constructible<UBD, A*>::value, "");
+ static_assert(!std::is_constructible<UAC, const B*>::value, "");
+ static_assert(!std::is_constructible<UBC, const A*>::value, "");
+ }
+#endif
+}
+
+DEFINE_AND_RUN_IS_INCOMPLETE_TEST({
+ { doIncompleteTypeTest(1, getNewIncomplete()); }
+ checkNumIncompleteTypeAlive(0);
+ {
+ doIncompleteTypeTest<IncompleteType, NCDeleter<IncompleteType> >(
+ 1, getNewIncomplete());
+ }
+ checkNumIncompleteTypeAlive(0);
+})
+
+int main() {
+ {
+ test_pointer</*IsArray*/ false>();
+ test_derived();
+ test_sfinae<int>();
+ }
+ {
+ test_pointer</*IsArray*/ true>();
+ test_sfinae<int[]>();
+ test_sfinae_runtime();
+ }
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter04.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp
index ad64b5e4ea39..b4cd3f36ab57 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter04.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.fail.cpp
@@ -20,11 +20,10 @@
#include <memory>
struct Deleter {
- void operator()(int* p) const {delete p;}
+ void operator()(int* p) const { delete p; }
};
-int main()
-{
- // expected-error@memory:* {{static_assert failed "rvalue deleter bound to reference"}}
- std::unique_ptr<int, const Deleter&> s((int*)nullptr, Deleter()); // expected-note {{requested here}}
+int main() {
+ // expected-error@+1 {{call to deleted constructor of 'std::unique_ptr<int, const Deleter &>}}
+ std::unique_ptr<int, const Deleter&> s((int*)nullptr, Deleter());
}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
new file mode 100644
index 000000000000..781794d41b5e
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
@@ -0,0 +1,328 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+//=============================================================================
+// TESTING unique_ptr(pointer, deleter)
+//
+// Concerns:
+// 1 unique_ptr(pointer, deleter&&) only requires a MoveConstructible deleter.
+// 2 unique_ptr(pointer, deleter&) requires a CopyConstructible deleter.
+// 3 unique_ptr<T, D&>(pointer, deleter) does not require a CopyConstructible deleter.
+// 4 unique_ptr<T, D const&>(pointer, deleter) does not require a CopyConstructible deleter.
+// 5 unique_ptr(pointer, deleter) should work for derived pointers.
+// 6 unique_ptr(pointer, deleter) should work with function pointers.
+// 7 unique_ptr<void> should work.
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+bool my_free_called = false;
+
+void my_free(void*) { my_free_called = true; }
+
+#if TEST_STD_VER >= 11
+struct DeleterBase {
+ void operator()(void*) const {}
+};
+struct CopyOnlyDeleter : DeleterBase {
+ CopyOnlyDeleter() = default;
+ CopyOnlyDeleter(CopyOnlyDeleter const&) = default;
+ CopyOnlyDeleter(CopyOnlyDeleter&&) = delete;
+};
+struct MoveOnlyDeleter : DeleterBase {
+ MoveOnlyDeleter() = default;
+ MoveOnlyDeleter(MoveOnlyDeleter&&) = default;
+};
+struct NoCopyMoveDeleter : DeleterBase {
+ NoCopyMoveDeleter() = default;
+ NoCopyMoveDeleter(NoCopyMoveDeleter const&) = delete;
+};
+#endif
+
+template <bool IsArray>
+void test_sfinae() {
+#if TEST_STD_VER >= 11
+ typedef typename std::conditional<!IsArray, int, int[]>::type VT;
+ {
+ using D = CopyOnlyDeleter;
+ using U = std::unique_ptr<VT, D>;
+ static_assert(std::is_constructible<U, int*, D const&>::value, "");
+ static_assert(std::is_constructible<U, int*, D&>::value, "");
+ static_assert(std::is_constructible<U, int*, D&&>::value, "");
+ // FIXME: __libcpp_compressed_pair attempts to perform a move even though
+ // it should only copy.
+ //D d;
+ //U u(nullptr, std::move(d));
+ }
+ {
+ using D = MoveOnlyDeleter;
+ using U = std::unique_ptr<VT, D>;
+ static_assert(!std::is_constructible<U, int*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, int*, D&>::value, "");
+ static_assert(std::is_constructible<U, int*, D&&>::value, "");
+ D d;
+ U u(nullptr, std::move(d));
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<VT, D>;
+ static_assert(!std::is_constructible<U, int*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, int*, D&>::value, "");
+ static_assert(!std::is_constructible<U, int*, D&&>::value, "");
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<VT, D&>;
+ static_assert(!std::is_constructible<U, int*, D const&>::value, "");
+ static_assert(std::is_constructible<U, int*, D&>::value, "");
+ static_assert(!std::is_constructible<U, int*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, int*, const D&&>::value, "");
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<VT, const D&>;
+ static_assert(std::is_constructible<U, int*, D const&>::value, "");
+ static_assert(std::is_constructible<U, int*, D&>::value, "");
+ static_assert(!std::is_constructible<U, int*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, int*, const D&&>::value, "");
+ }
+#endif
+}
+
+template <bool IsArray>
+void test_noexcept() {
+#if TEST_STD_VER >= 11
+ typedef typename std::conditional<!IsArray, int, int[]>::type VT;
+ {
+ using D = CopyOnlyDeleter;
+ using U = std::unique_ptr<VT, D>;
+ static_assert(std::is_nothrow_constructible<U, int*, D const&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, int*, D&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, int*, D&&>::value, "");
+ }
+ {
+ using D = MoveOnlyDeleter;
+ using U = std::unique_ptr<VT, D>;
+ static_assert(std::is_nothrow_constructible<U, int*, D&&>::value, "");
+ D d;
+ U u(nullptr, std::move(d));
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<VT, D&>;
+ static_assert(std::is_nothrow_constructible<U, int*, D&>::value, "");
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<VT, const D&>;
+ static_assert(std::is_nothrow_constructible<U, int*, D const&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, int*, D&>::value, "");
+ }
+#endif
+}
+
+void test_sfinae_runtime() {
+#if TEST_STD_VER >= 11
+ {
+ using D = CopyOnlyDeleter;
+ using U = std::unique_ptr<A[], D>;
+ static_assert(std::is_nothrow_constructible<U, A*, D const&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, A*, D&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, A*, D&&>::value, "");
+
+ static_assert(!std::is_constructible<U, B*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&&>::value, "");
+ // FIXME: __libcpp_compressed_pair attempts to perform a move even though
+ // it should only copy.
+ //D d;
+ //U u(nullptr, std::move(d));
+ }
+ {
+ using D = MoveOnlyDeleter;
+ using U = std::unique_ptr<A[], D>;
+ static_assert(!std::is_constructible<U, A*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, A*, D&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, A*, D&&>::value, "");
+
+ static_assert(!std::is_constructible<U, B*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&&>::value, "");
+ D d;
+ U u(nullptr, std::move(d));
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<A[], D>;
+ static_assert(!std::is_constructible<U, A*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, A*, D&>::value, "");
+ static_assert(!std::is_constructible<U, A*, D&&>::value, "");
+
+ static_assert(!std::is_constructible<U, B*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&&>::value, "");
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<A[], D&>;
+ static_assert(!std::is_constructible<U, A*, D const&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, A*, D&>::value, "");
+ static_assert(!std::is_constructible<U, A*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, A*, const D&&>::value, "");
+
+ static_assert(!std::is_constructible<U, B*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, B*, const D&&>::value, "");
+ }
+ {
+ using D = NoCopyMoveDeleter;
+ using U = std::unique_ptr<A[], const D&>;
+ static_assert(std::is_nothrow_constructible<U, A*, D const&>::value, "");
+ static_assert(std::is_nothrow_constructible<U, A*, D&>::value, "");
+ static_assert(!std::is_constructible<U, A*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, A*, const D&&>::value, "");
+
+ static_assert(!std::is_constructible<U, B*, D const&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&>::value, "");
+ static_assert(!std::is_constructible<U, B*, D&&>::value, "");
+ static_assert(!std::is_constructible<U, B*, const D&&>::value, "");
+ }
+#endif
+}
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<!IsArray, A, A[]>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+ { // MoveConstructible deleter (C-1)
+ A* p = newValue<VT>(expect_alive);
+ assert(A::count == expect_alive);
+ std::unique_ptr<VT, Deleter<VT> > s(p, Deleter<VT>(5));
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 5);
+ }
+ assert(A::count == 0);
+ { // CopyConstructible deleter (C-2)
+ A* p = newValue<VT>(expect_alive);
+ assert(A::count == expect_alive);
+ CopyDeleter<VT> d(5);
+ std::unique_ptr<VT, CopyDeleter<VT> > s(p, d);
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 5);
+ d.set_state(6);
+ assert(s.get_deleter().state() == 5);
+ }
+ assert(A::count == 0);
+ { // Reference deleter (C-3)
+ A* p = newValue<VT>(expect_alive);
+ assert(A::count == expect_alive);
+ NCDeleter<VT> d(5);
+ std::unique_ptr<VT, NCDeleter<VT>&> s(p, d);
+ assert(s.get() == p);
+ assert(&s.get_deleter() == &d);
+ assert(s.get_deleter().state() == 5);
+ d.set_state(6);
+ assert(s.get_deleter().state() == 6);
+ }
+ assert(A::count == 0);
+ { // Const Reference deleter (C-4)
+ A* p = newValue<VT>(expect_alive);
+ assert(A::count == expect_alive);
+ NCConstDeleter<VT> d(5);
+ std::unique_ptr<VT, NCConstDeleter<VT> const&> s(p, d);
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 5);
+ assert(&s.get_deleter() == &d);
+ }
+ assert(A::count == 0);
+ { // Void and function pointers (C-6,7)
+ typedef typename std::conditional<IsArray, int[], int>::type VT2;
+ my_free_called = false;
+ {
+ int i = 0;
+ std::unique_ptr<VT2, void (*)(void*)> s(&i, my_free);
+ assert(s.get() == &i);
+ assert(s.get_deleter() == my_free);
+ assert(!my_free_called);
+ }
+ assert(my_free_called);
+ }
+}
+
+void test_basic_single() {
+ assert(A::count == 0);
+ assert(B::count == 0);
+ { // Derived pointers (C-5)
+ B* p = new B;
+ assert(A::count == 1);
+ assert(B::count == 1);
+ std::unique_ptr<A, Deleter<A> > s(p, Deleter<A>(5));
+ assert(s.get() == p);
+ assert(s.get_deleter().state() == 5);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ { // Void and function pointers (C-6,7)
+ my_free_called = false;
+ {
+ int i = 0;
+ std::unique_ptr<void, void (*)(void*)> s(&i, my_free);
+ assert(s.get() == &i);
+ assert(s.get_deleter() == my_free);
+ assert(!my_free_called);
+ }
+ assert(my_free_called);
+ }
+}
+
+template <bool IsArray>
+void test_nullptr() {
+#if TEST_STD_VER >= 11
+ typedef typename std::conditional<!IsArray, A, A[]>::type VT;
+ {
+ std::unique_ptr<VT, Deleter<VT> > u(nullptr, Deleter<VT>{});
+ assert(u.get() == nullptr);
+ }
+ {
+ NCDeleter<VT> d;
+ std::unique_ptr<VT, NCDeleter<VT>& > u(nullptr, d);
+ assert(u.get() == nullptr);
+ }
+ {
+ NCConstDeleter<VT> d;
+ std::unique_ptr<VT, NCConstDeleter<VT> const& > u(nullptr, d);
+ assert(u.get() == nullptr);
+ }
+#endif
+}
+
+int main() {
+ {
+ test_basic</*IsArray*/ false>();
+ test_nullptr<false>();
+ test_basic_single();
+ test_sfinae<false>();
+ test_noexcept<false>();
+ }
+ {
+ test_basic</*IsArray*/ true>();
+ test_nullptr<true>();
+ test_sfinae<true>();
+ test_sfinae_runtime();
+ test_noexcept<true>();
+ }
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.dtor/null.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp
index 064f38c5f167..fa10ade51206 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.dtor/null.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.dtor/null.pass.cpp
@@ -16,29 +16,33 @@
#include <memory>
#include <cassert>
-class Deleter
-{
- int state_;
+class Deleter {
+ int state_;
- Deleter(Deleter&);
- Deleter& operator=(Deleter&);
+ Deleter(Deleter&);
+ Deleter& operator=(Deleter&);
public:
- Deleter() : state_(0) {}
+ Deleter() : state_(0) {}
- int state() const {return state_;}
+ int state() const { return state_; }
- void operator()(void*) {++state_;}
+ void operator()(void*) { ++state_; }
};
-int main()
-{
- Deleter d;
- assert(d.state() == 0);
- {
- std::unique_ptr<int, Deleter&> p(0, d);
- assert(p.get() == 0);
+template <class T>
+void test_basic() {
+ Deleter d;
+ assert(d.state() == 0);
+ {
+ std::unique_ptr<T, Deleter&> p(nullptr, d);
+ assert(p.get() == nullptr);
assert(&p.get_deleter() == &d);
- }
- assert(d.state() == 0);
+ }
+ assert(d.state() == 0);
+}
+
+int main() {
+ test_basic<int>();
+ test_basic<int[]>();
}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp
new file mode 100644
index 000000000000..f7f20945094e
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/release.pass.cpp
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test release
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 3 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U = std::unique_ptr<VT>;
+ U u; ((void)u);
+ ASSERT_NOEXCEPT(u.release());
+ }
+#endif
+ {
+ std::unique_ptr<VT> p(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
+ A* ap = p.get();
+ A* a = p.release();
+ assert(A::count == expect_alive);
+ assert(p.get() == nullptr);
+ assert(ap == a);
+ assert(a != nullptr);
+
+ if (IsArray)
+ delete[] a;
+ else
+ delete a;
+
+ assert(A::count == 0);
+ }
+ assert(A::count == 0);
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp
new file mode 100644
index 000000000000..c95c55b4adf8
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.pass.cpp
@@ -0,0 +1,117 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test reset
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <bool IsArray>
+void test_reset_pointer() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 3 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U = std::unique_ptr<VT>;
+ U u; ((void)u);
+ ASSERT_NOEXCEPT(u.reset((A*)nullptr));
+ }
+#endif
+ {
+ std::unique_ptr<VT> p(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
+ A* i = p.get();
+ assert(i != nullptr);
+ A* new_value = newValue<VT>(expect_alive);
+ assert(A::count == (expect_alive * 2));
+ p.reset(new_value);
+ assert(A::count == expect_alive);
+ assert(p.get() == new_value);
+ }
+ assert(A::count == 0);
+ {
+ std::unique_ptr<const VT> p(newValue<const VT>(expect_alive));
+ assert(A::count == expect_alive);
+ const A* i = p.get();
+ assert(i != nullptr);
+ A* new_value = newValue<VT>(expect_alive);
+ assert(A::count == (expect_alive * 2));
+ p.reset(new_value);
+ assert(A::count == expect_alive);
+ assert(p.get() == new_value);
+ }
+ assert(A::count == 0);
+}
+
+template <bool IsArray>
+void test_reset_nullptr() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 3 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U = std::unique_ptr<VT>;
+ U u; ((void)u);
+ ASSERT_NOEXCEPT(u.reset(nullptr));
+ }
+#endif
+ {
+ std::unique_ptr<VT> p(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
+ A* i = p.get();
+ assert(i != nullptr);
+ p.reset(nullptr);
+ assert(A::count == 0);
+ assert(p.get() == nullptr);
+ }
+ assert(A::count == 0);
+}
+
+
+template <bool IsArray>
+void test_reset_no_arg() {
+ typedef typename std::conditional<IsArray, A[], A>::type VT;
+ const int expect_alive = IsArray ? 3 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U = std::unique_ptr<VT>;
+ U u; ((void)u);
+ ASSERT_NOEXCEPT(u.reset());
+ }
+#endif
+ {
+ std::unique_ptr<VT> p(newValue<VT>(expect_alive));
+ assert(A::count == expect_alive);
+ A* i = p.get();
+ assert(i != nullptr);
+ p.reset();
+ assert(A::count == 0);
+ assert(p.get() == nullptr);
+ }
+ assert(A::count == 0);
+}
+
+int main() {
+ {
+ test_reset_pointer</*IsArray*/ false>();
+ test_reset_nullptr<false>();
+ test_reset_no_arg<false>();
+ }
+ {
+ test_reset_pointer</*IsArray*/true>();
+ test_reset_nullptr<true>();
+ test_reset_no_arg<true>();
+ }
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/explicit_bool.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp
index 9ec9b9527e8a..0d067b9abff5 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/explicit_bool.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.runtime.fail.cpp
@@ -11,29 +11,20 @@
// unique_ptr
-// test op*()
+// test reset
#include <memory>
#include <cassert>
-int main()
-{
- {
- std::unique_ptr<int[]> p(new int [3]);
- if (p)
- ;
- else
- assert(false);
- if (!p)
- assert(false);
- }
- {
+#include "unique_ptr_test_helper.h"
+
+int main() {
+ {
+ std::unique_ptr<A[]> p;
+ p.reset(static_cast<B*>(nullptr)); // expected-error {{no matching member function for call to 'reset'}}
+ }
+ {
std::unique_ptr<int[]> p;
- if (!p)
- ;
- else
- assert(false);
- if (p)
- assert(false);
- }
+ p.reset(static_cast<const int*>(nullptr)); // expected-error {{no matching member function for call to 'reset'}}
+ }
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset2.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp
index 2de7787b267e..8f2a69913dde 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset2.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset.single.pass.cpp
@@ -16,30 +16,10 @@
#include <memory>
#include <cassert>
-struct A
-{
- static int count;
- A() {++count;}
- A(const A&) {++count;}
- virtual ~A() {--count;}
-};
+#include "unique_ptr_test_helper.h"
-int A::count = 0;
-
-struct B
- : public A
-{
- static int count;
- B() {++count;}
- B(const B&) {++count;}
- virtual ~B() {--count;}
-};
-
-int B::count = 0;
-
-int main()
-{
- {
+int main() {
+ {
std::unique_ptr<A> p(new A);
assert(A::count == 1);
assert(B::count == 0);
@@ -48,10 +28,10 @@ int main()
p.reset(new B);
assert(A::count == 1);
assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
- {
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
+ {
std::unique_ptr<A> p(new B);
assert(A::count == 1);
assert(B::count == 1);
@@ -60,7 +40,7 @@ int main()
p.reset(new B);
assert(A::count == 1);
assert(B::count == 1);
- }
- assert(A::count == 0);
- assert(B::count == 0);
+ }
+ assert(A::count == 0);
+ assert(B::count == 0);
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset_self.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp
index 58b05efa25f6..f838661c53f0 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.modifiers/reset_self.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/reset_self.pass.cpp
@@ -15,15 +15,11 @@
#include <memory>
-struct A
-{
- std::unique_ptr<A> ptr_;
+struct A {
+ std::unique_ptr<A> ptr_;
- A() : ptr_(this) {}
- void reset() {ptr_.reset();}
+ A() : ptr_(this) {}
+ void reset() { ptr_.reset(); }
};
-int main()
-{
- (new A)->reset();
-}
+int main() { (new A)->reset(); }
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp
new file mode 100644
index 000000000000..de18865c50ae
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.modifiers/swap.pass.cpp
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test swap
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+struct TT {
+ int state_;
+ static int count;
+ TT() : state_(-1) { ++count; }
+ explicit TT(int i) : state_(i) { ++count; }
+ TT(const TT& a) : state_(a.state_) { ++count; }
+ TT& operator=(const TT& a) {
+ state_ = a.state_;
+ return *this;
+ }
+ ~TT() { --count; }
+
+ friend bool operator==(const TT& x, const TT& y) {
+ return x.state_ == y.state_;
+ }
+};
+
+int TT::count = 0;
+
+template <class T>
+typename std::remove_all_extents<T>::type* newValueInit(int size,
+ int new_value) {
+ typedef typename std::remove_all_extents<T>::type VT;
+ VT* p = newValue<T>(size);
+ for (int i = 0; i < size; ++i)
+ (p + i)->state_ = new_value;
+ return p;
+}
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, TT[], TT>::type VT;
+ const int expect_alive = IsArray ? 5 : 1;
+#if TEST_STD_VER >= 11
+ {
+ using U = std::unique_ptr<VT, Deleter<VT> >;
+ U u; ((void)u);
+ ASSERT_NOEXCEPT(u.swap(u));
+ }
+#endif
+ {
+ TT* p1 = newValueInit<VT>(expect_alive, 1);
+ std::unique_ptr<VT, Deleter<VT> > s1(p1, Deleter<VT>(1));
+ TT* p2 = newValueInit<VT>(expect_alive, 2);
+ std::unique_ptr<VT, Deleter<VT> > s2(p2, Deleter<VT>(2));
+ assert(s1.get() == p1);
+ assert(*s1.get() == TT(1));
+ assert(s1.get_deleter().state() == 1);
+ assert(s2.get() == p2);
+ assert(*s2.get() == TT(2));
+ assert(s2.get_deleter().state() == 2);
+ s1.swap(s2);
+ assert(s1.get() == p2);
+ assert(*s1.get() == TT(2));
+ assert(s1.get_deleter().state() == 2);
+ assert(s2.get() == p1);
+ assert(*s2.get() == TT(1));
+ assert(s2.get_deleter().state() == 1);
+ assert(TT::count == (expect_alive * 2));
+ }
+ assert(TT::count == 0);
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/explicit_bool.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp
index d5c7445b0d86..b05fb71cdc67 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/explicit_bool.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp
@@ -16,24 +16,9 @@
#include <memory>
#include <cassert>
-int main()
-{
- {
- std::unique_ptr<int> p(new int(3));
- if (p)
- ;
- else
- assert(false);
- if (!p)
- assert(false);
- }
- {
- std::unique_ptr<int> p;
- if (!p)
- ;
- else
- assert(false);
- if (p)
- assert(false);
- }
+int main() {
+ std::unique_ptr<int[]> p(new int(3));
+ const std::unique_ptr<int[]>& cp = p;
+ (void)(*p); // expected-error {{indirection requires pointer operand ('std::unique_ptr<int []>' invalid)}}
+ (void)(*cp); // expected-error {{indirection requires pointer operand ('const std::unique_ptr<int []>' invalid)}}
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/dereference.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp
index 9d0cfcaaf353..b2d3da48daee 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/dereference.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp
@@ -16,8 +16,7 @@
#include <memory>
#include <cassert>
-int main()
-{
- std::unique_ptr<int> p(new int(3));
- assert(*p == 3);
+int main() {
+ std::unique_ptr<int> p(new int(3));
+ assert(*p == 3);
}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp
new file mode 100644
index 000000000000..9a6d6c65fa81
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/explicit_bool.pass.cpp
@@ -0,0 +1,66 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test op*()
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <class UPtr>
+void doTest(UPtr& p, bool ExpectTrue) {
+ if (p)
+ assert(ExpectTrue);
+ else
+ assert(!ExpectTrue);
+
+ if (!p)
+ assert(!ExpectTrue);
+ else
+ assert(ExpectTrue);
+}
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, int[], int>::type VT;
+ typedef std::unique_ptr<VT> U;
+ {
+ static_assert((std::is_constructible<bool, U>::value), "");
+ static_assert((std::is_constructible<bool, U const&>::value), "");
+ }
+#if TEST_STD_VER >= 11
+ {
+ static_assert(!std::is_convertible<U, bool>::value, "");
+ static_assert(!std::is_convertible<U const&, bool>::value, "");
+ }
+#endif
+ {
+ U p(newValue<VT>(1));
+ U const& cp = p;
+ doTest(p, true);
+ doTest(cp, true);
+ }
+ {
+ U p;
+ const U& cp = p;
+ doTest(p, false);
+ doTest(cp, false);
+ }
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp
new file mode 100644
index 000000000000..518e31cf9487
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test get
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+#include "unique_ptr_test_helper.h"
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, int[], int>::type VT;
+ typedef const VT CVT;
+ {
+ typedef std::unique_ptr<VT> U;
+ int* p = newValue<VT>(1);
+ U s(p);
+ U const& sc = s;
+ ASSERT_SAME_TYPE(decltype(s.get()), int*);
+ ASSERT_SAME_TYPE(decltype(sc.get()), int*);
+ assert(s.get() == p);
+ assert(sc.get() == s.get());
+ }
+ {
+ typedef std::unique_ptr<CVT> U;
+ const int* p = newValue<VT>(1);
+ U s(p);
+ U const& sc = s;
+ ASSERT_SAME_TYPE(decltype(s.get()), const int*);
+ ASSERT_SAME_TYPE(decltype(sc.get()), const int*);
+ assert(s.get() == p);
+ assert(sc.get() == s.get());
+ }
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp
new file mode 100644
index 000000000000..6a00d14a2cae
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get_deleter.pass.cpp
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test get_deleter()
+
+#include <memory>
+#include <cassert>
+#include "test_macros.h"
+
+struct Deleter {
+ Deleter() {}
+
+ void operator()(void*) const {}
+
+ int test() { return 5; }
+ int test() const { return 6; }
+};
+
+template <bool IsArray>
+void test_basic() {
+ typedef typename std::conditional<IsArray, int[], int>::type VT;
+ {
+ std::unique_ptr<int, Deleter> p;
+ assert(p.get_deleter().test() == 5);
+ }
+ {
+ const std::unique_ptr<VT, Deleter> p;
+ assert(p.get_deleter().test() == 6);
+ }
+ {
+ typedef std::unique_ptr<VT, const Deleter&> UPtr;
+ const Deleter d;
+ UPtr p(nullptr, d);
+ const UPtr& cp = p;
+ ASSERT_SAME_TYPE(decltype(p.get_deleter()), const Deleter&);
+ ASSERT_SAME_TYPE(decltype(cp.get_deleter()), const Deleter&);
+ assert(p.get_deleter().test() == 6);
+ assert(cp.get_deleter().test() == 6);
+ }
+ {
+ typedef std::unique_ptr<VT, Deleter&> UPtr;
+ Deleter d;
+ UPtr p(nullptr, d);
+ const UPtr& cp = p;
+ ASSERT_SAME_TYPE(decltype(p.get_deleter()), Deleter&);
+ ASSERT_SAME_TYPE(decltype(cp.get_deleter()), Deleter&);
+ assert(p.get_deleter().test() == 5);
+ assert(cp.get_deleter().test() == 5);
+ }
+}
+
+int main() {
+ test_basic</*IsArray*/ false>();
+ test_basic<true>();
+}
diff --git a/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp
new file mode 100644
index 000000000000..d66af054ce64
--- /dev/null
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// unique_ptr
+
+// test op->()
+
+#include <memory>
+#include <cassert>
+
+struct V {
+ int member;
+};
+
+int main() {
+ std::unique_ptr<V[]> p;
+ std::unique_ptr<V[]> const& cp = p;
+
+ p->member; // expected-error {{member reference type 'std::unique_ptr<V []>' is not a pointer}}
+ // expected-error@-1 {{no member named 'member'}}
+
+ cp->member; // expected-error {{member reference type 'const std::unique_ptr<V []>' is not a pointer}}
+ // expected-error@-1 {{no member named 'member'}}
+}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/op_arrow.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp
index 47de8f66ed2e..8bed9dda2ead 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/op_arrow.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.single.pass.cpp
@@ -16,15 +16,13 @@
#include <memory>
#include <cassert>
-struct A
-{
- int i_;
+struct A {
+ int i_;
- A() : i_(7) {}
+ A() : i_(7) {}
};
-int main()
-{
- std::unique_ptr<A> p(new A);
- assert(p->i_ == 7);
+int main() {
+ std::unique_ptr<A> p(new A);
+ assert(p->i_ == 7);
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/index.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp
index 21e829cbc444..b47c35afb4f5 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.observers/index.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp
@@ -16,32 +16,33 @@
#include <memory>
#include <cassert>
-class A
-{
- int state_;
- static int next_;
+class A {
+ int state_;
+ static int next_;
+
public:
- A() : state_(++next_) {}
- int get() const {return state_;}
+ A() : state_(++next_) {}
+ int get() const { return state_; }
- friend bool operator==(const A& x, int y)
- {return x.state_ == y;}
+ friend bool operator==(const A& x, int y) { return x.state_ == y; }
- A& operator=(int i) {state_ = i; return *this;}
+ A& operator=(int i) {
+ state_ = i;
+ return *this;
+ }
};
int A::next_ = 0;
-int main()
-{
- std::unique_ptr<A> p(new A[3]);
- assert(p[0] == 1);
- assert(p[1] == 2);
- assert(p[2] == 3);
- p[0] = 3;
- p[1] = 2;
- p[2] = 1;
- assert(p[0] == 3);
- assert(p[1] == 2);
- assert(p[2] == 1);
+int main() {
+ std::unique_ptr<A[]> p(new A[3]);
+ assert(p[0] == 1);
+ assert(p[1] == 2);
+ assert(p[2] == 3);
+ p[0] = 3;
+ p[1] = 2;
+ p[2] = 1;
+ assert(p[0] == 3);
+ assert(p[1] == 2);
+ assert(p[2] == 1);
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp
index 2ae0659adc26..529749da67e9 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.observers/get.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.single.fail.cpp
@@ -11,14 +11,14 @@
// unique_ptr
-// test get
+// test op[](size_t)
#include <memory>
#include <cassert>
-int main()
-{
- int* p = new int[3];
- std::unique_ptr<int[]> s(p);
- assert(s.get() == p);
+int main() {
+ std::unique_ptr<int> p(new int[3]);
+ std::unique_ptr<int> const& cp = p;
+ p[0]; // expected-error {{type 'std::unique_ptr<int>' does not provide a subscript operator}}
+ cp[1]; // expected-error {{type 'const std::unique_ptr<int>' does not provide a subscript operator}}
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp
index 30b4ecb94e18..30b4ecb94e18 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp
index 00987919413b..00987919413b 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array1.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp
index cc94e9ab3aaa..cc94e9ab3aaa 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array2.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp
index cfdc2e1d886b..cfdc2e1d886b 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array3.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp
index 07aa659bd9b0..07aa659bd9b0 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.array4.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp
index ace2e4fc7137..ace2e4fc7137 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique.single.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp
index b58f5c55b643..b58f5c55b643 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/nothing_to_do.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
index 9bf794caeda2..9bf794caeda2 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp
index f686e9f01f11..f686e9f01f11 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/default.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp
index 255e5cd39c69..255e5cd39c69 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/incomplete.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp
index 5d1cf1ff4981..5d1cf1ff4981 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp
index 41209d977b71..41209d977b71 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
index 2949d6310c59..2949d6310c59 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp
index 7a409766412f..7a409766412f 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/default.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp
index 528b10e9085d..528b10e9085d 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/incomplete.fail.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp
index b58f5c55b643..b58f5c55b643 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.general/nothing_to_do.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
index 22ae217a61d6..22ae217a61d6 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.special/eq.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
index 37886548e721..88a1e04ba4ec 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.special/eq.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
@@ -22,7 +22,7 @@
#include <memory>
#include <cassert>
-#include "../deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.special/rel.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
index 80653cf707c3..94ae89ba92b3 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.special/rel.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
@@ -30,7 +30,7 @@
#include <memory>
#include <cassert>
-#include "../deleter.h"
+#include "deleter_types.h"
struct A
{
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.special/swap.pass.cpp b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp
index c525137d4841..7ac0ba490e97 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.special/swap.pass.cpp
+++ b/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp
@@ -17,7 +17,7 @@
#include <cassert>
#include "test_macros.h"
-#include "../deleter.h"
+#include "deleter_types.h"
struct A
{
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 bc65078911b2..8eab082cf676 100644
--- a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
@@ -30,6 +30,8 @@ test()
typedef std::hash<T> H;
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.hash/enabled_hash.pass.cpp b/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp
new file mode 100644
index 000000000000..1d8bff41ae53
--- /dev/null
+++ b/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <bitset>
+
+// Test that <bitset> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <bitset>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+ {
+ test_hash_enabled_for_type<std::bitset<0> >();
+ test_hash_enabled_for_type<std::bitset<1> >();
+ test_hash_enabled_for_type<std::bitset<1024> >();
+ test_hash_enabled_for_type<std::bitset<100000> >();
+ }
+}
diff --git a/test/std/utilities/template.bitset/bitset.members/all.pass.cpp b/test/std/utilities/template.bitset/bitset.members/all.pass.cpp
index 5387b733918f..de1cddb5b1ae 100644
--- a/test/std/utilities/template.bitset/bitset.members/all.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/all.pass.cpp
@@ -10,6 +10,7 @@
// test bool all() const;
#include <bitset>
+#include <type_traits>
#include <cassert>
template <std::size_t N>
@@ -20,7 +21,8 @@ void test_all()
assert(v.all() == (N == 0));
v.set();
assert(v.all() == true);
- if (N > 1)
+ const bool greater_than_1 = std::integral_constant<bool, (N > 1)>::value; // avoid compiler warnings
+ if (greater_than_1)
{
v[N/2] = false;
assert(v.all() == false);
diff --git a/test/std/utilities/template.bitset/bitset.members/any.pass.cpp b/test/std/utilities/template.bitset/bitset.members/any.pass.cpp
index aa6384a49df1..7ee83dd07482 100644
--- a/test/std/utilities/template.bitset/bitset.members/any.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/any.pass.cpp
@@ -10,6 +10,7 @@
// test bool any() const;
#include <bitset>
+#include <type_traits>
#include <cassert>
template <std::size_t N>
@@ -20,7 +21,8 @@ void test_any()
assert(v.any() == false);
v.set();
assert(v.any() == (N != 0));
- if (N > 1)
+ const bool greater_than_1 = std::integral_constant<bool, (N > 1)>::value; // avoid compiler warnings
+ if (greater_than_1)
{
v[N/2] = false;
assert(v.any() == true);
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 02e58a7890c5..f352475fc199 100644
--- a/test/std/utilities/template.bitset/bitset.members/index.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/index.pass.cpp
@@ -10,6 +10,7 @@
// test bitset<N>::reference operator[](size_t pos);
#include <bitset>
+#include <type_traits>
#include <cstdlib>
#include <cassert>
@@ -31,7 +32,8 @@ template <std::size_t N>
void test_index_const()
{
std::bitset<N> v1 = make_bitset<N>();
- if (N > 0)
+ const bool greater_than_0 = std::integral_constant<bool, (N > 0)>::value; // avoid compiler warnings
+ if (greater_than_0)
{
assert(v1[N/2] == v1.test(N/2));
typename std::bitset<N>::reference r = v1[N/2];
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 870a504c2d75..fbde54859f19 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
@@ -10,6 +10,7 @@
// test constexpr bool operator[](size_t pos) const;
#include <bitset>
+#include <type_traits>
#include <cstdlib>
#include <cassert>
@@ -31,7 +32,8 @@ template <std::size_t N>
void test_index_const()
{
const std::bitset<N> v1 = make_bitset<N>();
- if (N > 0)
+ const bool greater_than_0 = std::integral_constant<bool, (N > 0)>::value; // avoid compiler warnings
+ if (greater_than_0)
{
assert(v1[N/2] == v1.test(N/2));
}
diff --git a/test/std/utilities/template.bitset/bitset.members/none.pass.cpp b/test/std/utilities/template.bitset/bitset.members/none.pass.cpp
index b65c636f3c56..1358eaa62d59 100644
--- a/test/std/utilities/template.bitset/bitset.members/none.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/none.pass.cpp
@@ -10,6 +10,7 @@
// test bool none() const;
#include <bitset>
+#include <type_traits>
#include <cassert>
template <std::size_t N>
@@ -20,7 +21,8 @@ void test_none()
assert(v.none() == true);
v.set();
assert(v.none() == (N == 0));
- if (N > 1)
+ const bool greater_than_1 = std::integral_constant<bool, (N > 1)>::value; // avoid compiler warnings
+ if (greater_than_1)
{
v[N/2] = false;
assert(v.none() == false);
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 24761c628c03..5b7e10d677ee 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
@@ -13,6 +13,7 @@
// bool operator!=(const bitset<N>& rhs) const;
#include <bitset>
+#include <type_traits>
#include <cstdlib>
#include <cassert>
@@ -36,7 +37,8 @@ void test_equality()
const std::bitset<N> v1 = make_bitset<N>();
std::bitset<N> v2 = v1;
assert(v1 == v2);
- if (N > 0)
+ const bool greater_than_0 = std::integral_constant<bool, (N > 0)>::value; // avoid compiler warnings
+ if (greater_than_0)
{
v2[N/2].flip();
assert(v1 != v2);
diff --git a/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp b/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
index 27d8480d10cf..a2c9df6b4a22 100644
--- a/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
@@ -11,6 +11,7 @@
#include <bitset>
#include <algorithm>
+#include <type_traits>
#include <climits>
#include <cassert>
@@ -18,8 +19,9 @@ template <std::size_t N>
void test_to_ullong()
{
const std::size_t M = sizeof(unsigned long long) * CHAR_BIT < N ? sizeof(unsigned long long) * CHAR_BIT : N;
- const std::size_t X = M == 0 ? sizeof(unsigned long long) * CHAR_BIT - 1 : sizeof(unsigned long long) * CHAR_BIT - M;
- const unsigned long long max = M == 0 ? 0 : (unsigned long long)(-1) >> X;
+ const bool is_M_zero = std::integral_constant<bool, M == 0>::value; // avoid compiler warnings
+ const std::size_t X = is_M_zero ? sizeof(unsigned long long) * CHAR_BIT - 1 : sizeof(unsigned long long) * CHAR_BIT - M;
+ const unsigned long long max = is_M_zero ? 0 : (unsigned long long)(-1) >> X;
unsigned long long tests[] = {0,
std::min<unsigned long long>(1, max),
std::min<unsigned long long>(2, max),
diff --git a/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp b/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
index 3ad1abade9f4..7cabd06e5f32 100644
--- a/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
@@ -11,6 +11,7 @@
#include <bitset>
#include <algorithm>
+#include <type_traits>
#include <limits>
#include <climits>
#include <cassert>
@@ -19,8 +20,9 @@ template <std::size_t N>
void test_to_ulong()
{
const std::size_t M = sizeof(unsigned long) * CHAR_BIT < N ? sizeof(unsigned long) * CHAR_BIT : N;
- const std::size_t X = M == 0 ? sizeof(unsigned long) * CHAR_BIT - 1 : sizeof(unsigned long) * CHAR_BIT - M;
- const std::size_t max = M == 0 ? 0 : std::size_t(std::numeric_limits<unsigned long>::max()) >> X;
+ const bool is_M_zero = std::integral_constant<bool, M == 0>::value; // avoid compiler warnings
+ const std::size_t X = is_M_zero ? sizeof(unsigned long) * CHAR_BIT - 1 : sizeof(unsigned long) * CHAR_BIT - M;
+ const std::size_t max = is_M_zero ? 0 : std::size_t(std::numeric_limits<unsigned long>::max()) >> X;
std::size_t tests[] = {0,
std::min<std::size_t>(1, max),
std::min<std::size_t>(2, max),
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 b6b3aeea94f8..bf2a2e589137 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
@@ -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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-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.
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 6302ce6efb34..b836c0dc00e6 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
@@ -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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-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
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 cfbe9bd57032..a4058e5ab97b 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
@@ -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-darwin11
-// XFAIL: with_system_cxx_lib=x86_64-apple-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.
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp
index c0f10147ee89..b85f039526a4 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+.pass.cpp
@@ -11,11 +11,13 @@
// duration
-// duration operator+() const;
+// constexpr common_type_t<duration> operator+() const;
#include <chrono>
#include <cassert>
+#include <test_macros.h>
+
int main()
{
{
@@ -23,11 +25,22 @@ int main()
std::chrono::minutes m2 = +m;
assert(m.count() == m2.count());
}
-#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER >= 11
{
constexpr std::chrono::minutes m(3);
constexpr std::chrono::minutes m2 = +m;
static_assert(m.count() == m2.count(), "");
}
#endif
+
+// P0548
+ {
+ typedef std::chrono::duration<int, std::ratio<10,10> > D10;
+ typedef std::chrono::duration<int, std::ratio< 1, 1> > D1;
+ D10 zero(0);
+ D10 one(1);
+ static_assert( (std::is_same< decltype(+one), decltype(zero-one) >::value), "");
+ static_assert( (std::is_same< decltype(zero+one), D1>::value), "");
+ static_assert( (std::is_same< decltype(+one), D1>::value), "");
+ }
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp
index 00da6f69ca53..347cc1980e81 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-.pass.cpp
@@ -11,11 +11,13 @@
// duration
-// duration operator-() const;
+// constexpr common_type_t<duration> operator-() const;
#include <chrono>
#include <cassert>
+#include <test_macros.h>
+
int main()
{
{
@@ -23,11 +25,23 @@ int main()
std::chrono::minutes m2 = -m;
assert(m2.count() == -m.count());
}
-#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER >= 11
{
constexpr std::chrono::minutes m(3);
constexpr std::chrono::minutes m2 = -m;
static_assert(m2.count() == -m.count(), "");
}
#endif
+
+// P0548
+ {
+ typedef std::chrono::duration<int, std::ratio<10,10> > D10;
+ typedef std::chrono::duration<int, std::ratio< 1, 1> > D1;
+ D10 zero(0);
+ D10 one(1);
+ static_assert( (std::is_same< decltype(-one), decltype(zero-one) >::value), "");
+ static_assert( (std::is_same< decltype(zero-one), D1>::value), "");
+ static_assert( (std::is_same< decltype(-one), D1>::value), "");
+ static_assert( (std::is_same< decltype(+one), D1>::value), "");
+ }
}
diff --git a/test/std/utilities/tuple/tuple.general/ignore.pass.cpp b/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
new file mode 100644
index 000000000000..8dae3a5dcb0e
--- /dev/null
+++ b/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <tuple>
+
+// constexpr unspecified ignore;
+
+// UNSUPPORTED: c++98, c++03
+
+#include <tuple>
+#include <cassert>
+
+#include "test_macros.h"
+
+constexpr bool test_ignore_constexpr()
+{
+#if TEST_STD_VER > 11
+ { // Test that std::ignore provides constexpr converting assignment.
+ auto& res = (std::ignore = 42);
+ assert(&res == &std::ignore);
+ }
+ { // Test that std::ignore provides constexpr copy/move constructors
+ auto copy = std::ignore;
+ auto moved = std::move(copy);
+ ((void)moved);
+ }
+ { // Test that std::ignore provides constexpr copy/move assignment
+ auto copy = std::ignore;
+ copy = std::ignore;
+ auto moved = std::ignore;
+ moved = std::move(copy);
+ }
+#endif
+ return true;
+}
+
+int main() {
+ {
+ constexpr auto& ignore_v = std::ignore;
+ ((void)ignore_v);
+ }
+ {
+ static_assert(test_ignore_constexpr(), "");
+ }
+#if defined(_LIBCPP_VERSION)
+ {
+ static_assert(std::is_trivial<decltype(std::ignore)>::value, "");
+ }
+#endif
+}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
index eee1dd88253c..bd91ce61b4ec 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
@@ -66,7 +66,7 @@ constexpr bool do_constexpr_test(Tuple&& tup) {
return std::make_from_tuple<Tp>(std::forward<Tuple>(tup)).args == tup;
}
-// Needed by do_forwarding_test() since it compare pairs of different types.
+// Needed by do_forwarding_test() since it compares pairs of different types.
template <class T1, class T2, class U1, class U2>
inline bool operator==(const std::pair<T1, T2>& lhs, const std::pair<U1, U2>& rhs) {
return lhs.first == rhs.first && lhs.second == rhs.second;
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
index 4ddfb463385c..0d3b7ff24edb 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp
@@ -89,7 +89,7 @@ int main()
// when both #1 and #2 participate in partial ordering #2 will always
// be chosen over #1.
// See PR22806 and LWG issue #2549 for more information.
- // (https://llvm.org/bugs/show_bug.cgi?id=22806)
+ // (https://bugs.llvm.org/show_bug.cgi?id=22806)
using T = std::tuple<int>;
std::allocator<int> A;
{ // rvalue reference
@@ -144,8 +144,8 @@ int main()
assert(&std::get<0>(t2) == &t1);
}
// Test constructing a 1-tuple of the form tuple<UDT> from another 1-tuple
- // 'tuple<T>' where UDT *can* be constructed from 'tuple<T>' In this case
- // the 'tuple(UTypes...)' ctor should be choosen and 'UDT' constructed frow
+ // 'tuple<T>' where UDT *can* be constructed from 'tuple<T>'. In this case
+ // the 'tuple(UTypes...)' ctor should be chosen and 'UDT' constructed from
// 'tuple<T>'.
{
using VT = ConstructibleFromTupleAndInt;
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
index 4da5fc7f8397..b262f3cacecf 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
@@ -18,7 +18,7 @@
// NOTE: this constructor does not currently support tags derived from
// allocator_arg_t because libc++ has to deduce the parameter as a template
-// argument. See PR27684 (https://llvm.org/bugs/show_bug.cgi?id=27684)
+// argument. See PR27684 (https://bugs.llvm.org/show_bug.cgi?id=27684)
#include <tuple>
#include <cassert>
@@ -96,7 +96,7 @@ int main()
}
{
// Test that the uses-allocator default constructor does not evaluate
- // it's SFINAE when it otherwise shouldn't be selected. Do this by
+ // its SFINAE when it otherwise shouldn't be selected. Do this by
// using 'NonDefaultConstructible' which will cause a compile error
// if std::is_default_constructible is evaluated on it.
using T = NonDefaultConstructible<>;
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
index d282c9c68a42..eeaa8a24ee68 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
@@ -100,8 +100,8 @@ int main()
assert(std::get<1>(t) == nullptr);
}
{
- // Check that the SFINAE on the default constructor is not evaluted when
- // it isn't needed. If the default constructor is evaluted then this test
+ // Check that the SFINAE on the default constructor is not evaluated when
+ // it isn't needed. If the default constructor is evaluated then this test
// should fail to compile.
IllFormedDefault v(0);
std::tuple<IllFormedDefault> t(v);
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
index c4c3c242d8f8..5dc98afe6610 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
@@ -22,6 +22,24 @@
#include "test_macros.h"
+#if TEST_STD_VER > 11
+constexpr bool test_tie_constexpr() {
+ {
+ int i = 42;
+ double f = 1.1;
+ using ExpectT = std::tuple<int&, decltype(std::ignore)&, double&>;
+ auto res = std::tie(i, std::ignore, f);
+ static_assert(std::is_same<ExpectT, decltype(res)>::value, "");
+ assert(&std::get<0>(res) == &i);
+ assert(&std::get<1>(res) == &std::ignore);
+ assert(&std::get<2>(res) == &f);
+ // FIXME: If/when tuple gets constexpr assignment
+ //res = std::make_tuple(101, nullptr, -1.0);
+ }
+ return true;
+}
+#endif
+
int main()
{
{
@@ -39,5 +57,8 @@ int main()
static_assert ( std::get<0>(t) == 42, "" );
static_assert ( std::get<1>(t) == 1.1, "" );
}
+ {
+ static_assert(test_tie_constexpr(), "");
+ }
#endif
}
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.fail.cpp b/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp
index 82b84948f3f0..26bada38fdd5 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02.fail.cpp
+++ b/test/std/utilities/type.index/type.index.hash/enabled_hash.pass.cpp
@@ -7,24 +7,17 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+// UNSUPPORTED: c++98, c++03
-// unique_ptr
+// <typeindex>
-// Test unique_ptr default ctor
+// Test that <typeindex> provides all of the arithmetic, enum, and pointer
+// hash specializations.
-// default unique_ptr ctor should require non-reference Deleter ctor
+#include <typeindex>
-#include <memory>
+#include "poisoned_hash_helper.hpp"
-class Deleter
-{
-public:
-
- void operator()(void*) {}
-};
-
-int main()
-{
- std::unique_ptr<int[], Deleter&> p;
+int main() {
+ test_library_hash_specializations_available();
}
diff --git a/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp b/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
index 6d353f1d3057..9ab58ea6c3aa 100644
--- a/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
+++ b/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
@@ -18,9 +18,21 @@
#include <typeindex>
#include <type_traits>
+#include "test_macros.h"
+#if TEST_STD_VER >= 11
+#include "poisoned_hash_helper.hpp"
+#endif
+
int main()
{
+ {
typedef std::hash<std::type_index> H;
static_assert((std::is_same<typename H::argument_type, std::type_index>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
+ }
+#if TEST_STD_VER >= 11
+ {
+ test_hash_enabled_for_type<std::type_index>(std::type_index(typeid(int)));
+ }
+#endif
}
diff --git a/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp
index 2623b800fff7..cf1afff90cda 100644
--- a/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp
+++ b/test/std/utilities/utility/pairs/pairs.pair/assign_pair_cxx03.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES-ANY: c++98, c++03
+// REQUIRES: c++98 || c++03
// <utility>
diff --git a/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp
index 8f9fc669251a..d5e1e232f86f 100644
--- a/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp
+++ b/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp
@@ -32,7 +32,7 @@
struct DeletedDefault {
// A class with a deleted default constructor. Used to test the SFINAE
- // on std::pairs default constructor.
+ // on std::pair's default constructor.
constexpr explicit DeletedDefault(int x) : value(x) {}
constexpr DeletedDefault() = delete;
int value;
diff --git a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
index ace00a16f21e..af91abe74e1e 100644
--- a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
+++ b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
@@ -15,7 +15,7 @@
// This test doesn't pass due to a constexpr bug in GCC 4.9 that fails
// to initialize any type without a user provided constructor in a constant
-// expression (ie float).
+// expression (e.g. float).
// XFAIL: gcc-4.9
// NOTE: The SFINAE on the default constructor is tested in
@@ -49,7 +49,7 @@ int main()
using P = std::pair<int, NoDefault>;
static_assert(!std::is_default_constructible<P>::value, "");
using P2 = std::pair<NoDefault, int>;
- static_assert(!std::is_default_constructible<P>::value, "");
+ static_assert(!std::is_default_constructible<P2>::value, "");
}
#endif
}
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 72d17b0ed971..bc7a566040eb 100644
--- a/test/std/utilities/variant/variant.get/get_index.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_index.pass.cpp
@@ -36,7 +36,7 @@ void test_const_lvalue_get() {
{
using V = std::variant<int, const long>;
constexpr V v(42);
-#ifndef __clang__ // Avoid https://llvm.org/bugs/show_bug.cgi?id=15481
+#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
ASSERT_NOEXCEPT(std::get<0>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &);
@@ -52,7 +52,7 @@ void test_const_lvalue_get() {
{
using V = std::variant<int, const long>;
constexpr V v(42l);
-#ifndef __clang__ // Avoid https://llvm.org/bugs/show_bug.cgi?id=15481
+#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
ASSERT_NOEXCEPT(std::get<1>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &);
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 fc355378a21a..013a081f5c77 100644
--- a/test/std/utilities/variant/variant.get/get_type.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_type.pass.cpp
@@ -30,7 +30,7 @@ void test_const_lvalue_get() {
{
using V = std::variant<int, const long>;
constexpr V v(42);
-#ifndef __clang__ // Avoid https://llvm.org/bugs/show_bug.cgi?id=15481
+#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
ASSERT_NOEXCEPT(std::get<int>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &);
@@ -46,7 +46,7 @@ void test_const_lvalue_get() {
{
using V = std::variant<int, const long>;
constexpr V v(42l);
-#ifndef __clang__ // Avoid https://llvm.org/bugs/show_bug.cgi?id=15481
+#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
ASSERT_NOEXCEPT(std::get<const long>(v));
#endif
ASSERT_SAME_TYPE(decltype(std::get<const long>(v)), const long &);
diff --git a/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp b/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp
new file mode 100644
index 000000000000..826dcbae6b9f
--- /dev/null
+++ b/test/std/utilities/variant/variant.hash/enabled_hash.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// <variant>
+
+// Test that <variant> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <variant>
+
+#include "poisoned_hash_helper.hpp"
+
+int main() {
+ test_library_hash_specializations_available();
+}
diff --git a/test/std/utilities/variant/variant.hash/hash.pass.cpp b/test/std/utilities/variant/variant.hash/hash.pass.cpp
index d807a7c7e2ea..2ad2184f4db1 100644
--- a/test/std/utilities/variant/variant.hash/hash.pass.cpp
+++ b/test/std/utilities/variant/variant.hash/hash.pass.cpp
@@ -21,6 +21,7 @@
#include "test_macros.h"
#include "variant_test_helpers.hpp"
+#include "poisoned_hash_helper.hpp"
#ifndef TEST_HAS_NO_EXCEPTIONS
namespace std {
@@ -101,8 +102,12 @@ void test_hash_monostate() {
assert(h(m1) == h(m2));
{
ASSERT_SAME_TYPE(decltype(h(m1)), std::size_t);
+ ASSERT_NOEXCEPT(h(m1));
static_assert(std::is_copy_constructible<H>::value, "");
}
+ {
+ test_hash_enabled_for_type<std::monostate>();
+ }
}
void test_hash_variant_duplicate_elements() {
@@ -117,8 +122,38 @@ void test_hash_variant_duplicate_elements() {
LIBCPP_ASSERT(h(v1) != h(v2));
}
+struct A {};
+struct B {};
+
+namespace std {
+
+template <>
+struct hash<B> {
+ size_t operator()(B const&) const {
+ return 0;
+ }
+};
+
+}
+
+void test_hash_variant_enabled() {
+ {
+ test_hash_enabled_for_type<std::variant<int> >();
+ test_hash_enabled_for_type<std::variant<int*, long, double, const int> >();
+ }
+ {
+ test_hash_disabled_for_type<std::variant<int, A>>();
+ test_hash_disabled_for_type<std::variant<const A, void*>>();
+ }
+ {
+ test_hash_enabled_for_type<std::variant<int, B>>();
+ test_hash_enabled_for_type<std::variant<const B, int>>();
+ }
+}
+
int main() {
test_hash_variant();
test_hash_variant_duplicate_elements();
test_hash_monostate();
+ test_hash_variant_enabled();
}
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 8f694cfd5eda..0d0b978e3959 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
@@ -14,7 +14,8 @@
// template <class ...Types> class variant;
-// template <size_t I, class ...Args> void emplace(Args&&... args);
+// template <size_t I, class ...Args>
+// variant_alternative_t<I, variant<Types...>>& emplace(Args&&... args);
#include <cassert>
#include <string>
@@ -85,10 +86,14 @@ void test_basic() {
{
using V = std::variant<int>;
V v(42);
- v.emplace<0>();
+ auto& ref1 = v.emplace<0>();
+ static_assert(std::is_same_v<int&, decltype(ref1)>, "");
assert(std::get<0>(v) == 0);
- v.emplace<0>(42);
+ assert(&ref1 == &std::get<0>(v));
+ auto& ref2 = v.emplace<0>(42);
+ static_assert(std::is_same_v<int&, decltype(ref2)>, "");
assert(std::get<0>(v) == 42);
+ assert(&ref2 == &std::get<0>(v));
}
{
using V =
@@ -96,13 +101,19 @@ void test_basic() {
const int x = 100;
V v(std::in_place_index<0>, -1);
// default emplace a value
- v.emplace<1>();
+ auto& ref1 = v.emplace<1>();
+ static_assert(std::is_same_v<long&, decltype(ref1)>, "");
assert(std::get<1>(v) == 0);
- v.emplace<2>(&x);
+ assert(&ref1 == &std::get<1>(v));
+ auto& ref2 = v.emplace<2>(&x);
+ static_assert(std::is_same_v<const void*&, decltype(ref2)>, "");
assert(std::get<2>(v) == &x);
+ assert(&ref2 == &std::get<2>(v));
// emplace with multiple args
- v.emplace<4>(3, 'a');
+ auto& ref3 = v.emplace<4>(3, 'a');
+ static_assert(std::is_same_v<std::string&, decltype(ref3)>, "");
assert(std::get<4>(v) == "aaa");
+ assert(&ref3 == &std::get<4>(v));
}
#if !defined(TEST_VARIANT_HAS_NO_REFERENCES)
{
@@ -113,20 +124,30 @@ void test_basic() {
int z = 43;
V v(std::in_place_index<0>, -1);
// default emplace a value
- v.emplace<1>();
+ auto& ref1 = v.emplace<1>();
+ static_assert(std::is_same_v<long&, decltype(ref1)>, "");
assert(std::get<1>(v) == 0);
+ assert(&ref1 == &std::get<1>(v));
// emplace a reference
- v.emplace<2>(x);
+ auto& ref2 = v.emplace<2>(x);
+ static_assert(std::is_same_v<&, decltype(ref)>, "");
assert(&std::get<2>(v) == &x);
+ assert(&ref2 == &std::get<2>(v));
// emplace an rvalue reference
- v.emplace<3>(std::move(y));
+ auto& ref3 = v.emplace<3>(std::move(y));
+ static_assert(std::is_same_v<&, decltype(ref)>, "");
assert(&std::get<3>(v) == &y);
+ assert(&ref3 == &std::get<3>(v));
// re-emplace a new reference over the active member
- v.emplace<3>(std::move(z));
+ auto& ref4 = v.emplace<3>(std::move(z));
+ static_assert(std::is_same_v<&, decltype(ref)>, "");
assert(&std::get<3>(v) == &z);
+ assert(&ref4 == &std::get<3>(v));
// emplace with multiple args
- v.emplace<5>(3, 'a');
+ auto& ref5 = v.emplace<5>(3, 'a');
+ static_assert(std::is_same_v<std::string&, decltype(ref5)>, "");
assert(std::get<5>(v) == "aaa");
+ assert(&ref5 == &std::get<5>(v));
}
#endif
}
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 f466b160cb4f..e69988a08e96 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
@@ -15,7 +15,7 @@
// template <class ...Types> class variant;
// template <size_t I, class U, class ...Args>
-// void emplace(initializer_list<U> il,Args&&... args);
+// variant_alternative_t<I, variant<Types...>>& emplace(initializer_list<U> il,Args&&... args);
#include <cassert>
#include <string>
@@ -70,13 +70,19 @@ void test_emplace_sfinae() {
void test_basic() {
using V = std::variant<int, InitList, InitListArg, TestTypes::NoCtors>;
V v;
- v.emplace<1>({1, 2, 3});
+ auto& ref1 = v.emplace<1>({1, 2, 3});
+ static_assert(std::is_same_v<InitList&, decltype(ref1)>, "");
assert(std::get<1>(v).size == 3);
- v.emplace<2>({1, 2, 3, 4}, 42);
+ assert(&ref1 == &std::get<1>(v));
+ auto& ref2 = v.emplace<2>({1, 2, 3, 4}, 42);
+ static_assert(std::is_same_v<InitListArg&, decltype(ref2)>, "");
assert(std::get<2>(v).size == 4);
assert(std::get<2>(v).value == 42);
- v.emplace<1>({1});
+ assert(&ref2 == &std::get<2>(v));
+ auto& ref3 = v.emplace<1>({1});
+ static_assert(std::is_same_v<InitList&, decltype(ref3)>, "");
assert(std::get<1>(v).size == 1);
+ assert(&ref3 == &std::get<1>(v));
}
int main() {
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 4ca2cc4803e3..8e329024b9df 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
@@ -14,7 +14,7 @@
// template <class ...Types> class variant;
-// template <class T, class ...Args> void emplace(Args&&... args);
+// template <class T, class ...Args> T& emplace(Args&&... args);
#include <cassert>
#include <string>
@@ -86,10 +86,14 @@ void test_basic() {
{
using V = std::variant<int>;
V v(42);
- v.emplace<int>();
+ auto& ref1 = v.emplace<int>();
+ static_assert(std::is_same_v<int&, decltype(ref1)>, "");
assert(std::get<0>(v) == 0);
- v.emplace<int>(42);
+ assert(&ref1 == &std::get<0>(v));
+ auto& ref2 = v.emplace<int>(42);
+ static_assert(std::is_same_v<int&, decltype(ref2)>, "");
assert(std::get<0>(v) == 42);
+ assert(&ref2 == &std::get<0>(v));
}
{
using V =
@@ -97,13 +101,19 @@ void test_basic() {
const int x = 100;
V v(std::in_place_type<int>, -1);
// default emplace a value
- v.emplace<long>();
+ auto& ref1 = v.emplace<long>();
+ static_assert(std::is_same_v<long&, decltype(ref1)>, "");
assert(std::get<1>(v) == 0);
- v.emplace<const void *>(&x);
+ assert(&ref1 == &std::get<1>(v));
+ auto& ref2 = v.emplace<const void *>(&x);
+ static_assert(std::is_same_v<const void *&, decltype(ref2)>, "");
assert(std::get<2>(v) == &x);
+ assert(&ref2 == &std::get<2>(v));
// emplace with multiple args
- v.emplace<std::string>(3, 'a');
+ auto& ref3 = v.emplace<std::string>(3, 'a');
+ static_assert(std::is_same_v<std::string&, decltype(ref3)>, "");
assert(std::get<4>(v) == "aaa");
+ assert(&ref3 == &std::get<4>(v));
}
#if !defined(TEST_VARIANT_HAS_NO_REFERENCES)
{
@@ -114,20 +124,30 @@ void test_basic() {
int z = 43;
V v(std::in_place_index<0>, -1);
// default emplace a value
- v.emplace<long>();
+ auto& ref1 = v.emplace<long>();
+ static_assert(std::is_same_v<long&, decltype(ref1)>, "");
assert(std::get<long>(v) == 0);
+ assert(&ref1 == &std::get<long>(v));
// emplace a reference
- v.emplace<const int &>(x);
+ auto& ref2 = v.emplace<const int &>(x);
+ static_assert(std::is_same_v<const int&, decltype(ref2)>, "");
assert(&std::get<const int &>(v) == &x);
+ assert(&ref2 == &std::get<const int &>(v));
// emplace an rvalue reference
- v.emplace<int &&>(std::move(y));
+ auto& ref3 = v.emplace<int &&>(std::move(y));
+ static_assert(std::is_same_v<int &&, decltype(ref3)>, "");
assert(&std::get<int &&>(v) == &y);
+ assert(&ref3 == &std::get<int &&>(v));
// re-emplace a new reference over the active member
- v.emplace<int &&>(std::move(z));
+ auto& ref4 = v.emplace<int &&>(std::move(z));
+ static_assert(std::is_same_v<int &, decltype(ref4)>, "");
assert(&std::get<int &&>(v) == &z);
+ assert(&ref4 == &std::get<int &&>(v));
// emplace with multiple args
- v.emplace<std::string>(3, 'a');
+ auto& ref5 = v.emplace<std::string>(3, 'a');
+ static_assert(std::is_same_v<std::string&, decltype(ref5)>, "");
assert(std::get<std::string>(v) == "aaa");
+ assert(&ref5 == &std::get<std::string>(v));
}
#endif
}
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 b2be8ac5b3fd..da1658cb88f6 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
@@ -15,7 +15,7 @@
// template <class ...Types> class variant;
// template <class T, class U, class ...Args>
-// void emplace(initializer_list<U> il,Args&&... args);
+// T& emplace(initializer_list<U> il,Args&&... args);
#include <cassert>
#include <string>
@@ -70,13 +70,19 @@ void test_emplace_sfinae() {
void test_basic() {
using V = std::variant<int, InitList, InitListArg, TestTypes::NoCtors>;
V v;
- v.emplace<InitList>({1, 2, 3});
+ auto& ref1 = v.emplace<InitList>({1, 2, 3});
+ static_assert(std::is_same_v<InitList&,decltype(ref1)>, "");
assert(std::get<InitList>(v).size == 3);
- v.emplace<InitListArg>({1, 2, 3, 4}, 42);
+ assert(&ref1 == &std::get<InitList>(v));
+ auto& ref2 = v.emplace<InitListArg>({1, 2, 3, 4}, 42);
+ static_assert(std::is_same_v<InitListArg&,decltype(ref2)>, "");
assert(std::get<InitListArg>(v).size == 4);
assert(std::get<InitListArg>(v).value == 42);
- v.emplace<InitList>({1});
+ assert(&ref2 == &std::get<InitListArg>(v));
+ auto& ref3 = v.emplace<InitList>({1});
+ static_assert(std::is_same_v<InitList&,decltype(ref3)>, "");
assert(std::get<InitList>(v).size == 1);
+ assert(&ref3 == &std::get<InitList>(v));
}
int main() {
diff --git a/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp b/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
index 6675b5f2b2ba..8025b9e0774e 100644
--- a/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
@@ -10,10 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// The following compilers don't allow constexpr variables of non-literal type.
+// The following compilers don't consider a type an aggregate type (and
+// consequently not a literal type) if it has a base class at all.
+// In C++17, an aggregate type is allowed to have a base class if it's not
+// virtual, private, nor protected (e.g. ConstexprTestTypes:::NoCtors).
// XFAIL: gcc-5, gcc-6
// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
-// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0
// <variant>
diff --git a/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp b/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
index a0c57e132403..660a21c4f31d 100644
--- a/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
@@ -10,10 +10,13 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// The following compilers don't allow constexpr variables of non-literal type.
+// The following compilers don't consider a type an aggregate type (and
+// consequently not a literal type) if it has a base class at all.
+// In C++17, an aggregate type is allowed to have a base class if it's not
+// virtual, private, nor protected (e.g. ConstexprTestTypes:::NoCtors).
// XFAIL: gcc-5, gcc-6
// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
-// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0
// <variant>
diff --git a/test/support/MoveOnly.h b/test/support/MoveOnly.h
index a3e9cca89ee5..0ffb4ffe3b2f 100644
--- a/test/support/MoveOnly.h
+++ b/test/support/MoveOnly.h
@@ -41,8 +41,9 @@ namespace std {
template <>
struct hash<MoveOnly>
- : public std::unary_function<MoveOnly, std::size_t>
{
+ typedef MoveOnly argument_type;
+ typedef size_t result_type;
std::size_t operator()(const MoveOnly& x) const {return x.get();}
};
diff --git a/test/support/constexpr_char_traits.hpp b/test/support/constexpr_char_traits.hpp
index 0a73d3ad1ead..7508567ca199 100644
--- a/test/support/constexpr_char_traits.hpp
+++ b/test/support/constexpr_char_traits.hpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-------_------------ constexpr_char_traits ---------------------------===//
+//===-------------------- constexpr_char_traits ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,6 +12,7 @@
#define _CONSTEXPR_CHAR_TRAITS
#include <string>
+#include <cassert>
#include "test_macros.h"
@@ -118,7 +119,7 @@ template <class _CharT>
TEST_CONSTEXPR_CXX14 _CharT*
constexpr_char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
{
- _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+ assert(__s2 < __s1 || __s2 >= __s1+__n);
char_type* __r = __s1;
for (; __n; --__n, ++__s1, ++__s2)
assign(*__s1, *__s2);
diff --git a/test/support/container_test_types.h b/test/support/container_test_types.h
index c17ce9139484..08e88f091461 100644
--- a/test/support/container_test_types.h
+++ b/test/support/container_test_types.h
@@ -33,7 +33,7 @@
// the construction of types using an allocator. This type is used to communicate
// between the test author, the containers allocator, and the types
// being constructed by the container.
-// The controllers primary functions are:
+// The controller's primary functions are:
// 1. Allow calls to 'a.construct(p, args...)' to be checked by a test.
// The test uses 'cc->expect<Args...>()' to specify that the allocator
// should expect one call to 'a.construct' with the specified argument
@@ -366,7 +366,7 @@ struct CopyInsertable {
CopyInsertable(CopyInsertable&& other) : CopyInsertable(other) {}
- // Forgive pair for not downcasting this to an lvalue it its constructors.
+ // Forgive pair for not downcasting this to an lvalue in its constructors.
CopyInsertable(CopyInsertable const && other) : CopyInsertable(other) {}
diff --git a/test/support/controlled_allocators.hpp b/test/support/controlled_allocators.hpp
index 280aaa564c69..f0d615c35fa9 100644
--- a/test/support/controlled_allocators.hpp
+++ b/test/support/controlled_allocators.hpp
@@ -26,7 +26,7 @@
struct AllocController;
// 'AllocController' is a concrete type that instruments and controls the
- // behavior of of test allocators.
+ // behavior of test allocators.
template <class T, size_t ID = 0>
class CountingAllocator;
diff --git a/test/support/debug_mode_helper.h b/test/support/debug_mode_helper.h
index 0c6170589c2e..350deb08382e 100644
--- a/test/support/debug_mode_helper.h
+++ b/test/support/debug_mode_helper.h
@@ -191,8 +191,9 @@ public:
static void run_allocator_aware_tests() {
try {
SwapNonEqualAllocators();
- if constexpr (CT != CT_ForwardList) {
- SwapInvalidatesIterators(); // FIXME: This should work
+ if constexpr (CT != CT_ForwardList ) {
+ // FIXME: This should work for both forward_list and string
+ SwapInvalidatesIterators();
}
} catch (...) {
assert(false && "uncaught debug exception");
@@ -359,7 +360,10 @@ private:
iterator it2 = C2.begin();
swap(C1, C2);
CHECK_DEBUG_THROWS( C1.erase(it1) );
- C1.erase(it2);
+ if (CT == CT_String) {
+ CHECK_DEBUG_THROWS(C1.erase(it2));
+ } else
+ C1.erase(it2);
//C2.erase(it1);
CHECK_DEBUG_THROWS( C1.erase(it1) );
}
diff --git a/test/std/utilities/memory/unique.ptr/deleter.h b/test/support/deleter_types.h
index 1d8e19d5bc41..ec7016801235 100644
--- a/test/std/utilities/memory/unique.ptr/deleter.h
+++ b/test/support/deleter_types.h
@@ -13,14 +13,15 @@
// Example move-only deleter
-#ifndef DELETER_H
-#define DELETER_H
+#ifndef SUPPORT_DELETER_TYPES_H
+#define SUPPORT_DELETER_TYPES_H
#include <type_traits>
#include <utility>
#include <cassert>
#include "test_macros.h"
+#include "min_allocator.h"
#if TEST_STD_VER >= 11
@@ -192,6 +193,10 @@ public:
CDeleter() : state_(0) {}
explicit CDeleter(int s) : state_(s) {}
+ template <class U>
+ CDeleter(const CDeleter<U>& d)
+ : state_(d.state()) {}
+
~CDeleter() {assert(state_ >= 0); state_ = -1;}
int state() const {return state_;}
@@ -335,4 +340,107 @@ public:
};
-#endif // DELETER_H
+struct test_deleter_base
+{
+ static int count;
+ static int dealloc_count;
+};
+
+int test_deleter_base::count = 0;
+int test_deleter_base::dealloc_count = 0;
+
+template <class T>
+class test_deleter
+ : public test_deleter_base
+{
+ int state_;
+
+public:
+
+ test_deleter() : state_(0) {++count;}
+ explicit test_deleter(int s) : state_(s) {++count;}
+ test_deleter(const test_deleter& d)
+ : state_(d.state_) {++count;}
+ ~test_deleter() {assert(state_ >= 0); --count; state_ = -1;}
+
+ int state() const {return state_;}
+ void set_state(int i) {state_ = i;}
+
+ void operator()(T* p) {assert(state_ >= 0); ++dealloc_count; delete p;}
+#if TEST_STD_VER >= 11
+ test_deleter* operator&() const = delete;
+#else
+private:
+ test_deleter* operator&() const;
+#endif
+};
+
+template <class T>
+void
+swap(test_deleter<T>& x, test_deleter<T>& y)
+{
+ test_deleter<T> t(std::move(x));
+ x = std::move(y);
+ y = std::move(t);
+}
+
+#if TEST_STD_VER >= 11
+
+template <class T, size_t ID = 0>
+class PointerDeleter
+{
+ PointerDeleter(const PointerDeleter&);
+ PointerDeleter& operator=(const PointerDeleter&);
+
+public:
+ typedef min_pointer<T, std::integral_constant<size_t, ID>> pointer;
+
+ PointerDeleter() = default;
+ PointerDeleter(PointerDeleter&&) = default;
+ PointerDeleter& operator=(PointerDeleter&&) = default;
+ explicit PointerDeleter(int) {}
+
+ template <class U>
+ PointerDeleter(PointerDeleter<U, ID>&&,
+ typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
+ {}
+
+ void operator()(pointer p) { if (p) { delete std::addressof(*p); }}
+
+private:
+ template <class U>
+ PointerDeleter(const PointerDeleter<U, ID>&,
+ typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
+};
+
+
+template <class T, size_t ID>
+class PointerDeleter<T[], ID>
+{
+ PointerDeleter(const PointerDeleter&);
+ PointerDeleter& operator=(const PointerDeleter&);
+
+public:
+ typedef min_pointer<T, std::integral_constant<size_t, ID> > pointer;
+
+ PointerDeleter() = default;
+ PointerDeleter(PointerDeleter&&) = default;
+ PointerDeleter& operator=(PointerDeleter&&) = default;
+ explicit PointerDeleter(int) {}
+
+ template <class U>
+ PointerDeleter(PointerDeleter<U, ID>&&,
+ typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
+ {}
+
+ void operator()(pointer p) { if (p) { delete [] std::addressof(*p); }}
+
+private:
+ template <class U>
+ PointerDeleter(const PointerDeleter<U, ID>&,
+ typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
+};
+
+#endif // TEST_STD_VER >= 11
+
+#endif // SUPPORT_DELETER_TYPES_H
diff --git a/test/support/demangle.h b/test/support/demangle.h
index 2a9757d80454..98d93c85ad7b 100644
--- a/test/support/demangle.h
+++ b/test/support/demangle.h
@@ -16,7 +16,7 @@
#if !defined(TEST_HAS_NO_DEMANGLE)
# if defined(__GNUC__) || defined(__clang__)
-# if __has_include("cxxabi.h")
+# if __has_include("cxxabi.h") && !defined(_LIBCPP_ABI_MICROSOFT)
# include "cxxabi.h"
# else
# define TEST_HAS_NO_DEMANGLE
@@ -34,9 +34,7 @@ inline std::string demangle(const char* mangled_name) {
template <size_t N> struct Printer;
inline std::string demangle(const char* mangled_name) {
int status = 0;
- std::string input(mangled_name);
- input.insert(0, "_Z");
- char* out = __cxxabiv1::__cxa_demangle(input.c_str(), nullptr, nullptr, &status);
+ char* out = __cxxabiv1::__cxa_demangle(mangled_name, nullptr, nullptr, &status);
if (out != nullptr) {
std::string res(out);
std::free(out);
diff --git a/test/support/filesystem_dynamic_test_helper.py b/test/support/filesystem_dynamic_test_helper.py
index 1f48c9527982..d2b2810d0992 100644
--- a/test/support/filesystem_dynamic_test_helper.py
+++ b/test/support/filesystem_dynamic_test_helper.py
@@ -75,7 +75,7 @@ def create_fifo(source):
def create_socket(source):
- mode = 0600|stat.S_IFSOCK
+ mode = 0o600 | stat.S_IFSOCK
os.mknod(sanitize(source), mode)
diff --git a/test/support/filesystem_test_helper.hpp b/test/support/filesystem_test_helper.hpp
index c2e41fca09c8..6cc0e370a786 100644
--- a/test/support/filesystem_test_helper.hpp
+++ b/test/support/filesystem_test_helper.hpp
@@ -381,7 +381,7 @@ bool checkCollectionsEqualBackwards(
}
// We often need to test that the error_code was cleared if no error occurs
-// this function returns a error_code which is set to an error that will
+// this function returns an error_code which is set to an error that will
// never be returned by the filesystem functions.
inline std::error_code GetTestEC() {
return std::make_error_code(std::errc::address_family_not_supported);
diff --git a/test/support/min_allocator.h b/test/support/min_allocator.h
index d518e4a6d77c..a3af9e1db66d 100644
--- a/test/support/min_allocator.h
+++ b/test/support/min_allocator.h
@@ -136,31 +136,31 @@ public:
#include <memory>
-template <class T> class min_pointer;
-template <class T> class min_pointer<const T>;
-template <> class min_pointer<void>;
-template <> class min_pointer<const void>;
+template <class T, class = std::integral_constant<size_t, 0> > class min_pointer;
+template <class T, class ID> class min_pointer<const T, ID>;
+template <class ID> class min_pointer<void, ID>;
+template <class ID> class min_pointer<const void, ID>;
template <class T> class min_allocator;
-template <>
-class min_pointer<const void>
+template <class ID>
+class min_pointer<const void, ID>
{
const void* ptr_;
public:
min_pointer() TEST_NOEXCEPT = default;
min_pointer(std::nullptr_t) TEST_NOEXCEPT : ptr_(nullptr) {}
template <class T>
- min_pointer(min_pointer<T> p) TEST_NOEXCEPT : ptr_(p.ptr_) {}
+ min_pointer(min_pointer<T, ID> p) TEST_NOEXCEPT : ptr_(p.ptr_) {}
explicit operator bool() const {return ptr_ != nullptr;}
friend bool operator==(min_pointer x, min_pointer y) {return x.ptr_ == y.ptr_;}
friend bool operator!=(min_pointer x, min_pointer y) {return !(x == y);}
- template <class U> friend class min_pointer;
+ template <class U, class XID> friend class min_pointer;
};
-template <>
-class min_pointer<void>
+template <class ID>
+class min_pointer<void, ID>
{
void* ptr_;
public:
@@ -172,16 +172,16 @@ public:
!std::is_const<T>::value
>::type
>
- min_pointer(min_pointer<T> p) TEST_NOEXCEPT : ptr_(p.ptr_) {}
+ min_pointer(min_pointer<T, ID> p) TEST_NOEXCEPT : ptr_(p.ptr_) {}
explicit operator bool() const {return ptr_ != nullptr;}
friend bool operator==(min_pointer x, min_pointer y) {return x.ptr_ == y.ptr_;}
friend bool operator!=(min_pointer x, min_pointer y) {return !(x == y);}
- template <class U> friend class min_pointer;
+ template <class U, class XID> friend class min_pointer;
};
-template <class T>
+template <class T, class ID>
class min_pointer
{
T* ptr_;
@@ -190,7 +190,7 @@ class min_pointer
public:
min_pointer() TEST_NOEXCEPT = default;
min_pointer(std::nullptr_t) TEST_NOEXCEPT : ptr_(nullptr) {}
- explicit min_pointer(min_pointer<void> p) TEST_NOEXCEPT : ptr_(static_cast<T*>(p.ptr_)) {}
+ explicit min_pointer(min_pointer<void, ID> p) TEST_NOEXCEPT : ptr_(static_cast<T*>(p.ptr_)) {}
explicit operator bool() const {return ptr_ != nullptr;}
@@ -247,12 +247,12 @@ public:
friend bool operator==(min_pointer x, min_pointer y) {return x.ptr_ == y.ptr_;}
friend bool operator!=(min_pointer x, min_pointer y) {return !(x == y);}
- template <class U> friend class min_pointer;
+ template <class U, class XID> friend class min_pointer;
template <class U> friend class min_allocator;
};
-template <class T>
-class min_pointer<const T>
+template <class T, class ID>
+class min_pointer<const T, ID>
{
const T* ptr_;
@@ -260,8 +260,8 @@ class min_pointer<const T>
public:
min_pointer() TEST_NOEXCEPT = default;
min_pointer(std::nullptr_t) : ptr_(nullptr) {}
- min_pointer(min_pointer<T> p) : ptr_(p.ptr_) {}
- explicit min_pointer(min_pointer<const void> p) : ptr_(static_cast<const T*>(p.ptr_)) {}
+ min_pointer(min_pointer<T, ID> p) : ptr_(p.ptr_) {}
+ explicit min_pointer(min_pointer<const void, ID> p) : ptr_(static_cast<const T*>(p.ptr_)) {}
explicit operator bool() const {return ptr_ != nullptr;}
@@ -318,37 +318,37 @@ public:
friend bool operator==(min_pointer x, min_pointer y) {return x.ptr_ == y.ptr_;}
friend bool operator!=(min_pointer x, min_pointer y) {return !(x == y);}
- template <class U> friend class min_pointer;
+ template <class U, class XID> friend class min_pointer;
};
-template <class T>
+template <class T, class ID>
inline
bool
-operator==(min_pointer<T> x, std::nullptr_t)
+operator==(min_pointer<T, ID> x, std::nullptr_t)
{
return !static_cast<bool>(x);
}
-template <class T>
+template <class T, class ID>
inline
bool
-operator==(std::nullptr_t, min_pointer<T> x)
+operator==(std::nullptr_t, min_pointer<T, ID> x)
{
return !static_cast<bool>(x);
}
-template <class T>
+template <class T, class ID>
inline
bool
-operator!=(min_pointer<T> x, std::nullptr_t)
+operator!=(min_pointer<T, ID> x, std::nullptr_t)
{
return static_cast<bool>(x);
}
-template <class T>
+template <class T, class ID>
inline
bool
-operator!=(std::nullptr_t, min_pointer<T> x)
+operator!=(std::nullptr_t, min_pointer<T, ID> x)
{
return static_cast<bool>(x);
}
diff --git a/test/support/msvc_stdlib_force_include.hpp b/test/support/msvc_stdlib_force_include.hpp
new file mode 100644
index 000000000000..660645646d33
--- /dev/null
+++ b/test/support/msvc_stdlib_force_include.hpp
@@ -0,0 +1,78 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
+#define SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
+
+// This header is force-included when running the libc++ tests against the
+// MSVC standard library.
+
+// Silence warnings about CRT machinery.
+#define _CRT_SECURE_NO_WARNINGS
+
+// Avoid assertion dialogs.
+#define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
+
+#include <crtdbg.h>
+#include <stdlib.h>
+
+#if defined(_LIBCPP_VERSION)
+ #error This header may not be used when targeting libc++
+#endif
+
+struct AssertionDialogAvoider {
+ AssertionDialogAvoider() {
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+ }
+};
+
+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
+ #define _MSVC_HAS_FEATURE_cxx_rtti 1
+ #define _MSVC_HAS_FEATURE_address_sanitizer 0
+ #define _MSVC_HAS_FEATURE_memory_sanitizer 0
+ #define _MSVC_HAS_FEATURE_thread_sanitizer 0
+
+ // Silence compiler warnings.
+ #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__)
+
+// MSVC doesn't have __int128_t.
+#define _LIBCPP_HAS_NO_INT128
+
+// MSVC has quick_exit() and at_quick_exit().
+#define _LIBCPP_HAS_QUICK_EXIT
+
+// atomic_is_lock_free.pass.cpp needs this VS 2015 Update 2 fix.
+#define _ENABLE_ATOMIC_ALIGNMENT_FIX
+
+// Enable features that /std:c++latest removes by default.
+#define _HAS_AUTO_PTR_ETC 1
+#define _HAS_FUNCTION_ASSIGN 1
+#define _HAS_OLD_IOSTREAMS_MEMBERS 1
+
+// Silence warnings about raw pointers and other unchecked iterators.
+#define _SCL_SECURE_NO_WARNINGS
+
+#endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
diff --git a/test/support/platform_support.h b/test/support/platform_support.h
index f4c2247e0dfb..737e5d7a01ce 100644
--- a/test/support/platform_support.h
+++ b/test/support/platform_support.h
@@ -59,7 +59,7 @@
#endif
#if defined(_NEWLIB_VERSION) && defined(__STRICT_ANSI__)
-// Newlib provies this, but in the header it's under __STRICT_ANSI__
+// Newlib provides this, but in the header it's under __STRICT_ANSI__
extern "C" {
int mkstemp(char*);
}
diff --git a/test/support/poisoned_hash_helper.hpp b/test/support/poisoned_hash_helper.hpp
new file mode 100644
index 000000000000..824c35837b2b
--- /dev/null
+++ b/test/support/poisoned_hash_helper.hpp
@@ -0,0 +1,247 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+#ifndef SUPPORT_POISONED_HASH_HELPER_HPP
+#define SUPPORT_POISONED_HASH_HELPER_HPP
+
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+#include "test_workarounds.h"
+
+#if TEST_STD_VER < 11
+#error this header may only be used in C++11 or newer
+#endif
+
+template <class ...Args> struct TypeList;
+
+// Test that the specified Hash meets the requirements of an enabled hash
+template <class Hash, class Key, class InputKey = Key>
+void test_hash_enabled(InputKey const& key = InputKey{});
+
+template <class T, class InputKey = T>
+void test_hash_enabled_for_type(InputKey const& key = InputKey{}) {
+ return test_hash_enabled<std::hash<T>, T, InputKey>(key);
+}
+
+// Test that the specified Hash meets the requirements of a disabled hash.
+template <class Hash, class Key>
+void test_hash_disabled();
+
+template <class T>
+void test_hash_disabled_for_type() {
+ return test_hash_disabled<std::hash<T>, T>();
+}
+
+namespace PoisonedHashDetail {
+ enum Enum {};
+ enum EnumClass : bool {};
+ struct Class {};
+}
+
+// Each header that declares the template hash provides enabled
+// specializations of hash for nullptr t and all cv-unqualified
+// arithmetic, enumeration, and pointer types.
+using LibraryHashTypes = TypeList<
+#if !defined(TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR)
+#if TEST_STD_VER > 14
+ decltype(nullptr),
+#endif
+#endif
+ bool,
+ char,
+ signed char,
+ unsigned char,
+ wchar_t,
+#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+ char16_t,
+ char32_t,
+#endif
+ short,
+ unsigned short,
+ int,
+ unsigned int,
+ long,
+ unsigned long,
+ long long,
+ unsigned long long,
+#ifndef _LIBCPP_HAS_NO_INT128
+ __int128_t,
+ __uint128_t,
+#endif
+ float,
+ double,
+ long double,
+#if TEST_STD_VER >= 14
+ // Enum types
+ PoisonedHashDetail::Enum,
+ PoisonedHashDetail::EnumClass,
+#endif
+ // pointer types
+ void*,
+ void const*,
+ PoisonedHashDetail::Class*
+ >;
+
+
+// Test that each of the library hash specializations for arithmetic types,
+// enum types, and pointer types are available and enabled.
+template <class Types = LibraryHashTypes>
+void test_library_hash_specializations_available(Types = Types{});
+
+
+namespace PoisonedHashDetail {
+
+template <class T, class = typename T::foo_bar_baz>
+constexpr bool instantiate(int) { return true; }
+template <class> constexpr bool instantiate(long) { return true; }
+template <class T> constexpr bool instantiate() { return instantiate<T>(0); }
+
+template <class To>
+struct ConvertibleToSimple {
+ operator To() const {
+ return To{};
+ }
+};
+
+template <class To>
+struct ConvertibleTo {
+ To to{};
+ operator To&() & { return to; }
+ operator To const&() const & { return to; }
+ operator To&&() && { return std::move(to); }
+ operator To const&&() const && { return std::move(to); }
+};
+
+template <class HashExpr,
+ class Res = typename std::result_of<HashExpr>::type>
+constexpr bool can_hash(int) {
+ return std::is_same<Res, size_t>::value;
+}
+template <class> constexpr bool can_hash(long) { return false; }
+template <class T> constexpr bool can_hash() { return can_hash<T>(0); }
+
+} // namespace PoisonedHashDetail
+
+template <class Hash, class Key, class InputKey>
+void test_hash_enabled(InputKey const& key) {
+ using namespace PoisonedHashDetail;
+
+ static_assert(std::is_destructible<Hash>::value, "");
+ // Enabled hash requirements
+ static_assert(std::is_default_constructible<Hash>::value, "");
+ static_assert(std::is_copy_constructible<Hash>::value, "");
+ static_assert(std::is_move_constructible<Hash>::value, "");
+ static_assert(std::is_copy_assignable<Hash>::value, "");
+ static_assert(std::is_move_assignable<Hash>::value, "");
+
+#if TEST_STD_VER > 14
+ static_assert(std::is_swappable<Hash>::value, "");
+#elif defined(_LIBCPP_VERSION)
+ static_assert(std::__is_swappable<Hash>::value, "");
+#endif
+
+ // Hashable requirements
+ using CKey = ConvertibleTo<Key>;
+ static_assert(can_hash<Hash(Key&)>(), "");
+ static_assert(can_hash<Hash(Key const&)>(), "");
+ static_assert(can_hash<Hash(Key&&)>(), "");
+ static_assert(can_hash<Hash const&(Key&)>(), "");
+ static_assert(can_hash<Hash const&(Key const&)>(), "");
+ static_assert(can_hash<Hash const&(Key&&)>(), "");
+
+ static_assert(can_hash<Hash(ConvertibleToSimple<Key>&)>(), "");
+ static_assert(can_hash<Hash(ConvertibleToSimple<Key> const&)>(), "");
+ static_assert(can_hash<Hash(ConvertibleToSimple<Key>&&)>(), "");
+
+ static_assert(can_hash<Hash(ConvertibleTo<Key>&)>(), "");
+ static_assert(can_hash<Hash(ConvertibleTo<Key> const&)>(), "");
+ static_assert(can_hash<Hash(ConvertibleTo<Key> &&)>(), "");
+ static_assert(can_hash<Hash(ConvertibleTo<Key> const&&)>(), "");
+
+ const Hash h{};
+ assert(h(key) == h(key));
+
+}
+
+template <class Hash, class Key>
+void test_hash_disabled() {
+ using namespace PoisonedHashDetail;
+
+ // Disabled hash requirements
+ static_assert(!std::is_default_constructible<Hash>::value, "");
+ static_assert(!std::is_copy_constructible<Hash>::value, "");
+ static_assert(!std::is_move_constructible<Hash>::value, "");
+ static_assert(!std::is_copy_assignable<Hash>::value, "");
+ static_assert(!std::is_move_assignable<Hash>::value, "");
+
+ static_assert(!std::is_function<
+ typename std::remove_pointer<
+ typename std::remove_reference<Hash>::type
+ >::type
+ >::value, "");
+
+ // Hashable requirements
+ using CKey = ConvertibleTo<Key>;
+ static_assert(!can_hash<Hash(Key&)>(), "");
+ static_assert(!can_hash<Hash(Key const&)>(), "");
+ static_assert(!can_hash<Hash(Key&&)>(), "");
+ static_assert(!can_hash<Hash const&(Key&)>(), "");
+ static_assert(!can_hash<Hash const&(Key const&)>(), "");
+ static_assert(!can_hash<Hash const&(Key&&)>(), "");
+
+ static_assert(!can_hash<Hash(ConvertibleToSimple<Key>&)>(), "");
+ static_assert(!can_hash<Hash(ConvertibleToSimple<Key> const&)>(), "");
+ static_assert(!can_hash<Hash(ConvertibleToSimple<Key>&&)>(), "");
+
+ static_assert(!can_hash<Hash(ConvertibleTo<Key>&)>(), "");
+ static_assert(!can_hash<Hash(ConvertibleTo<Key> const&)>(), "");
+ static_assert(!can_hash<Hash(ConvertibleTo<Key> &&)>(), "");
+ static_assert(!can_hash<Hash(ConvertibleTo<Key> const&&)>(), "");
+}
+
+
+template <class First, class ...Rest>
+struct TypeList<First, Rest...> {
+ template <template <class> class Trait, bool Expect = true>
+ static constexpr bool assertTrait() {
+ static_assert(Trait<First>::value == Expect, "");
+ return TypeList<Rest...>::template assertTrait<Trait, Expect>();
+ }
+
+ template <class Trait>
+ static void applyTrait() {
+ Trait::template apply<First>();
+ TypeList<Rest...>::template applyTrait<Trait>();
+ }
+};
+
+template <>
+struct TypeList<> {
+ template <template <class> class Trait, bool Expect = true>
+ static constexpr bool assertTrait() {
+ return true;
+ }
+ template <class Trait>
+ static void applyTrait() {}
+};
+
+
+struct TestLibraryTrait {
+ template <class Type>
+ static void apply() { test_hash_enabled<std::hash<Type>, Type>(); }
+};
+
+template <class Types>
+void test_library_hash_specializations_available(Types) {
+ Types::template applyTrait<TestLibraryTrait >();
+}
+
+#endif // SUPPORT_POISONED_HASH_HELPER_HPP
diff --git a/test/support/set_windows_crt_report_mode.h b/test/support/set_windows_crt_report_mode.h
new file mode 100644
index 000000000000..5fc1698b4073
--- /dev/null
+++ b/test/support/set_windows_crt_report_mode.h
@@ -0,0 +1,36 @@
+// -*- 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.
+//
+//===----------------------------------------------------------------------===//
+#ifndef SUPPORT_SET_WINDOWS_CRT_REPORT_MODE_H
+#define SUPPORT_SET_WINDOWS_CRT_REPORT_MODE_H
+
+#ifndef _DEBUG
+#error _DEBUG must be defined when using this header
+#endif
+
+#ifndef _WIN32
+#error This header can only be used when targeting Windows
+#endif
+
+#include <crtdbg.h>
+
+// On Windows in debug builds the default assertion handler opens a new dialog
+// window which must be dismissed manually by the user. This function overrides
+// that setting and instead changes the assertion handler to log to stderr
+// instead.
+inline int init_crt_report_mode() {
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+ return 0;
+}
+
+static int init_crt_anchor = init_crt_report_mode();
+
+#endif // SUPPORT_SET_WINDOWS_CRT_REPORT_MODE_H
diff --git a/test/support/test.support/test_demangle.pass.cpp b/test/support/test.support/test_demangle.pass.cpp
index c924246e8c0b..08808c1942cc 100644
--- a/test/support/test.support/test_demangle.pass.cpp
+++ b/test/support/test.support/test_demangle.pass.cpp
@@ -20,7 +20,7 @@ int main() {
const char* raw;
const char* expect;
} TestCases[] = {
- {typeid(int).name(), "i"}, // FIXME
+ {typeid(int).name(), "int"},
{typeid(MyType).name(), "MyType"},
{typeid(ArgumentListID<int, MyType>).name(), "ArgumentListID<int, MyType>"}
};
diff --git a/test/support/test.support/test_poisoned_hash_helper.pass.cpp b/test/support/test.support/test_poisoned_hash_helper.pass.cpp
new file mode 100644
index 000000000000..4dffae6dbdfe
--- /dev/null
+++ b/test/support/test.support/test_poisoned_hash_helper.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// Test that the header `poisoned_hash_helper.hpp` doesn't include any
+// headers that provide hash<T> specializations. This is required so that the
+// 'test_library_hash_specializations_available()' function returns false
+// by default, unless a STL header providing hash has already been included.
+
+#include "poisoned_hash_helper.hpp"
+
+template <class T, size_t = sizeof(T)>
+constexpr bool is_complete_imp(int) { return true; }
+template <class> constexpr bool is_complete_imp(long) { return false; }
+template <class T> constexpr bool is_complete() { return is_complete_imp<T>(0); }
+
+template <class T> struct has_complete_hash {
+ enum { value = is_complete<std::hash<T> >() };
+};
+
+int main() {
+ static_assert(LibraryHashTypes::assertTrait<has_complete_hash, false>(), "");
+}
diff --git a/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp b/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp
new file mode 100644
index 000000000000..250d06d2b902
--- /dev/null
+++ b/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// Verify TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR.
+
+#include <type_traits>
+
+#include "test_workarounds.h"
+
+struct ConvertsToNullptr {
+ using DestType = decltype(nullptr);
+ operator DestType() const { return nullptr; }
+};
+
+int main() {
+#if defined(TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR)
+ static_assert(!std::is_convertible<ConvertsToNullptr, decltype(nullptr)>::value, "");
+#else
+ static_assert(std::is_convertible<ConvertsToNullptr, decltype(nullptr)>::value, "");
+#endif
+}
diff --git a/test/support/test_macros.h b/test/support/test_macros.h
index 40d366ab19dd..cee1419407b9 100644
--- a/test/support/test_macros.h
+++ b/test/support/test_macros.h
@@ -13,6 +13,11 @@
#include <ciso646> // Get STL specific macros like _LIBCPP_VERSION
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvariadic-macros"
+#endif
+
#define TEST_CONCAT1(X, Y) X##Y
#define TEST_CONCAT(X, Y) TEST_CONCAT1(X, Y)
@@ -47,6 +52,17 @@
#define TEST_HAS_BUILTIN_IDENTIFIER(X) 0
#endif
+#if defined(__clang__)
+#define TEST_COMPILER_CLANG
+# if defined(__apple_build_version__)
+# define TEST_COMPILER_APPLE_CLANG
+# endif
+#elif defined(_MSC_VER)
+# define TEST_COMPILER_C1XX
+#elif defined(__GNUC__)
+# define TEST_COMPILER_GCC
+#endif
+
#if defined(__apple_build_version__)
#define TEST_APPLE_CLANG_VER (__clang_major__ * 100) + __clang_minor__
#elif defined(__clang_major__)
@@ -90,6 +106,7 @@
#define TEST_ALIGNAS(...) alignas(__VA_ARGS__)
#define TEST_CONSTEXPR constexpr
#define TEST_NOEXCEPT noexcept
+#define TEST_NOEXCEPT_FALSE noexcept(false)
#define TEST_NOEXCEPT_COND(...) noexcept(__VA_ARGS__)
# if TEST_STD_VER >= 14
# define TEST_CONSTEXPR_CXX14 constexpr
@@ -107,6 +124,7 @@
#define TEST_CONSTEXPR
#define TEST_CONSTEXPR_CXX14
#define TEST_NOEXCEPT throw()
+#define TEST_NOEXCEPT_FALSE
#define TEST_NOEXCEPT_COND(...)
#define TEST_THROW_SPEC(...) throw(__VA_ARGS__)
#endif
@@ -134,11 +152,16 @@
#define TEST_NORETURN [[noreturn]]
#endif
+#if TEST_STD_VER < 11
+#define ASSERT_NOEXCEPT(...)
+#define ASSERT_NOT_NOEXCEPT(...)
+#else
#define ASSERT_NOEXCEPT(...) \
static_assert(noexcept(__VA_ARGS__), "Operation must be noexcept")
#define ASSERT_NOT_NOEXCEPT(...) \
static_assert(!noexcept(__VA_ARGS__), "Operation must NOT be noexcept")
+#endif
/* Macros for testing libc++ specific behavior and extensions */
#if defined(_LIBCPP_VERSION)
@@ -163,7 +186,7 @@ struct is_same<T, T> { enum {value = 1}; };
} // namespace test_macros_detail
#define ASSERT_SAME_TYPE(...) \
- static_assert(test_macros_detail::is_same<__VA_ARGS__>::value, \
+ static_assert((test_macros_detail::is_same<__VA_ARGS__>::value), \
"Types differ uexpectedly")
#ifndef TEST_HAS_NO_EXCEPTIONS
@@ -177,4 +200,22 @@ struct is_same<T, T> { enum {value = 1}; };
#endif
#endif
+#if defined(__GNUC__) || defined(__clang__)
+template <class Tp>
+inline void DoNotOptimize(Tp const& value) {
+ asm volatile("" : : "g"(value) : "memory");
+}
+#else
+#include <intrin.h>
+template <class Tp>
+inline void DoNotOptimize(Tp const& value) {
+ const volatile void* volatile = __builtin_addressof(value);
+ _ReadWriteBarrier();
+}
+#endif
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+
#endif // SUPPORT_TEST_MACROS_HPP
diff --git a/test/support/test_memory_resource.hpp b/test/support/test_memory_resource.hpp
index 49dc1739a962..b3472c8b6105 100644
--- a/test/support/test_memory_resource.hpp
+++ b/test/support/test_memory_resource.hpp
@@ -25,7 +25,7 @@
// FIXME: This is a hack to allow uses_allocator_types.hpp to work with
// erased_type. However we can't define that behavior directly in the header
-// because it con't include <experimental/memory_resource>
+// because it can't include <experimental/memory_resource>
template <>
struct TransformErasedTypeAlloc<std::experimental::erased_type> {
using type = std::experimental::pmr::memory_resource*;
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default03.fail.cpp b/test/support/test_workarounds.h
index 74d24fd488b6..affdd1025943 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default03.fail.cpp
+++ b/test/support/test_workarounds.h
@@ -1,3 +1,4 @@
+// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
@@ -7,17 +8,13 @@
//
//===----------------------------------------------------------------------===//
-// <memory>
+#ifndef SUPPORT_TEST_WORKAROUNDS_H
+#define SUPPORT_TEST_WORKAROUNDS_H
-// unique_ptr
+#include "test_macros.h"
-// Test unique_ptr default ctor
+#if defined(TEST_COMPILER_C1XX)
+# define TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR
+#endif
-// default unique_ptr ctor should require non-pointer Deleter
-
-#include <memory>
-
-int main()
-{
- std::unique_ptr<int[], void (*)(void*)> p;
-}
+#endif // SUPPORT_TEST_WORKAROUNDS_H
diff --git a/test/support/unique_ptr_test_helper.h b/test/support/unique_ptr_test_helper.h
new file mode 100644
index 000000000000..6fb9eaa24679
--- /dev/null
+++ b/test/support/unique_ptr_test_helper.h
@@ -0,0 +1,158 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TEST_SUPPORT_UNIQUE_PTR_TEST_HELPER_H
+#define TEST_SUPPORT_UNIQUE_PTR_TEST_HELPER_H
+
+#include <memory>
+#include <type_traits>
+
+#include "test_macros.h"
+#include "deleter_types.h"
+
+struct A {
+ static int count;
+ A() { ++count; }
+ A(const A&) { ++count; }
+ virtual ~A() { --count; }
+};
+
+int A::count = 0;
+
+struct B : public A {
+ static int count;
+ B() { ++count; }
+ B(const B&) { ++count; }
+ virtual ~B() { --count; }
+};
+
+int B::count = 0;
+
+template <class T>
+typename std::enable_if<!std::is_array<T>::value, T*>::type
+newValue(int num_elements) {
+ assert(num_elements == 1);
+ return new T;
+}
+
+template <class T>
+typename std::enable_if<std::is_array<T>::value,
+ typename std::remove_all_extents<T>::type*>::type
+newValue(int num_elements) {
+ typedef typename std::remove_all_extents<T>::type VT;
+ assert(num_elements >= 1);
+ return new VT[num_elements];
+}
+
+struct IncompleteType;
+
+void checkNumIncompleteTypeAlive(int i);
+int getNumIncompleteTypeAlive();
+IncompleteType* getNewIncomplete();
+IncompleteType* getNewIncompleteArray(int size);
+
+#if TEST_STD_VER >= 11
+template <class ThisT, class ...Args>
+struct args_is_this_type : std::false_type {};
+
+template <class ThisT, class A1>
+struct args_is_this_type<ThisT, A1> : std::is_same<ThisT, typename std::decay<A1>::type> {};
+#endif
+
+template <class IncompleteT = IncompleteType,
+ class Del = std::default_delete<IncompleteT> >
+struct StoresIncomplete {
+ static_assert((std::is_same<IncompleteT, IncompleteType>::value ||
+ std::is_same<IncompleteT, IncompleteType[]>::value), "");
+
+ std::unique_ptr<IncompleteT, Del> m_ptr;
+
+#if TEST_STD_VER >= 11
+ StoresIncomplete(StoresIncomplete const&) = delete;
+ StoresIncomplete(StoresIncomplete&&) = default;
+
+ template <class ...Args>
+ StoresIncomplete(Args&&... args) : m_ptr(std::forward<Args>(args)...) {
+ static_assert(!args_is_this_type<StoresIncomplete, Args...>::value, "");
+ }
+#else
+private:
+ StoresIncomplete();
+ StoresIncomplete(StoresIncomplete const&);
+public:
+#endif
+
+ ~StoresIncomplete();
+
+ IncompleteType* get() const { return m_ptr.get(); }
+ Del& get_deleter() { return m_ptr.get_deleter(); }
+};
+
+#if TEST_STD_VER >= 11
+template <class IncompleteT = IncompleteType,
+ class Del = std::default_delete<IncompleteT>, class... Args>
+void doIncompleteTypeTest(int expect_alive, Args&&... ctor_args) {
+ using ValueT = typename std::remove_all_extents<IncompleteT>::type;
+ checkNumIncompleteTypeAlive(expect_alive);
+ {
+ StoresIncomplete<IncompleteT, Del> sptr(std::forward<Args>(ctor_args)...);
+ checkNumIncompleteTypeAlive(expect_alive);
+ if (expect_alive == 0)
+ assert(sptr.get() == nullptr);
+ else
+ assert(sptr.get() != nullptr);
+ }
+ checkNumIncompleteTypeAlive(0);
+}
+#endif
+
+#define INCOMPLETE_TEST_EPILOGUE() \
+ int is_incomplete_test_anchor = is_incomplete_test(); \
+ \
+ struct IncompleteType { \
+ static int count; \
+ IncompleteType() { ++count; } \
+ ~IncompleteType() { --count; } \
+ }; \
+ \
+ int IncompleteType::count = 0; \
+ \
+ void checkNumIncompleteTypeAlive(int i) { \
+ assert(IncompleteType::count == i); \
+ } \
+ int getNumIncompleteTypeAlive() { return IncompleteType::count; } \
+ IncompleteType* getNewIncomplete() { return new IncompleteType; } \
+ IncompleteType* getNewIncompleteArray(int size) { \
+ return new IncompleteType[size]; \
+ } \
+ \
+ template <class IncompleteT, class Del> \
+ StoresIncomplete<IncompleteT, Del>::~StoresIncomplete() {}
+#
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvariadic-macros"
+#endif
+
+#if TEST_STD_VER >= 11
+#define DEFINE_AND_RUN_IS_INCOMPLETE_TEST(...) \
+ static int is_incomplete_test() { __VA_ARGS__ return 0; } \
+ INCOMPLETE_TEST_EPILOGUE()
+#else
+#define DEFINE_AND_RUN_IS_INCOMPLETE_TEST(...) \
+ static int is_incomplete_test() { return 0; } \
+ INCOMPLETE_TEST_EPILOGUE()
+#endif
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+
+#endif // TEST_SUPPORT_UNIQUE_PTR_TEST_HELPER_H
diff --git a/test/testit b/test/testit
deleted file mode 100755
index cac668497fa5..000000000000
--- a/test/testit
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/sh
-# //===--------------------------- testit ---------------------------------===//
-# //
-# // The LLVM Compiler Infrastructure
-# //
-# // This file is distributed under the University of Illinois Open Source
-# // License. See LICENSE.TXT for details.
-# //
-# //===--------------------------------------------------------------------===//
-
-currentpath=`pwd`
-origpath=$currentpath
-currentdir=`basename $currentpath`
-while [ $currentdir != "test" ]; do
- if [ $currentdir = "/" ]
- then
- echo "current directory must be in or under \"test\"."
- exit 1
- fi
- cd ..
- currentpath=`pwd`
- currentdir=`basename $currentpath`
-done
-
-cd ..
-LIBCXX_ROOT=`pwd`
-cd $origpath
-
-if [ -z "$CC" ]
-then
- if which xcrun >/dev/null
- then
- CC="xcrun clang++"
- else
- CC=clang++
- fi
-fi
-
-if [ -z "$CXX_LANG" ]
-then
- CXX_LANG=c++11
-fi
-if [ -z "$OPTIONS" ]
-then
- OPTIONS="-std=${CXX_LANG} -stdlib=libc++ -nostdinc++"
-fi
-OPTIONS="$OPTIONS -I$LIBCXX_ROOT/test/support"
-
-if [ -z "$HEADER_INCLUDE" ]
-then
- HEADER_INCLUDE="-I$LIBCXX_ROOT/include"
-fi
-
-if [ -z "$SOURCE_LIB" ]
-then
- SOURCE_LIB="-L$LIBCXX_ROOT/lib"
-fi
-
-case $TRIPLE in
- *-*-mingw* | *-*-cygwin* | *-*-win*)
- TEST_EXE=test.exe
- ;;
- *)
- TEST_EXE=a.out
- ;;
-esac
-
-case $(uname -s) in
- NetBSD)
- THREAD_FLAGS=-lpthread
- ;;
-esac
-
-FAIL=0
-PASS=0
-UNIMPLEMENTED=0
-IMPLEMENTED_FAIL=0
-IMPLEMENTED_PASS=0
-
-afunc() {
- fail=0
- pass=0
- if (ls ${TEST_PREFIX}*fail.cpp > /dev/null 2>&1)
- then
- for FILE in $(ls ${TEST_PREFIX}*fail.cpp); do
- if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE > /dev/null 2>&1
- then
- rm ./$TEST_EXE
- echo "$FILE should not compile"
- fail=$(($fail+1))
- else
- pass=$(($pass+1))
- fi
- done
- fi
-
- if (ls ${TEST_PREFIX}*pass.cpp > /dev/null 2>&1)
- then
- for FILE in $(ls ${TEST_PREFIX}*pass.cpp); do
- if [ "$VERBOSE" ]
- then
- echo "Running test: " $FILE
- fi
- if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS $(test $1 = no || echo $THREAD_FLAGS) -o ./$TEST_EXE
- then
- if ./$TEST_EXE
- then
- rm ./$TEST_EXE
- pass=$(($pass+1))
- else
- echo "`pwd`/$FILE failed at run time"
- echo "Compile line was:" $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS $(test $1 = no || echo $THREAD_FLAGS)
- fail=$(($fail+1))
- rm ./$TEST_EXE
- fi
- else
- echo "`pwd`/$FILE failed to compile"
- echo "Compile line was:" $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS $(test $1 = no || echo $THREAD_FLAGS)
- fail=$(($fail+1))
- fi
- done
- fi
-
- if [ $fail -gt 0 ]
- then
- echo "failed $fail tests in `pwd`"
- IMPLEMENTED_FAIL=$(($IMPLEMENTED_FAIL+1))
- fi
- if [ $pass -gt 0 ]
- then
- echo "passed $pass tests in `pwd`"
- if [ $fail -eq 0 ]
- then
- IMPLEMENTED_PASS=$((IMPLEMENTED_PASS+1))
- fi
- fi
- if [ $fail -eq 0 -a $pass -eq 0 ]
- then
- echo "not implemented: `pwd`"
- UNIMPLEMENTED=$(($UNIMPLEMENTED+1))
- fi
-
- FAIL=$(($FAIL+$fail))
- PASS=$(($PASS+$pass))
-
- for FILE in *
- do
- if [ -d "$FILE" ];
- then
- cd $FILE
- if [ $FILE = thread -o $1 = yes ]; then
- afunc yes
- else
- afunc no
- fi
- cd ..
- fi
- done
-}
-
-afunc no
-
-echo "****************************************************"
-echo "Results for `pwd`:"
-echo "using `$CC --version`"
-echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
-echo "----------------------------------------------------"
-echo "sections without tests : $UNIMPLEMENTED"
-echo "sections with failures : $IMPLEMENTED_FAIL"
-echo "sections without failures: $IMPLEMENTED_PASS"
-echo " + ----"
-echo "total number of sections : $(($UNIMPLEMENTED+$IMPLEMENTED_FAIL+$IMPLEMENTED_PASS))"
-echo "----------------------------------------------------"
-echo "number of tests failed : $FAIL"
-echo "number of tests passed : $PASS"
-echo " + ----"
-echo "total number of tests : $(($FAIL+$PASS))"
-echo "****************************************************"
-
-exit $FAIL
diff --git a/utils/gen_link_script/gen_link_script.py b/utils/gen_link_script.py
index 24fe5ce9904e..24fe5ce9904e 100755
--- a/utils/gen_link_script/gen_link_script.py
+++ b/utils/gen_link_script.py
diff --git a/utils/libcxx/__init__.py b/utils/libcxx/__init__.py
new file mode 100644
index 000000000000..7523a3d8bb9b
--- /dev/null
+++ b/utils/libcxx/__init__.py
@@ -0,0 +1,17 @@
+#===----------------------------------------------------------------------===##
+#
+# 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.
+#
+#===----------------------------------------------------------------------===##
+
+"""libcxx python utilities"""
+
+__author__ = 'Eric Fiselier'
+__email__ = 'eric@efcs.ca'
+__versioninfo__ = (0, 1, 0)
+__version__ = ' '.join(str(v) for v in __versioninfo__) + 'dev'
+
+__all__ = []
diff --git a/test/libcxx/compiler.py b/utils/libcxx/compiler.py
index 8585f44ed35f..983bc26c80bd 100644
--- a/test/libcxx/compiler.py
+++ b/utils/libcxx/compiler.py
@@ -9,7 +9,6 @@
import platform
import os
-import lit.util
import libcxx.util
@@ -49,18 +48,6 @@ class CXXCompiler(object):
if self.type is None or self.version is None:
self._initTypeAndVersion()
- def copy(self):
- new_cxx = CXXCompiler(
- self.path, flags=self.flags, compile_flags=self.compile_flags,
- link_flags=self.link_flags, warning_flags=self.warning_flags,
- verify_supported=self.verify_supported,
- verify_flags=self.verify_flags, use_verify=self.use_verify,
- modules_flags=self.modules_flags, use_modules=self.use_modules,
- use_ccache=self.use_ccache, use_warnings=self.use_warnings,
- compile_env=self.compile_env, cxx_type=self.type,
- cxx_version=self.version)
- return new_cxx
-
def isVerifySupported(self):
if self.verify_supported is None:
self.verify_supported = self.hasCompileFlag(['-Xclang',
@@ -166,27 +153,27 @@ class CXXCompiler(object):
def preprocess(self, source_files, out=None, flags=[], cwd=None):
cmd = self.preprocessCmd(source_files, out, flags)
- out, err, rc = lit.util.executeCommand(cmd, env=self.compile_env,
- cwd=cwd)
+ out, err, rc = libcxx.util.executeCommand(cmd, env=self.compile_env,
+ cwd=cwd)
return cmd, out, err, rc
def compile(self, source_files, out=None, flags=[], cwd=None):
cmd = self.compileCmd(source_files, out, flags)
- out, err, rc = lit.util.executeCommand(cmd, env=self.compile_env,
- cwd=cwd)
+ out, err, rc = libcxx.util.executeCommand(cmd, env=self.compile_env,
+ cwd=cwd)
return cmd, out, err, rc
def link(self, source_files, out=None, flags=[], cwd=None):
cmd = self.linkCmd(source_files, out, flags)
- out, err, rc = lit.util.executeCommand(cmd, env=self.compile_env,
- cwd=cwd)
+ out, err, rc = libcxx.util.executeCommand(cmd, env=self.compile_env,
+ cwd=cwd)
return cmd, out, err, rc
def compileLink(self, source_files, out=None, flags=[],
cwd=None):
cmd = self.compileLinkCmd(source_files, out, flags)
- out, err, rc = lit.util.executeCommand(cmd, env=self.compile_env,
- cwd=cwd)
+ out, err, rc = libcxx.util.executeCommand(cmd, env=self.compile_env,
+ cwd=cwd)
return cmd, out, err, rc
def compileLinkTwoSteps(self, source_file, out=None, object_file=None,
@@ -228,7 +215,7 @@ class CXXCompiler(object):
def getTriple(self):
cmd = [self.path] + self.flags + ['-dumpmachine']
- return lit.util.capture(cmd).strip()
+ return libcxx.util.capture(cmd).strip()
def hasCompileFlag(self, flag):
if isinstance(flag, list):
@@ -287,7 +274,8 @@ class CXXCompiler(object):
# TODO(EricWF): Are there other flags we need to worry about?
if '-v' in cmd:
cmd.remove('-v')
- out, err, rc = lit.util.executeCommand(cmd, input='#error\n')
+ out, err, rc = libcxx.util.executeCommand(
+ cmd, input=libcxx.util.to_bytes('#error\n'))
assert rc != 0
if flag in err:
@@ -296,7 +284,7 @@ class CXXCompiler(object):
def addWarningFlagIfSupported(self, flag):
if self.hasWarningFlag(flag):
- assert flag not in self.warning_flags
- self.warning_flags += [flag]
+ if flag not in self.warning_flags:
+ self.warning_flags += [flag]
return True
return False
diff --git a/utils/sym_check/sym_check/__init__.py b/utils/libcxx/sym_check/__init__.py
index 1aa2b450c12f..1aa2b450c12f 100644
--- a/utils/sym_check/sym_check/__init__.py
+++ b/utils/libcxx/sym_check/__init__.py
diff --git a/utils/sym_check/sym_check/diff.py b/utils/libcxx/sym_check/diff.py
index 6502a4819a47..0821ef6f780a 100644
--- a/utils/sym_check/sym_check/diff.py
+++ b/utils/libcxx/sym_check/diff.py
@@ -11,7 +11,7 @@
diff - A set of functions for diff-ing two symbol lists.
"""
-from sym_check import util
+from libcxx.sym_check import util
def _symbol_difference(lhs, rhs):
@@ -43,7 +43,7 @@ def changed_symbols(old, new):
continue
new_sym = _find_by_key(new, old_sym['name'])
if (new_sym is not None and not new_sym in old
- and cmp(old_sym, new_sym) != 0):
+ and old_sym != new_sym):
changed += [(old_sym, new_sym)]
return changed
@@ -98,4 +98,6 @@ def report_diff(added_syms, removed_syms, changed_syms, names_only=False,
report += 'ABI BREAKAGE: SYMBOLS ADDED OR REMOVED!'
else:
report += 'Symbols match.'
- return report, int(abi_break)
+ is_different = abi_break or bool(len(added_syms)) \
+ or bool(len(changed_syms))
+ return report, abi_break, is_different
diff --git a/utils/sym_check/sym_check/extract.py b/utils/libcxx/sym_check/extract.py
index d132e22822bb..152ff97db178 100644
--- a/utils/sym_check/sym_check/extract.py
+++ b/utils/libcxx/sym_check/extract.py
@@ -14,7 +14,8 @@ import distutils.spawn
import sys
import re
-from sym_check import util
+import libcxx.util
+from libcxx.sym_check import util
extract_ignore_names = ['_init', '_fini']
@@ -48,7 +49,7 @@ class NMExtractor(object):
parsed symbols.
"""
cmd = [self.nm_exe] + self.flags + [lib]
- out, _, exit_code = util.execute_command_verbose(cmd)
+ out, _, exit_code = libcxx.util.executeCommandVerbose(cmd)
if exit_code != 0:
raise RuntimeError('Failed to run %s on %s' % (self.nm_exe, lib))
fmt_syms = (self._extract_sym(l)
@@ -134,7 +135,7 @@ class ReadElfExtractor(object):
parsed symbols.
"""
cmd = [self.tool] + self.flags + [lib]
- out, _, exit_code = util.execute_command_verbose(cmd)
+ out, _, exit_code = libcxx.util.executeCommandVerbose(cmd)
if exit_code != 0:
raise RuntimeError('Failed to run %s on %s' % (self.nm_exe, lib))
dyn_syms = self.get_dynsym_table(out)
diff --git a/utils/sym_check/sym_check/match.py b/utils/libcxx/sym_check/match.py
index fae400e4e77e..fae400e4e77e 100644
--- a/utils/sym_check/sym_check/match.py
+++ b/utils/libcxx/sym_check/match.py
diff --git a/utils/sym_check/sym_check/util.py b/utils/libcxx/sym_check/util.py
index 9543984673cc..8a4c4ab496ff 100644
--- a/utils/sym_check/sym_check/util.py
+++ b/utils/libcxx/sym_check/util.py
@@ -9,43 +9,9 @@
import ast
import distutils.spawn
-import signal
-import subprocess
import sys
import re
-
-def execute_command(cmd, input_str=None):
- """
- Execute a command, capture and return its output.
- """
- kwargs = {
- 'stdin': subprocess.PIPE,
- 'stdout': subprocess.PIPE,
- 'stderr': subprocess.PIPE,
- }
- p = subprocess.Popen(cmd, **kwargs)
- out, err = p.communicate(input=input_str)
- exitCode = p.wait()
- if exitCode == -signal.SIGINT:
- raise KeyboardInterrupt
- return out, err, exitCode
-
-
-def execute_command_verbose(cmd, input_str=None):
- """
- Execute a command and print its output on failure.
- """
- out, err, exitCode = execute_command(cmd, input_str=input_str)
- if exitCode != 0:
- report = "Command: %s\n" % ' '.join(["'%s'" % a for a in cmd])
- report += "Exit Code: %d\n" % exitCode
- if out:
- report += "Standard Output:\n--\n%s--" % out
- if err:
- report += "Standard Error:\n--\n%s--" % err
- report += "\n\nFailed!"
- sys.stderr.write('%s\n' % report)
- return out, err, exitCode
+import libcxx.util
def read_syms_from_list(slist):
@@ -97,21 +63,21 @@ _cppfilt_exe = distutils.spawn.find_executable('c++filt')
def demangle_symbol(symbol):
if _cppfilt_exe is None:
return symbol
- out, _, exit_code = execute_command_verbose(
- [_cppfilt_exe], input_str=symbol)
+ out, _, exit_code = libcxx.util.executeCommandVerbose(
+ [_cppfilt_exe], input=symbol)
if exit_code != 0:
return symbol
return out
def is_elf(filename):
- with open(filename, 'r') as f:
+ with open(filename, 'rb') as f:
magic_bytes = f.read(4)
- return magic_bytes == '\x7fELF'
+ return magic_bytes == b'\x7fELF'
def is_mach_o(filename):
- with open(filename, 'r') as f:
+ with open(filename, 'rb') as f:
magic_bytes = f.read(4)
return magic_bytes in [
'\xfe\xed\xfa\xce', # MH_MAGIC
@@ -131,9 +97,9 @@ def is_library_file(filename):
def extract_or_load(filename):
- import sym_check.extract
+ import libcxx.sym_check.extract
if is_library_file(filename):
- return sym_check.extract.extract_symbols(filename)
+ return libcxx.sym_check.extract.extract_symbols(filename)
return read_syms_from_file(filename)
def adjust_mangled_name(name):
diff --git a/test/libcxx/__init__.py b/utils/libcxx/test/__init__.py
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/libcxx/__init__.py
+++ b/utils/libcxx/test/__init__.py
diff --git a/test/libcxx/test/config.py b/utils/libcxx/test/config.py
index 3d790249ce66..c941f65b2c57 100644
--- a/test/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -11,19 +11,17 @@ import locale
import os
import platform
import pkgutil
+import pipes
import re
import shlex
import shutil
import sys
-import lit.Test # pylint: disable=import-error,no-name-in-module
-import lit.util # pylint: disable=import-error,no-name-in-module
-
-from libcxx.test.format import LibcxxTestFormat
from libcxx.compiler import CXXCompiler
from libcxx.test.target_info import make_target_info
from libcxx.test.executor import *
from libcxx.test.tracing import *
+import libcxx.util
def loadSiteConfig(lit_config, config, param_name, env_name):
# We haven't loaded the site specific configuration (the user is
@@ -68,6 +66,7 @@ class Configuration(object):
self.cxx_runtime_root = None
self.abi_library_root = None
self.link_shared = self.get_lit_bool('enable_shared', default=True)
+ self.debug_build = self.get_lit_bool('debug_build', default=False)
self.exec_env = {}
self.use_target = False
self.use_system_cxx_lib = False
@@ -83,20 +82,31 @@ class Configuration(object):
val = default
return val
- def get_lit_bool(self, name, default=None):
- conf = self.get_lit_conf(name)
- if conf is None:
- return default
- if isinstance(conf, bool):
- return conf
- if not isinstance(conf, str):
- raise TypeError('expected bool or string')
- if conf.lower() in ('1', 'true'):
- return True
- if conf.lower() in ('', '0', 'false'):
- return False
- self.lit_config.fatal(
- "parameter '{}' should be true or false".format(name))
+ def get_lit_bool(self, name, default=None, env_var=None):
+ def check_value(value, var_name):
+ if value is None:
+ return default
+ if isinstance(value, bool):
+ return value
+ if not isinstance(value, str):
+ raise TypeError('expected bool or string')
+ if value.lower() in ('1', 'true'):
+ return True
+ if value.lower() in ('', '0', 'false'):
+ return False
+ self.lit_config.fatal(
+ "parameter '{}' should be true or false".format(var_name))
+
+ conf_val = self.get_lit_conf(name)
+ if env_var is not None and env_var in os.environ and \
+ os.environ[env_var] is not None:
+ val = os.environ[env_var]
+ if conf_val is not None:
+ self.lit_config.warning(
+ 'Environment variable %s=%s is overriding explicit '
+ '--param=%s=%s' % (env_var, val, name, conf_val))
+ return check_value(val, env_var)
+ return check_value(conf_val, name)
def make_static_lib_name(self, name):
"""Return the full filename for the specified library name"""
@@ -107,14 +117,15 @@ class Configuration(object):
def configure(self):
self.configure_executor()
+ self.configure_use_system_cxx_lib()
self.configure_target_info()
self.configure_cxx()
self.configure_triple()
+ self.configure_deployment()
self.configure_src_root()
self.configure_obj_root()
self.configure_cxx_stdlib_under_test()
self.configure_cxx_library_root()
- self.configure_use_system_cxx_lib()
self.configure_use_clang_verify()
self.configure_use_thread_safety()
self.configure_execute_external()
@@ -148,8 +159,10 @@ class Configuration(object):
self.lit_config.note('Using available_features: %s' %
list(self.config.available_features))
self.lit_config.note('Using environment: %r' % self.exec_env)
+ sys.stderr.flush() # Force flushing to avoid broken output on Windows
def get_test_format(self):
+ from libcxx.test.format import LibcxxTestFormat
return LibcxxTestFormat(
self.cxx,
self.use_clang_verify,
@@ -186,8 +199,10 @@ class Configuration(object):
# If no specific cxx_under_test was given, attempt to infer it as
# clang++.
if cxx is None or self.cxx_is_clang_cl:
- clangxx = lit.util.which('clang++',
- self.config.environment['PATH'])
+ search_paths = self.config.environment['PATH']
+ if cxx is not None and os.path.isabs(cxx):
+ search_paths = os.path.dirname(cxx)
+ clangxx = libcxx.util.which('clang++', search_paths)
if clangxx:
cxx = clangxx
self.lit_config.note(
@@ -215,18 +230,19 @@ class Configuration(object):
self.cxx.compile_env['CCACHE_CPP2'] = '1'
def _configure_clang_cl(self, clang_path):
+ def _split_env_var(var):
+ return [p.strip() for p in os.environ.get(var, '').split(';') if p.strip()]
+
+ def _prefixed_env_list(var, prefix):
+ from itertools import chain
+ return list(chain.from_iterable((prefix, path) for path in _split_env_var(var)))
+
assert self.cxx_is_clang_cl
- # FIXME: don't hardcode the target
- flags = ['--target=i686-pc-windows']
- compile_flags = []
- link_flags = ['-fuse-ld=lld']
- if 'INCLUDE' in os.environ:
- compile_flags += ['-isystem %s' % p.strip()
- for p in os.environ['INCLUDE'].split(';')
- if p.strip()]
- if 'LIB' in os.environ:
- link_flags += ['-L%s' % p.strip()
- for p in os.environ['LIB'].split(';') if p.strip()]
+ flags = []
+ compile_flags = _prefixed_env_list('INCLUDE', '-isystem')
+ link_flags = _prefixed_env_list('LIB', '-L')
+ for path in _list_env_var('LIB'):
+ self.add_path(self.exec_env, path)
return CXXCompiler(clang_path, flags=flags,
compile_flags=compile_flags,
link_flags=link_flags)
@@ -257,18 +273,22 @@ class Configuration(object):
# the locally built one; the former mode is useful for testing ABI
# compatibility between the current headers and a shipping dynamic
# library.
- self.use_system_cxx_lib = self.get_lit_bool('use_system_cxx_lib')
- if self.use_system_cxx_lib is None:
- # Default to testing against the locally built libc++ library.
+ # Default to testing against the locally built libc++ library.
+ self.use_system_cxx_lib = self.get_lit_conf('use_system_cxx_lib')
+ if self.use_system_cxx_lib == 'true':
+ self.use_system_cxx_lib = True
+ elif self.use_system_cxx_lib == 'false':
self.use_system_cxx_lib = False
- self.lit_config.note(
- "inferred use_system_cxx_lib as: %r" % self.use_system_cxx_lib)
+ elif self.use_system_cxx_lib:
+ assert os.path.isdir(self.use_system_cxx_lib)
+ self.lit_config.note(
+ "inferred use_system_cxx_lib as: %r" % self.use_system_cxx_lib)
def configure_cxx_stdlib_under_test(self):
self.cxx_stdlib_under_test = self.get_lit_conf(
'cxx_stdlib_under_test', 'libc++')
if self.cxx_stdlib_under_test not in \
- ['libc++', 'libstdc++', 'cxx_default']:
+ ['libc++', 'libstdc++', 'msvc', 'cxx_default']:
self.lit_config.fatal(
'unsupported value for "cxx_stdlib_under_test": %s'
% self.cxx_stdlib_under_test)
@@ -346,6 +366,13 @@ class Configuration(object):
# Insert the platform name into the available features as a lower case.
self.config.available_features.add(target_platform)
+ # 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
+ self.config.available_features.add('apple-darwin')
+ self.config.available_features.add(arch + '-apple-darwin')
+
# 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
self.long_tests = self.get_lit_bool('long_tests')
@@ -380,6 +407,21 @@ class Configuration(object):
if '__cpp_structured_bindings' not in macros:
self.config.available_features.add('libcpp-no-structured-bindings')
+ if '__cpp_deduction_guides' not in macros:
+ self.config.available_features.add('libcpp-no-deduction-guides')
+
+ if self.is_windows:
+ self.config.available_features.add('windows')
+
+ # Attempt to detect the glibc version by querying for __GLIBC__
+ # in 'features.h'.
+ macros = self.cxx.dumpMacros(flags=['-include', 'features.h'])
+ if macros is not None and '__GLIBC__' in macros:
+ maj_v, min_v = (macros['__GLIBC__'], macros['__GLIBC_MINOR__'])
+ self.config.available_features.add('glibc')
+ self.config.available_features.add('glibc-%s' % maj_v)
+ self.config.available_features.add('glibc-%s.%s' % (maj_v, min_v))
+
def configure_compile_flags(self):
no_default_flags = self.get_lit_bool('no_default_flags', False)
if not no_default_flags:
@@ -442,18 +484,39 @@ class Configuration(object):
gcc_toolchain = self.get_lit_conf('gcc_toolchain')
if gcc_toolchain:
self.cxx.flags += ['-gcc-toolchain', gcc_toolchain]
+ # NOTE: the _DEBUG definition must preceed the triple check because for
+ # the Windows build of libc++, the forced inclusion of a header requires
+ # that _DEBUG is defined. Incorrect ordering will result in -target
+ # being elided.
+ if self.is_windows and self.debug_build:
+ self.cxx.compile_flags += ['-D_DEBUG']
if self.use_target:
if not self.cxx.addFlagIfSupported(
['-target', self.config.target_triple]):
self.lit_config.warning('use_target is true but -target is '\
'not supported by the compiler')
+ if self.use_deployment:
+ arch, name, version = self.config.deployment
+ self.cxx.flags += ['-arch', arch]
+ self.cxx.flags += ['-m' + name + '-version-min=' + version]
def configure_compile_flags_header_includes(self):
- support_path = os.path.join(self.libcxx_src_root, 'test/support')
+ support_path = os.path.join(self.libcxx_src_root, 'test', 'support')
if self.cxx_stdlib_under_test != 'libstdc++' and \
not self.is_windows:
self.cxx.compile_flags += [
'-include', os.path.join(support_path, 'nasty_macros.hpp')]
+ if self.cxx_stdlib_under_test == 'msvc':
+ self.cxx.compile_flags += [
+ '-include', os.path.join(support_path,
+ 'msvc_stdlib_force_include.hpp')]
+ pass
+ if self.is_windows and self.debug_build and \
+ self.cxx_stdlib_under_test != 'msvc':
+ self.cxx.compile_flags += [
+ '-include', os.path.join(support_path,
+ 'set_windows_crt_report_mode.h')
+ ]
self.configure_config_site_header()
cxx_headers = self.get_lit_conf('cxx_headers')
if cxx_headers == '' or (cxx_headers is None
@@ -469,7 +532,7 @@ class Configuration(object):
self.cxx.compile_flags += ['-I' + cxx_headers]
if self.libcxx_obj_root is not None:
cxxabi_headers = os.path.join(self.libcxx_obj_root, 'include',
- 'c++-build')
+ 'c++build')
if os.path.isdir(cxxabi_headers):
self.cxx.compile_flags += ['-I' + cxxabi_headers]
@@ -602,6 +665,9 @@ class Configuration(object):
self.config.available_features.add('c++experimental')
self.cxx.link_flags += ['-lstdc++fs']
self.cxx.link_flags += ['-lm', '-pthread']
+ elif self.cxx_stdlib_under_test == 'msvc':
+ # FIXME: Correctly setup debug/release flags here.
+ pass
elif self.cxx_stdlib_under_test == 'cxx_default':
self.cxx.link_flags += ['-pthread']
else:
@@ -624,6 +690,13 @@ class Configuration(object):
self.cxx_runtime_root]
elif self.is_windows and self.link_shared:
self.add_path(self.exec_env, self.cxx_runtime_root)
+ elif os.path.isdir(str(self.use_system_cxx_lib)):
+ self.cxx.link_flags += ['-L' + self.use_system_cxx_lib]
+ if not self.is_windows:
+ self.cxx.link_flags += ['-Wl,-rpath,' +
+ self.use_system_cxx_lib]
+ if self.is_windows and self.link_shared:
+ self.add_path(self.cxx.compile_env, self.use_system_cxx_lib)
def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
@@ -674,9 +747,14 @@ class Configuration(object):
self.cxx.link_flags += ['-lc++abi']
elif cxx_abi == 'libcxxrt':
self.cxx.link_flags += ['-lcxxrt']
+ elif cxx_abi == 'vcruntime':
+ debug_suffix = 'd' if self.debug_build else ''
+ self.cxx.link_flags += ['-l%s%s' % (lib, debug_suffix) for lib in
+ ['vcruntime', 'ucrt', 'msvcrt']]
elif cxx_abi == 'none' or cxx_abi == 'default':
if self.is_windows:
- self.cxx.link_flags += ['-lmsvcrtd']
+ debug_suffix = 'd' if self.debug_build else ''
+ self.cxx.link_flags += ['-lmsvcrt%s' % debug_suffix]
else:
self.lit_config.fatal(
'C++ ABI setting %s unsupported for tests' % cxx_abi)
@@ -721,33 +799,36 @@ class Configuration(object):
['c++11', 'c++14', 'c++1z'])) != 0
enable_warnings = self.get_lit_bool('enable_warnings',
default_enable_warnings)
- if enable_warnings:
- self.cxx.useWarnings(True)
- self.cxx.warning_flags += [
- '-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER',
- '-Wall', '-Wextra', '-Werror'
- ]
- self.cxx.addWarningFlagIfSupported('-Wshadow')
- self.cxx.addWarningFlagIfSupported('-Wno-unused-command-line-argument')
- self.cxx.addWarningFlagIfSupported('-Wno-attributes')
- self.cxx.addWarningFlagIfSupported('-Wno-pessimizing-move')
- self.cxx.addWarningFlagIfSupported('-Wno-c++11-extensions')
- self.cxx.addWarningFlagIfSupported('-Wno-user-defined-literals')
- # These warnings should be enabled in order to support the MSVC
- # team using the test suite; They enable the warnings below and
- # expect the test suite to be clean.
- self.cxx.addWarningFlagIfSupported('-Wsign-compare')
- self.cxx.addWarningFlagIfSupported('-Wunused-variable')
- self.cxx.addWarningFlagIfSupported('-Wunused-parameter')
- self.cxx.addWarningFlagIfSupported('-Wunreachable-code')
- # FIXME: Enable the two warnings below.
- self.cxx.addWarningFlagIfSupported('-Wno-conversion')
+ self.cxx.useWarnings(enable_warnings)
+ self.cxx.warning_flags += [
+ '-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER',
+ '-Wall', '-Wextra', '-Werror'
+ ]
+ if self.cxx.hasWarningFlag('-Wuser-defined-warnings'):
+ self.cxx.warning_flags += ['-Wuser-defined-warnings']
+ self.config.available_features.add('diagnose-if-support')
+ self.cxx.addWarningFlagIfSupported('-Wshadow')
+ self.cxx.addWarningFlagIfSupported('-Wno-unused-command-line-argument')
+ self.cxx.addWarningFlagIfSupported('-Wno-attributes')
+ self.cxx.addWarningFlagIfSupported('-Wno-pessimizing-move')
+ self.cxx.addWarningFlagIfSupported('-Wno-c++11-extensions')
+ self.cxx.addWarningFlagIfSupported('-Wno-user-defined-literals')
+ self.cxx.addWarningFlagIfSupported('-Wno-noexcept-type')
+ # These warnings should be enabled in order to support the MSVC
+ # team using the test suite; They enable the warnings below and
+ # expect the test suite to be clean.
+ self.cxx.addWarningFlagIfSupported('-Wsign-compare')
+ self.cxx.addWarningFlagIfSupported('-Wunused-variable')
+ self.cxx.addWarningFlagIfSupported('-Wunused-parameter')
+ self.cxx.addWarningFlagIfSupported('-Wunreachable-code')
+ # FIXME: Enable the two warnings below.
+ self.cxx.addWarningFlagIfSupported('-Wno-conversion')
+ self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
+ std = self.get_lit_conf('std', None)
+ if std in ['c++98', 'c++03']:
+ # The '#define static_assert' provided by libc++ in C++03 mode
+ # causes an unused local typedef whenever it is used.
self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
- std = self.get_lit_conf('std', None)
- if std in ['c++98', 'c++03']:
- # The '#define static_assert' provided by libc++ in C++03 mode
- # causes an unused local typedef whenever it is used.
- self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
def configure_sanitizer(self):
san = self.get_lit_conf('use_sanitizer', '').strip()
@@ -756,13 +837,13 @@ class Configuration(object):
# Search for llvm-symbolizer along the compiler path first
# and then along the PATH env variable.
symbolizer_search_paths = os.environ.get('PATH', '')
- cxx_path = lit.util.which(self.cxx.path)
+ cxx_path = libcxx.util.which(self.cxx.path)
if cxx_path is not None:
symbolizer_search_paths = (
os.path.dirname(cxx_path) +
os.pathsep + symbolizer_search_paths)
- llvm_symbolizer = lit.util.which('llvm-symbolizer',
- symbolizer_search_paths)
+ llvm_symbolizer = libcxx.util.which('llvm-symbolizer',
+ symbolizer_search_paths)
def add_ubsan():
self.cxx.flags += ['-fsanitize=undefined',
@@ -778,7 +859,7 @@ class Configuration(object):
if llvm_symbolizer is not None:
self.exec_env['ASAN_SYMBOLIZER_PATH'] = llvm_symbolizer
# FIXME: Turn ODR violation back on after PR28391 is resolved
- # https://llvm.org/bugs/show_bug.cgi?id=28391
+ # https://bugs.llvm.org/show_bug.cgi?id=28391
self.exec_env['ASAN_OPTIONS'] = 'detect_odr_violation=0'
self.config.available_features.add('asan')
self.config.available_features.add('sanitizer-new-delete')
@@ -821,10 +902,9 @@ class Configuration(object):
if platform.system() != 'Darwin':
modules_flags += ['-Xclang', '-fmodules-local-submodule-visibility']
supports_modules = self.cxx.hasCompileFlag(modules_flags)
- enable_modules_default = supports_modules and \
- os.environ.get('LIBCXX_USE_MODULES') is not None
enable_modules = self.get_lit_bool('enable_modules',
- enable_modules_default)
+ default=False,
+ env_var='LIBCXX_ENABLE_MODULES')
if enable_modules and not supports_modules:
self.lit_config.fatal(
'-fmodules is enabled but not supported by the compiler')
@@ -845,12 +925,13 @@ class Configuration(object):
def configure_substitutions(self):
sub = self.config.substitutions
+ cxx_path = pipes.quote(self.cxx.path)
# Configure compiler substitutions
- sub.append(('%cxx', self.cxx.path))
+ sub.append(('%cxx', cxx_path))
# Configure flags substitutions
- flags_str = ' '.join(self.cxx.flags)
- compile_flags_str = ' '.join(self.cxx.compile_flags)
- link_flags_str = ' '.join(self.cxx.link_flags)
+ flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
+ compile_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.compile_flags])
+ link_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.link_flags])
all_flags = '%s %s %s' % (flags_str, compile_flags_str, link_flags_str)
sub.append(('%flags', flags_str))
sub.append(('%compile_flags', compile_flags_str))
@@ -860,12 +941,12 @@ class Configuration(object):
verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
sub.append(('%verify', verify_str))
# Add compile and link shortcuts
- compile_str = (self.cxx.path + ' -o %t.o %s -c ' + flags_str
+ compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str
+ ' ' + compile_flags_str)
- link_str = (self.cxx.path + ' -o %t.exe %t.o ' + flags_str + ' '
+ link_str = (cxx_path + ' -o %t.exe %t.o ' + flags_str + ' '
+ link_flags_str)
assert type(link_str) is str
- build_str = self.cxx.path + ' -o %t.exe %s ' + all_flags
+ build_str = cxx_path + ' -o %t.exe %s ' + all_flags
if self.cxx.use_modules:
sub.append(('%compile_module', compile_str))
sub.append(('%build_module', build_str))
@@ -877,9 +958,11 @@ class Configuration(object):
sub.append(('%link', link_str))
sub.append(('%build', build_str))
# Configure exec prefix substitutions.
- exec_env_str = 'env ' if len(self.exec_env) != 0 else ''
- for k, v in self.exec_env.items():
- exec_env_str += ' %s=%s' % (k, v)
+ exec_env_str = ''
+ if not self.is_windows and len(self.exec_env) != 0:
+ exec_env_str = 'env '
+ for k, v in self.exec_env.items():
+ exec_env_str += ' %s=%s' % (k, v)
# Configure run env substitution.
exec_str = exec_env_str
if self.lit_config.useValgrind:
@@ -888,16 +971,38 @@ class Configuration(object):
# Configure run shortcut
sub.append(('%run', exec_str + ' %t.exe'))
# Configure not program substitutions
- not_py = os.path.join(self.libcxx_src_root, 'utils', 'not', 'not.py')
- not_str = '%s %s ' % (sys.executable, not_py)
+ not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
+ not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))
sub.append(('not ', not_str))
+ def can_use_deployment(self):
+ # Check if the host is on an Apple platform using clang.
+ if not self.target_info.platform() == "darwin":
+ return False
+ if not self.target_info.is_host_macosx():
+ return False
+ if not self.cxx.type.endswith('clang'):
+ return False
+ return True
+
def configure_triple(self):
# Get or infer the target triple.
- self.config.target_triple = self.get_lit_conf('target_triple')
+ target_triple = self.get_lit_conf('target_triple')
self.use_target = self.get_lit_bool('use_target', False)
- if self.use_target and self.config.target_triple:
+ if self.use_target and target_triple:
self.lit_config.warning('use_target is true but no triple is specified')
+
+ # Use deployment if possible.
+ self.use_deployment = not self.use_target and self.can_use_deployment()
+ if self.use_deployment:
+ return
+
+ # Save the triple (and warn on Apple platforms).
+ self.config.target_triple = target_triple
+ if self.use_target and 'apple' in target_triple:
+ self.lit_config.warning('consider using arch and platform instead'
+ ' of target_triple on Apple platforms')
+
# If no target triple was given, try to infer it from the compiler
# under test.
if not self.config.target_triple:
@@ -919,6 +1024,39 @@ class Configuration(object):
self.lit_config.note(
"inferred target_triple as: %r" % self.config.target_triple)
+ def configure_deployment(self):
+ assert not self.use_deployment is None
+ assert not self.use_target is None
+ if not self.use_deployment:
+ # Warn about ignored parameters.
+ if self.get_lit_conf('arch'):
+ self.lit_config.warning('ignoring arch, using target_triple')
+ if self.get_lit_conf('platform'):
+ self.lit_config.warning('ignoring platform, using target_triple')
+ return
+
+ assert not self.use_target
+ assert self.target_info.is_host_macosx()
+
+ # Always specify deployment explicitly on Apple platforms, since
+ # otherwise a platform is picked up from the SDK. If the SDK version
+ # doesn't match the system version, tests that use the system library
+ # may fail spuriously.
+ arch = self.get_lit_conf('arch')
+ if not arch:
+ arch = self.cxx.getTriple().split('-', 1)[0]
+ self.lit_config.note("inferred arch as: %r" % arch)
+
+ inferred_platform, name, version = self.target_info.get_platform()
+ if inferred_platform:
+ self.lit_config.note("inferred platform as: %r" % (name + version))
+ self.config.deployment = (arch, name, version)
+
+ # Set the target triple for use by lit.
+ self.config.target_triple = arch + '-apple-' + name + version
+ self.lit_config.note(
+ "computed target_triple as: %r" % self.config.target_triple)
+
def configure_env(self):
self.target_info.configure_env(self.exec_env)
diff --git a/test/libcxx/test/executor.py b/utils/libcxx/test/executor.py
index 250186cecb84..4a189174d915 100644
--- a/test/libcxx/test/executor.py
+++ b/utils/libcxx/test/executor.py
@@ -11,8 +11,7 @@ import platform
import os
from libcxx.test import tracing
-
-from lit.util import executeCommand # pylint: disable=import-error
+from libcxx.util import executeCommand
class Executor(object):
@@ -197,7 +196,7 @@ class SSHExecutor(RemoteExecutor):
# Not sure how to do suffix on osx yet
dir_arg = '-d' if is_dir else ''
cmd = 'mktemp -q {} /tmp/libcxx.XXXXXXXXXX'.format(dir_arg)
- temp_path, err, exitCode = self._execute_command_remote([cmd])
+ _, temp_path, err, exitCode = self._execute_command_remote([cmd])
temp_path = temp_path.strip()
if exitCode != 0:
raise RuntimeError(err)
@@ -220,4 +219,5 @@ class SSHExecutor(RemoteExecutor):
remote_cmd = ' '.join(env_cmd + cmd)
if remote_work_dir != '.':
remote_cmd = 'cd ' + remote_work_dir + ' && ' + remote_cmd
- return self.local_run(ssh_cmd + [remote_cmd])
+ out, err, rc = self.local_run(ssh_cmd + [remote_cmd])
+ return (remote_cmd, out, err, rc)
diff --git a/test/libcxx/test/format.py b/utils/libcxx/test/format.py
index cbd96f340bbc..c3bc97187ad4 100644
--- a/test/libcxx/test/format.py
+++ b/utils/libcxx/test/format.py
@@ -7,6 +7,7 @@
#
#===----------------------------------------------------------------------===##
+import copy
import errno
import os
import time
@@ -16,8 +17,6 @@ import lit.Test # pylint: disable=import-error
import lit.TestRunner # pylint: disable=import-error
from lit.TestRunner import ParserKind, IntegratedTestKeywordParser \
# pylint: disable=import-error
-import lit.util # pylint: disable=import-error
-
from libcxx.test.executor import LocalExecutor as LocalExecutor
import libcxx.util
@@ -36,7 +35,7 @@ class LibcxxTestFormat(object):
def __init__(self, cxx, use_verify_for_fail, execute_external,
executor, exec_env):
- self.cxx = cxx.copy()
+ self.cxx = copy.deepcopy(cxx)
self.use_verify_for_fail = use_verify_for_fail
self.execute_external = execute_external
self.executor = executor
@@ -115,7 +114,7 @@ class LibcxxTestFormat(object):
tmpBase)
script = lit.TestRunner.applySubstitutions(script, substitutions)
- test_cxx = self.cxx.copy()
+ test_cxx = copy.deepcopy(self.cxx)
if is_fail_test:
test_cxx.useCCache(False)
test_cxx.useWarnings(False)
@@ -140,6 +139,7 @@ class LibcxxTestFormat(object):
# We can't run ShTest tests with a executor yet.
# For now, bail on trying to run them
return lit.Test.UNSUPPORTED, 'ShTest format not yet supported'
+ test.config.enviroment = dict(self.exec_env)
return lit.TestRunner._runShTest(test, lit_config,
self.execute_external, script,
tmpBase)
@@ -162,7 +162,7 @@ class LibcxxTestFormat(object):
exec_path = tmpBase + '.exe'
object_path = tmpBase + '.o'
# Create the output directory if it does not already exist.
- lit.util.mkdir_p(os.path.dirname(tmpBase))
+ libcxx.util.mkdir_p(os.path.dirname(tmpBase))
try:
# Compile the test
cmd, out, err, rc = test_cxx.compileLinkTwoSteps(
@@ -223,6 +223,10 @@ class LibcxxTestFormat(object):
test_cxx.flags += ['-fsyntax-only']
if use_verify:
test_cxx.useVerify()
+ test_cxx.useWarnings()
+ if '-Wuser-defined-warnings' in test_cxx.warning_flags:
+ test_cxx.warning_flags += ['-Wno-error=user-defined-warnings']
+
cmd, out, err, rc = test_cxx.compile(source_path, out=os.devnull)
expected_rc = 0 if use_verify else 1
if rc == expected_rc:
diff --git a/test/libcxx/test/target_info.py b/utils/libcxx/test/target_info.py
index dc94e7afe0a9..9a7ae05a0285 100644
--- a/test/libcxx/test/target_info.py
+++ b/utils/libcxx/test/target_info.py
@@ -12,6 +12,7 @@ import lit.util # pylint: disable=import-error,no-name-in-module
import locale
import os
import platform
+import re
import sys
class DefaultTargetInfo(object):
@@ -70,12 +71,62 @@ class DarwinLocalTI(DefaultTargetInfo):
def __init__(self, full_config):
super(DarwinLocalTI, self).__init__(full_config)
+ def is_host_macosx(self):
+ name = lit.util.capture(['sw_vers', '-productName']).strip()
+ return name == "Mac OS X"
+
+ def get_macosx_version(self):
+ assert self.is_host_macosx()
+ version = lit.util.capture(['sw_vers', '-productVersion']).strip()
+ version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version)
+ return version
+
+ def get_sdk_version(self, name):
+ assert self.is_host_macosx()
+ cmd = ['xcrun', '--sdk', name, '--show-sdk-path']
+ try:
+ out = lit.util.capture(cmd).strip()
+ except OSError:
+ pass
+
+ if not out:
+ self.full_config.lit_config.fatal(
+ "cannot infer sdk version with: %r" % cmd)
+
+ return re.sub(r'.*/[^0-9]+([0-9.]+)\.sdk', r'\1', out)
+
+ def get_platform(self):
+ platform = self.full_config.get_lit_conf('platform')
+ if platform:
+ platform = re.sub(r'([^0-9]+)([0-9\.]*)', r'\1-\2', platform)
+ name, version = tuple(platform.split('-', 1))
+ else:
+ name = 'macosx'
+ version = None
+
+ if version:
+ return (False, name, version)
+
+ # Infer the version, either from the SDK or the system itself. For
+ # macosx, ignore the SDK version; what matters is what's at
+ # /usr/lib/libc++.dylib.
+ if name == 'macosx':
+ version = self.get_macosx_version()
+ else:
+ version = self.get_sdk_version(name)
+ return (True, name, version)
+
def add_locale_features(self, features):
add_common_locales(features, self.full_config.lit_config)
def add_cxx_compile_flags(self, flags):
+ if self.full_config.use_deployment:
+ _, name, _ = self.full_config.config.deployment
+ cmd = ['xcrun', '--sdk', name, '--show-sdk-path']
+ else:
+ cmd = ['xcrun', '--show-sdk-path']
try:
- out = lit.util.capture(['xcrun', '--show-sdk-path']).strip()
+ out = lit.util.capture(cmd).strip()
res = 0
except OSError:
res = -1
@@ -91,6 +142,8 @@ class DarwinLocalTI(DefaultTargetInfo):
library_paths = []
# Configure the library path for libc++
if self.full_config.use_system_cxx_lib:
+ if (os.path.isdir(str(self.full_config.use_system_cxx_lib))):
+ library_paths += [self.full_config.use_system_cxx_lib]
pass
elif self.full_config.cxx_runtime_root:
library_paths += [self.full_config.cxx_runtime_root]
@@ -221,4 +274,3 @@ def make_target_info(full_config):
if target_system == 'Linux': return LinuxLocalTI(full_config)
if target_system == 'Windows': return WindowsLocalTI(full_config)
return DefaultTargetInfo(full_config)
-
diff --git a/test/libcxx/test/tracing.py b/utils/libcxx/test/tracing.py
index c590ba3efd01..c590ba3efd01 100644
--- a/test/libcxx/test/tracing.py
+++ b/utils/libcxx/test/tracing.py
diff --git a/utils/libcxx/util.py b/utils/libcxx/util.py
new file mode 100644
index 000000000000..ecfb9afb73b0
--- /dev/null
+++ b/utils/libcxx/util.py
@@ -0,0 +1,286 @@
+#===----------------------------------------------------------------------===##
+#
+# 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.
+#
+#===----------------------------------------------------------------------===##
+
+from contextlib import contextmanager
+import errno
+import os
+import platform
+import signal
+import subprocess
+import sys
+import tempfile
+import threading
+
+
+# FIXME: Most of these functions are cribbed from LIT
+def to_bytes(str):
+ # Encode to UTF-8 to get binary data.
+ if isinstance(str, bytes):
+ return str
+ return str.encode('utf-8')
+
+def to_string(bytes):
+ if isinstance(bytes, str):
+ return bytes
+ return to_bytes(bytes)
+
+def convert_string(bytes):
+ try:
+ return to_string(bytes.decode('utf-8'))
+ except AttributeError: # 'str' object has no attribute 'decode'.
+ return str(bytes)
+ except UnicodeError:
+ return str(bytes)
+
+
+def cleanFile(filename):
+ try:
+ os.remove(filename)
+ except OSError:
+ pass
+
+
+@contextmanager
+def guardedTempFilename(suffix='', prefix='', dir=None):
+ # Creates and yeilds a temporary filename within a with statement. The file
+ # is removed upon scope exit.
+ handle, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=dir)
+ os.close(handle)
+ yield name
+ cleanFile(name)
+
+
+@contextmanager
+def guardedFilename(name):
+ # yeilds a filename within a with statement. The file is removed upon scope
+ # exit.
+ yield name
+ cleanFile(name)
+
+
+@contextmanager
+def nullContext(value):
+ # yeilds a variable within a with statement. No action is taken upon scope
+ # exit.
+ yield value
+
+
+def makeReport(cmd, out, err, rc):
+ report = "Command: %s\n" % cmd
+ report += "Exit Code: %d\n" % rc
+ if out:
+ report += "Standard Output:\n--\n%s--\n" % out
+ if err:
+ report += "Standard Error:\n--\n%s--\n" % err
+ report += '\n'
+ return report
+
+
+def capture(args, env=None):
+ """capture(command) - Run the given command (or argv list) in a shell and
+ return the standard output. Raises a CalledProcessError if the command
+ exits with a non-zero status."""
+ p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ env=env)
+ out, err = p.communicate()
+ out = convert_string(out)
+ err = convert_string(err)
+ if p.returncode != 0:
+ raise subprocess.CalledProcessError(cmd=args,
+ returncode=p.returncode,
+ output="{}\n{}".format(out, err))
+ return out
+
+
+def which(command, paths = None):
+ """which(command, [paths]) - Look up the given command in the paths string
+ (or the PATH environment variable, if unspecified)."""
+
+ if paths is None:
+ paths = os.environ.get('PATH','')
+
+ # Check for absolute match first.
+ if os.path.isfile(command):
+ return command
+
+ # Would be nice if Python had a lib function for this.
+ if not paths:
+ paths = os.defpath
+
+ # Get suffixes to search.
+ # On Cygwin, 'PATHEXT' may exist but it should not be used.
+ if os.pathsep == ';':
+ pathext = os.environ.get('PATHEXT', '').split(';')
+ else:
+ pathext = ['']
+
+ # Search the paths...
+ for path in paths.split(os.pathsep):
+ for ext in pathext:
+ p = os.path.join(path, command + ext)
+ if os.path.exists(p) and not os.path.isdir(p):
+ return p
+
+ return None
+
+
+def checkToolsPath(dir, tools):
+ for tool in tools:
+ if not os.path.exists(os.path.join(dir, tool)):
+ return False
+ return True
+
+
+def whichTools(tools, paths):
+ for path in paths.split(os.pathsep):
+ if checkToolsPath(path, tools):
+ return path
+ return None
+
+def mkdir_p(path):
+ """mkdir_p(path) - Make the "path" directory, if it does not exist; this
+ will also make directories for any missing parent directories."""
+ if not path or os.path.exists(path):
+ return
+
+ parent = os.path.dirname(path)
+ if parent != path:
+ mkdir_p(parent)
+
+ try:
+ os.mkdir(path)
+ except OSError:
+ e = sys.exc_info()[1]
+ # Ignore EEXIST, which may occur during a race condition.
+ if e.errno != errno.EEXIST:
+ raise
+
+
+class ExecuteCommandTimeoutException(Exception):
+ def __init__(self, msg, out, err, exitCode):
+ assert isinstance(msg, str)
+ assert isinstance(out, str)
+ assert isinstance(err, str)
+ assert isinstance(exitCode, int)
+ self.msg = msg
+ self.out = out
+ self.err = err
+ self.exitCode = exitCode
+
+# Close extra file handles on UNIX (on Windows this cannot be done while
+# also redirecting input).
+kUseCloseFDs = not (platform.system() == 'Windows')
+def executeCommand(command, cwd=None, env=None, input=None, timeout=0):
+ """
+ Execute command ``command`` (list of arguments or string)
+ with
+ * working directory ``cwd`` (str), use None to use the current
+ working directory
+ * environment ``env`` (dict), use None for none
+ * Input to the command ``input`` (str), use string to pass
+ no input.
+ * Max execution time ``timeout`` (int) seconds. Use 0 for no timeout.
+
+ Returns a tuple (out, err, exitCode) where
+ * ``out`` (str) is the standard output of running the command
+ * ``err`` (str) is the standard error of running the command
+ * ``exitCode`` (int) is the exitCode of running the command
+
+ If the timeout is hit an ``ExecuteCommandTimeoutException``
+ is raised.
+ """
+ if input is not None:
+ input = to_bytes(input)
+ p = subprocess.Popen(command, cwd=cwd,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ env=env, close_fds=kUseCloseFDs)
+ timerObject = None
+ # FIXME: Because of the way nested function scopes work in Python 2.x we
+ # need to use a reference to a mutable object rather than a plain
+ # bool. In Python 3 we could use the "nonlocal" keyword but we need
+ # to support Python 2 as well.
+ hitTimeOut = [False]
+ try:
+ if timeout > 0:
+ def killProcess():
+ # We may be invoking a shell so we need to kill the
+ # process and all its children.
+ hitTimeOut[0] = True
+ killProcessAndChildren(p.pid)
+
+ timerObject = threading.Timer(timeout, killProcess)
+ timerObject.start()
+
+ out,err = p.communicate(input=input)
+ exitCode = p.wait()
+ finally:
+ if timerObject != None:
+ timerObject.cancel()
+
+ # Ensure the resulting output is always of string type.
+ out = convert_string(out)
+ err = convert_string(err)
+
+ if hitTimeOut[0]:
+ raise ExecuteCommandTimeoutException(
+ msg='Reached timeout of {} seconds'.format(timeout),
+ out=out,
+ err=err,
+ exitCode=exitCode
+ )
+
+ # Detect Ctrl-C in subprocess.
+ if exitCode == -signal.SIGINT:
+ raise KeyboardInterrupt
+
+ return out, err, exitCode
+
+
+def killProcessAndChildren(pid):
+ """
+ This function kills a process with ``pid`` and all its
+ running children (recursively). It is currently implemented
+ using the psutil module which provides a simple platform
+ neutral implementation.
+
+ TODO: Reimplement this without using psutil so we can
+ remove our dependency on it.
+ """
+ import psutil
+ try:
+ psutilProc = psutil.Process(pid)
+ # Handle the different psutil API versions
+ try:
+ # psutil >= 2.x
+ children_iterator = psutilProc.children(recursive=True)
+ except AttributeError:
+ # psutil 1.x
+ children_iterator = psutilProc.get_children(recursive=True)
+ for child in children_iterator:
+ try:
+ child.kill()
+ except psutil.NoSuchProcess:
+ pass
+ psutilProc.kill()
+ except psutil.NoSuchProcess:
+ pass
+
+
+def executeCommandVerbose(cmd, *args, **kwargs):
+ """
+ Execute a command and print its output on failure.
+ """
+ out, err, exitCode = executeCommand(cmd, *args, **kwargs)
+ if exitCode != 0:
+ report = makeReport(cmd, out, err, exitCode)
+ report += "\n\nFailed!"
+ sys.stderr.write('%s\n' % report)
+ return out, err, exitCode
diff --git a/utils/not/not.py b/utils/not.py
index d9ceb8515d03..d9ceb8515d03 100644
--- a/utils/not/not.py
+++ b/utils/not.py
diff --git a/utils/sym_check/sym_diff.py b/utils/sym_diff.py
index 842e908dd42e..c01f71c928d9 100755
--- a/utils/sym_check/sym_diff.py
+++ b/utils/sym_diff.py
@@ -13,7 +13,7 @@ sym_diff - Compare two symbol lists and output the differences.
from argparse import ArgumentParser
import sys
-from sym_check import diff, util
+from libcxx.sym_check import diff, util
def main():
@@ -30,6 +30,10 @@ def main():
parser.add_argument('--only-stdlib-symbols', dest='only_stdlib',
help="Filter all symbols not related to the stdlib",
action='store_true', default=False)
+ parser.add_argument('--strict', dest='strict',
+ help="Exit with a non-zero status if any symbols "
+ "differ",
+ action='store_true', default=False)
parser.add_argument(
'-o', '--output', dest='output',
help='The output file. stdout is used if not given',
@@ -54,16 +58,16 @@ def main():
added, removed, changed = diff.diff(old_syms_list, new_syms_list)
if args.removed_only:
added = {}
- report, is_break = diff.report_diff(added, removed, changed,
- names_only=args.names_only,
- demangle=args.demangle)
+ report, is_break, is_different = diff.report_diff(
+ added, removed, changed, names_only=args.names_only,
+ demangle=args.demangle)
if args.output is None:
print(report)
else:
with open(args.output, 'w') as f:
f.write(report + '\n')
- sys.exit(is_break)
-
+ exit_code = 1 if is_break or (args.strict and is_different) else 0
+ sys.exit(exit_code)
if __name__ == '__main__':
main()
diff --git a/utils/sym_check/sym_extract.py b/utils/sym_extract.py
index 27765679ed80..0d9d2eeb8e5a 100755
--- a/utils/sym_check/sym_extract.py
+++ b/utils/sym_extract.py
@@ -11,7 +11,7 @@
sym_extract - Extract and output a list of symbols from a shared library.
"""
from argparse import ArgumentParser
-from sym_check import extract, util
+from libcxx.sym_check import extract, util
def main():
diff --git a/utils/sym_check/sym_match.py b/utils/sym_match.py
index 231bdc8b367a..48582ce66672 100755
--- a/utils/sym_check/sym_match.py
+++ b/utils/sym_match.py
@@ -13,7 +13,7 @@ sym_match - Match all symbols in a list against a list of regexes.
"""
from argparse import ArgumentParser
import sys
-from sym_check import util, match, extract
+from libcxx.sym_check import util, match, extract
def main():
diff --git a/utils/sym_check/linux_blacklist.txt b/utils/symcheck-blacklists/linux_blacklist.txt
index 4d9d1d4b9e30..4d9d1d4b9e30 100644
--- a/utils/sym_check/linux_blacklist.txt
+++ b/utils/symcheck-blacklists/linux_blacklist.txt
diff --git a/utils/sym_check/osx_blacklist.txt b/utils/symcheck-blacklists/osx_blacklist.txt
index cfa911ed74e5..cfa911ed74e5 100644
--- a/utils/sym_check/osx_blacklist.txt
+++ b/utils/symcheck-blacklists/osx_blacklist.txt
diff --git a/www/atomic_design.html b/www/atomic_design.html
index 67021b8736e6..ab5ed6eb5f29 100644
--- a/www/atomic_design.html
+++ b/www/atomic_design.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/atomic_design_a.html b/www/atomic_design_a.html
index 8e9fef23f7ea..8175469b3515 100644
--- a/www/atomic_design_a.html
+++ b/www/atomic_design_a.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/atomic_design_b.html b/www/atomic_design_b.html
index 17ba9b3c1e37..78c7abd5127a 100644
--- a/www/atomic_design_b.html
+++ b/www/atomic_design_b.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/atomic_design_c.html b/www/atomic_design_c.html
index 9c92b8847045..b4319174aba8 100644
--- a/www/atomic_design_c.html
+++ b/www/atomic_design_c.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/cxx1y_status.html b/www/cxx1y_status.html
index f28d67a7dd3e..28fd23973896 100644
--- a/www/cxx1y_status.html
+++ b/www/cxx1y_status.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html
index bf470668b7f4..01ca3ee5096f 100644
--- a/www/cxx1z_status.html
+++ b/www/cxx1z_status.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
@@ -35,7 +35,8 @@
<h1>libc++ C++1z Status</h1>
<!--*********************************************************************-->
- <p>In November 2014, the C++ standard committee created a draft for the next version of the C++ standard, known here as "C++1z" (probably to be C++17)</p>
+ <p>In November 2014, the C++ standard committee created a draft for the next version of the C++ standard, known here as "C++1z" (probably to be C++17).</p>
+ <p>In February 2017, the C++ standard committee approved this draft, and sent it to ISO for approval as C++17</p>
<p>This page shows the status of libc++; the status of clang's support of the language features is <a href="http://clang.llvm.org/cxx_status.html#cxx17">here</a>.</p>
<p>The groups that have contributed papers:
@@ -55,14 +56,14 @@
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3911">N3911</a></td><td>LWG</td></td><td>TransformationTrait Alias <code>void_t</code>.</td><td>Urbana</td><td>Complete</td><td>3.6</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4089">N4089</a></td><td>LWG</td></td><td>Safe conversions in <code>unique_ptr&lt;T[]&gt;</code>.</td><td>Urbana</td><td>In progress</td><td>3.9</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4169">N4169</a></td><td>LWG</td></td><td>A proposal to add invoke function template</td><td>Urbana</td><td>Complete</td><td>3.7</td></tr>
- <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4190">N4190</a></td></td><td>LWG</td><td>Removing auto_ptr, random_shuffle(), And Old <functional> Stuff.</td><td>Urbana</td><td></td><td></td></tr>
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4190">N4190</a></td></td><td>LWG</td><td>Removing auto_ptr, random_shuffle(), And Old <functional> Stuff.</td><td>Urbana</td><td>In progress</td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4258">N4258</a></td><td>LWG</td></td><td>Cleaning-up noexcept in the Library.</td><td>Urbana</td><td>In progress</td><td>3.7</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4259">N4259</a></td><td>CWG</td></td><td>Wording for std::uncaught_exceptions</td><td>Urbana</td><td>Complete</td><td>3.7</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4277">N4277</a></td><td>LWG</td></td><td>TriviallyCopyable <code>reference_wrapper</code>.</td><td>Urbana</td><td>Complete</td><td>3.2</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4279">N4279</a></td><td>LWG</td></td><td>Improved insertion interface for unique-key maps.</td><td>Urbana</td><td>Complete</td><td>3.7</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4280">N4280</a></td><td>LWG</td></td><td>Non-member size() and more</td><td>Urbana</td><td>Complete</td><td>3.6</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4284">N4284</a></td><td>LWG</td></td><td>Contiguous Iterators.</td><td>Urbana</td><td>Complete</td><td>3.6</td></tr>
- <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4285">N4285</a></td><td>CWG</td></td><td>Cleanup for exception-specification and throw-expression.</td><td>Urbana</td><td></td><td></td></tr>
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4285">N4285</a></td><td>CWG</td></td><td>Cleanup for exception-specification and throw-expression.</td><td>Urbana</td><td>Complete</td><td>4.0</td></tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4387">N4387</a></td><td>LWG</td></td><td>improving pair and tuple</td><td>Lenexa</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4389">N4389</a></td><td>LWG</td></td><td>bool_constant</td><td>Lenexa</td><td>Complete</td><td>3.7</td></tr>
@@ -74,14 +75,14 @@
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0006r0.html">P0006R0</a></td><td>LWG</td><td>Adopt Type Traits Variable Templates for C++17.</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0092R1.html">P0092R1</a></td><td>LWG</td><td>Polishing &lt;chrono&gt;</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0007R1.html">P0007R1</a></td><td>LWG</td><td>Constant View: A proposal for a <tt>std::as_const</tt> helper function template.</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
- <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0156r0.html" >P0156R0</a></td><td>LWG</td><td>Variadic lock_guard(rev 3).</td><td>Kona</td><td>Complete (ABI V2 Only)</td><td>3.9</td></tr>
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0156r0.html" >P0156R0</a></td><td>LWG</td><td>Variadic lock_guard(rev 3).</td><td>Kona</td><td><I>Reverted in Kona</I></td><td>3.9</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0074R0.html">P0074R0</a></td><td>LWG</td><td>Making <tt>std::owner_less</tt> more flexible</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/P0013R1.html">P0013R1</a></td><td>LWG</td><td>Logical type traits rev 2</td><td>Kona</td><td>Complete</td><td>3.8</td></tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0024R2">P0024R2</a></td><td>LWG</td><td>The Parallelism TS Should be Standardized</td><td>Jacksonville</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0226R1">P0226R1</a></td><td>LWG</td><td>Mathematical Special Functions for C++17</td><td>Jacksonville</td><td></td><td></td></tr>
- <tr><td><a href="http://wg21.link/P0220R1">P0220R1</a></td><td>LWG</td><td>Adopt Library Fundamentals V1 TS Components for C++17</td><td>Jacksonville</td><td></td><td></td></tr>
- <tr><td><a href="http://wg21.link/P0218R1">P0218R1</a></td><td>LWG</td><td>Adopt the File System TS for C++17</td><td>Jacksonville</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0220R1">P0220R1</a></td><td>LWG</td><td>Adopt Library Fundamentals V1 TS Components for C++17</td><td>Jacksonville</td><td>In Progress</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0218R1">P0218R1</a></td><td>LWG</td><td>Adopt the File System TS for C++17</td><td>Jacksonville</td><td>In Progress</td><td></td></tr>
<tr><td><a href="http://wg21.link/P0033R1">P0033R1</a></td><td>LWG</td><td>Re-enabling shared_from_this</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
<tr><td><a href="http://wg21.link/P0005R4">P0005R4</a></td><td>LWG</td><td>Adopt not_fn from Library Fundamentals 2 for C++17</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
<tr><td><a href="http://wg21.link/P0152R1">P0152R1</a></td><td>LWG</td><td>constexpr atomic::is_always_lock_free</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
@@ -105,7 +106,7 @@
<tr><td><a href="http://wg21.link/p0174r2">p0174r2</a></td><td>LWG</td><td>Deprecating Vestigial Library Parts in C++17</td><td>Oulu</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/p0175r1">p0175r1</a></td><td>LWG</td><td>Synopses for the C library</td><td>Oulu</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/p0180r2">p0180r2</a></td><td>LWG</td><td>Reserve a New Library Namespace for Future Standardization</td><td>Oulu</td><td><i>Nothing to do</i></td><td>n/a</td></tr>
- <tr><td><a href="http://wg21.link/p0181r1">p0181r1</a></td><td>LWG</td><td>Ordered by Default</td><td>Oulu</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/p0181r1">p0181r1</a></td><td>LWG</td><td>Ordered by Default</td><td>Oulu</td><td><i>Removed in Kona</i></td><td>n/a</td></tr>
<tr><td><a href="http://wg21.link/p0209r2">p0209r2</a></td><td>LWG</td><td>make_from_tuple: apply for construction</td><td>Oulu</td><td>Complete</td><td>3.9</td></tr>
<tr><td><a href="http://wg21.link/p0219r1">p0219r1</a></td><td>LWG</td><td>Relative Paths for Filesystem</td><td>Oulu</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/p0254r2">p0254r2</a></td><td>LWG</td><td>Integrating std::string_view and std::string</td><td>Oulu</td><td>Complete</td><td>4.0</td></tr>
@@ -122,12 +123,12 @@
<tr><td><a href="http://wg21.link/p0393r3">p0393r3</a></td><td>LWG</td><td>Making Variant Greater Equal</td><td>Oulu</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0394r4">P0394r4</a></td><td>LWG</td><td>Hotel Parallelifornia: terminate() for Parallel Algorithms Exception Handling</td><td>Oulu</td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
- <tr><td><a href="http://wg21.link/P0003R5">P0003R5</a></td><td>LWG</td><td>Removing Deprecated Exception Specifications from C++17</td><td>Issaquah</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0003R5">P0003R5</a></td><td>LWG</td><td>Removing Deprecated Exception Specifications from C++17</td><td>Issaquah</td><td>Complete</td><td>5.0</td></tr>
<tr><td><a href="http://wg21.link/P0067R5">P0067R5</a></td><td>LWG</td><td>Elementary string conversions, revision 5</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0403R1">P0403R1</a></td><td>LWG</td><td>Literal suffixes for <tt>basic_string_view</tt></td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0414R2">P0414R2</a></td><td>LWG</td><td>Merging shared_ptr changes from Library Fundamentals to C++17</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0418R2">P0418R2</a></td><td>LWG</td><td>Fail or succeed: there is no atomic lattice</td><td>Issaquah</td><td></td><td></td></tr>
- <tr><td><a href="http://wg21.link/P0426R1">P0426R1</a></td><td>LWG</td><td>Constexpr for <tt>std::char_traits</tt></td><td>Issaquah</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0426R1">P0426R1</a></td><td>LWG</td><td>Constexpr for <tt>std::char_traits</tt></td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0435R1">P0435R1</a></td><td>LWG</td><td>Resolving LWG Issues re <tt>common_type</tt></td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0502R0">P0502R0</a></td><td>LWG</td><td>Throwing out of a parallel algorithm terminates - but how?</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0503R0">P0503R0</a></td><td>LWG</td><td>Correcting library usage of "literal type"</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
@@ -136,10 +137,30 @@
<tr><td><a href="http://wg21.link/P0508R0">P0508R0</a></td><td>LWG</td><td>Wording for GB 58 - structured bindings for node_handles</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0509R1">P0509R1</a></td><td>LWG</td><td>Updating “Restrictions on exception handlingâ€</td><td>Issaquah</td><td><i>Nothing to do</i></td><td>n/a</td></tr>
<tr><td><a href="http://wg21.link/P0510R0">P0510R0</a></td><td>LWG</td><td>Disallowing references, incomplete types, arrays, and empty variants</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
- <tr><td><a href="http://wg21.link/P0513R0">P0513R0</a></td><td>LWG</td><td>Poisoning the Hash</td><td>Issaquah</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0513R0">P0513R0</a></td><td>LWG</td><td>Poisoning the Hash</td><td>Issaquah</td><td>Complete</td><td>5.0</td></tr>
<tr><td><a href="http://wg21.link/P0516R0">P0516R0</a></td><td>LWG</td><td>Clarify That shared_future’s Copy Operations have Wide Contracts</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0517R0">P0517R0</a></td><td>LWG</td><td>Make future_error Constructible</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0521R0">P0521R0</a></td><td>LWG</td><td>Proposed Resolution for CA 14 (shared_ptr use_count/unique)</td><td>Issaquah</td><td><i>Nothing to do</i></td><td>n/a</td></tr>
+ <tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0156R2">P0156R2</a></td><td>LWG</td><td>Variadic Lock guard(rev 5)</td><td>Kona</td><td>Complete</td><td>5.0</td></tr>
+ <tr><td><a href="http://wg21.link/P0270R3">P0270R3</a></td><td>CWG</td><td>Removing C dependencies from signal handler wording</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0298R3">P0298R3</a></td><td>CWG</td><td>A byte type definition</td><td>Kona</td><td>Complete</td><td>5.0</td></tr>
+ <tr><td><a href="http://wg21.link/P0317R1">P0317R1</a></td><td>LWG</td><td>Directory Entry Caching for Filesystem</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0430R2">P0430R2</a></td><td>LWG</td><td>File system library on non-POSIX-like operating systems</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0433R2">P0433R2</a></td><td>LWG</td><td>Toward a resolution of US7 and US14: Integrating template deduction for class templates into the standard library</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0452R1">P0452R1</a></td><td>LWG</td><td>Unifying &lt;numeric&gt; Parallel Algorithms</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0467R2">P0467R2</a></td><td>LWG</td><td>Iterator Concerns for Parallel Algorithms</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0492R2">P0492R2</a></td><td>LWG</td><td>Proposed Resolution of C++17 National Body Comments for Filesystems</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0518R1">P0518R1</a></td><td>LWG</td><td>Allowing copies as arguments to function objects given to parallel algorithms in response to CH11</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0523R1">P0523R1</a></td><td>LWG</td><td>Wording for CH 10: Complexity of parallel algorithms</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0548R1">P0548R1</a></td><td>LWG</td><td>common_type and duration</td><td>Kona</td><td>Complete</td><td>5.0</td></tr>
+ <tr><td><a href="http://wg21.link/P0558R1">P0558R1</a></td><td>LWG</td><td>Resolving atomic&lt;T&gt; named base class inconsistencies</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0574R1">P0574R1</a></td><td>LWG</td><td>Algorithm Complexity Constraints and Parallel Overloads</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0599R1">P0599R1</a></td><td>LWG</td><td>noexcept for hash functions</td><td>Kona</td><td>Complete</td><td>5.0</td></tr>
+ <tr><td><a href="http://wg21.link/P0604R0">P0604R0</a></td><td>LWG</td><td>Resolving GB 55, US 84, US 85, US 86</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0607R0">P0607R0</a></td><td>LWG</td><td>Inline Variables for the Standard Library</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0618R0">P0618R0</a></td><td>LWG</td><td>Deprecating &lt;codecvt&gt;</td><td>Kona</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0623R0">P0623R0</a></td><td>LWG</td><td>Final C++17 Parallel Algorithms Fixes</td><td>Kona</td><td></td><td></td></tr>
<!-- <tr><td></td><td></td><td></td><td></td><td></td><td></td></tr> -->
</table>
@@ -332,7 +353,7 @@
<tr><td><a href="http://wg21.link/LWG2726">2726</a></td><td>[recursive_]directory_iterator::increment(error_code&) is underspecified</td><td>Oulu</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2727">2727</a></td><td>Parallel algorithms with constexpr specifier</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2728">2728</a></td><td>status(p).permissions() and symlink_status(p).permissions() are not specified</td><td>Oulu</td><td>Complete</td></tr>
-<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
+ <tr><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2062">2062</a></td><td>Effect contradictions w/o no-throw guarantee of std::function swaps</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2166">2166</a></td><td>Heap property underspecified?</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2221">2221</a></td><td>No formatted output operator for nullptr</td><td>Issaquah</td><td></td></tr>
@@ -356,7 +377,7 @@
<tr><td><a href="http://wg21.link/LWG2540">2540</a></td><td>unordered_multimap::insert hint iterator</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2543">2543</a></td><td>LWG 2148 (hash support for enum types) seems under-specified</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2544">2544</a></td><td>istreambuf_iterator(basic_streambuf<charT, traits>* s) effects unclear when s is 0</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2556">2556</a></td><td>Wide contract for future::share()</td><td>Issaquah</td><td>Patch ready</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2556">2556</a></td><td>Wide contract for future::share()</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2562">2562</a></td><td>Consistent total ordering of pointers by comparison functors</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2567">2567</a></td><td>Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2568">2568</a></td><td>[fund.ts.v2] Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits</td><td>Issaquah</td><td></td></tr>
@@ -369,7 +390,7 @@
<tr><td><a href="http://wg21.link/LWG2591">2591</a></td><td>std::function's member template target() should not lead to undefined behaviour</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2598">2598</a></td><td>addressof works on temporaries</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2664">2664</a></td><td>operator/ (and other append) semantics not useful if argument has root</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Issaquah</td><td>See Below</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2672">2672</a></td><td>Should is_empty use error_code in its specification?</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2678">2678</a></td><td>std::filesystem enum classes overspecified</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2679">2679</a></td><td>Inconsistent Use of Effects and Equivalent To</td><td>Issaquah</td><td>Complete</td></tr>
@@ -384,9 +405,9 @@
<tr><td><a href="http://wg21.link/LWG2722">2722</a></td><td>equivalent incorrectly specifies throws clause</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2729">2729</a></td><td>Missing SFINAE on std::pair::operator=</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2732">2732</a></td><td>Questionable specification of path::operator/= and path::append</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2733">2733</a></td><td>[fund.ts.v2] gcd / lcm and bool</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2733">2733</a></td><td>[fund.ts.v2] gcd / lcm and bool</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2735">2735</a></td><td>std::abs(short), std::abs(signed char) and others should return int instead of double in order to be compatible with C++98 and C</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2736">2736</a></td><td>nullopt_t insufficiently constrained</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2736">2736</a></td><td>nullopt_t insufficiently constrained</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2738">2738</a></td><td>is_constructible with void types</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2739">2739</a></td><td>Issue with time_point non-member subtraction with an unsigned duration</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2740">2740</a></td><td>constexpr optional<T>::operator-></td><td>Issaquah</td><td>Complete</td></tr>
@@ -400,24 +421,75 @@
<tr><td><a href="http://wg21.link/LWG2752">2752</a></td><td>"Throws:" clauses of async and packaged_task are unimplementable</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2755">2755</a></td><td>[string.view.io] uses non-existent basic_string_view::to_string function</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2756">2756</a></td><td>C++ WP optional<T> should 'forward' T's implicit conversions</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2758">2758</a></td><td>std::string{}.assign("ABCDE", 0, 1) is ambiguous</td><td>Complete</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2758">2758</a></td><td>std::string{}.assign("ABCDE", 0, 1) is ambiguous</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2759">2759</a></td><td>gcd / lcm and bool for the WP</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2760">2760</a></td><td>non-const basic_string::data should not invalidate iterators</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2765">2765</a></td><td>Did LWG 1123 go too far?</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2765">2765</a></td><td>Did LWG 1123 go too far?</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2767">2767</a></td><td>not_fn call_wrapper can form invalid types</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2769">2769</a></td><td>Redundant const in the return type of any_cast(const any&)</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2771">2771</a></td><td>Broken Effects of some basic_string::compare functions in terms of basic_string_view</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2773">2773</a></td><td>Making std::ignore constexpr</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2773">2773</a></td><td>Making std::ignore constexpr</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2777">2777</a></td><td>basic_string_view::copy should use char_traits::copy</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="http://wg21.link/LWG2778">2778</a></td><td>basic_string_view is missing constexpr</td><td>Issaquah</td><td></td></tr>
-
+ <tr><td><a href="http://wg21.link/LWG2778">2778</a></td><td>basic_string_view is missing constexpr</td><td>Issaquah</td><td>Complete</td></tr>
+ <tr><td></td><td></td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2260">2260</a></td><td>Missing requirement for Allocator::pointer</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2676">2676</a></td><td>Provide filesystem::path overloads for File-based streams</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2768">2768</a></td><td>any_cast and move semantics</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2769">2769</a></td><td>Redundant const in the return type of any_cast(const any&amp;)</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2781">2781</a></td><td>Contradictory requirements for std::function and std::reference_wrapper</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2782">2782</a></td><td>scoped_allocator_adaptor constructors must be constrained</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2784">2784</a></td><td>Resolution to LWG 2484 is missing "otherwise, no effects" and is hard to parse</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2785">2785</a></td><td>quoted should work with basic_string_view</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2786">2786</a></td><td>Annex C should mention shared_ptr changes for array support</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2787">2787</a></td><td>&sect;[file_status.cons] doesn't match class definition</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2788">2788</a></td><td>basic_string range mutators unintentionally require a default constructible allocator</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2789">2789</a></td><td>Equivalence of contained objects</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2790">2790</a></td><td>Missing specification of istreambuf_iterator::operator-&gt;</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2794">2794</a></td><td>Missing requirements for allocator pointers</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2795">2795</a></td><td>&sect;[global.functions] provides incorrect example of ADL use</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2796">2796</a></td><td>tuple should be a literal type</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2801">2801</a></td><td>Default-constructibility of unique_ptr</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2802">2802</a></td><td>shared_ptr constructor requirements for a deleter</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2804">2804</a></td><td>Unconditional constexpr default constructor for istream_iterator</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2806">2806</a></td><td>Base class of bad_optional_access</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2807">2807</a></td><td>std::invoke should use std::is_nothrow_callable</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2812">2812</a></td><td>Range access is available with &lt;string_view&gt;</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2824">2824</a></td><td>list::sort should say that the order of elements is unspecified if an exception is thrown</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2826">2826</a></td><td>string_view iterators use old wording</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2834">2834</a></td><td>Resolution LWG 2223 is missing wording about end iterators</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2835">2835</a></td><td>LWG 2536 seems to misspecify &lt;tgmath.h&gt;</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2837">2837</a></td><td>gcd and lcm should support a wider range of input values</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2838">2838</a></td><td>is_literal_type specification needs a little cleanup</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2842">2842</a></td><td>in_place_t check for optional::optional(U&amp;&amp;) should decay U</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2850">2850</a></td><td>std::function move constructor does unnecessary work</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2853">2853</a></td><td>Possible inconsistency in specification of erase in [vector.modifiers]</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2855">2855</a></td><td>std::throw_with_nested("string_literal")</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2857">2857</a></td><td>{variant,optional,any}::emplace should return the constructed value</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2861">2861</a></td><td>basic_string should require that charT match traits::char_type</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2866">2866</a></td><td>Incorrect derived classes constraints</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2868">2868</a></td><td>Missing specification of bad_any_cast::what()</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2872">2872</a></td><td>Add definition for direct-non-list-initialization</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2873">2873</a></td><td>Add noexcept to several shared_ptr related functions</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2874">2874</a></td><td>Constructor shared_ptr::shared_ptr(Y*) should be constrained</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2875">2875</a></td><td>shared_ptr::shared_ptr(Y*, D, [&hellip;]) constructors should be constrained</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2876">2876</a></td><td>shared_ptr::shared_ptr(const weak_ptr&lt;Y&gt;&amp;) constructor should be constrained</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2878">2878</a></td><td>Missing DefaultConstructible requirement for istream_iterator default constructor</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2890">2890</a></td><td>The definition of 'object state' applies only to class types</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2900">2900</a></td><td>The copy and move constructors of optional are not constexpr</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2903">2903</a></td><td>The form of initialization for the emplace-constructors is not specified</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2904">2904</a></td><td>Make variant move-assignment more exception safe</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2905">2905</a></td><td>is_constructible_v&lt;unique_ptr&lt;P, D&gt;, P, D const &amp;&gt; should be false when D is not copy constructible</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2908">2908</a></td><td>The less-than operator for shared pointers could do more</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2911">2911</a></td><td>An is_aggregate type trait is needed</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2921">2921</a></td><td>packaged_task and type-erased allocators</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2934">2934</a></td><td>optional&lt;const T&gt; doesn't compare with T</td><td>Kona</td><td>Complete</td></tr>
<!--
<tr><td><a href="http://wg21.link/LWG1214">1214</a></td><td>Insufficient/inconsistent key immutability requirements for associative containers</td><td>Urbana</td><td></td></tr>
-->
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 4-Jan-2017</p>
+ <p>Last Updated: 13-Apr-2017</p>
</div>
</body>
</html>
diff --git a/www/index.html b/www/index.html
index 6b464ebec4e6..5dc13858d400 100644
--- a/www/index.html
+++ b/www/index.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/ts1z_status.html b/www/ts1z_status.html
index 4c460c5d1497..48ce4542d38c 100644
--- a/www/ts1z_status.html
+++ b/www/ts1z_status.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/type_traits_design.html b/www/type_traits_design.html
index 422bba4a7f5f..2c7f73b500ef 100644
--- a/www/type_traits_design.html
+++ b/www/type_traits_design.html
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html
index 3b1a4d02ab0a..90a192828e57 100644
--- a/www/upcoming_meeting.html
+++ b/www/upcoming_meeting.html
@@ -3,7 +3,7 @@
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>libc++ Upcoming Meeting Status</title>
<link type="text/css" rel="stylesheet" href="menu.css">
<link type="text/css" rel="stylesheet" href="content.css">
@@ -24,7 +24,7 @@
<label>Quick Links</label>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
- <a href="http://llvm.org/bugs/">Bug Reports</a>
+ <a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
</div>
@@ -59,163 +59,71 @@
<table id="issues" border="1">
<tr><th>Issue #</th><th>Issue Name</th><th>Meeting</th><th>Status</th></tr>
- <tr><td><a href="http://wg21.link/LWG2062">2062</a></td><td>Effect contradictions w/o no-throw guarantee of std::function swaps</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2166">2166</a></td><td>Heap property underspecified?</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2221">2221</a></td><td>No formatted output operator for nullptr</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2223">2223</a></td><td>shrink_to_fit effect on iterator validity</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2261">2261</a></td><td>Are containers required to use their 'pointer' type internally?</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2394">2394</a></td><td>locale::name specification unclear - what is implementation-defined?</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2460">2460</a></td><td>LWG issue 2408 and value categories</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2468">2468</a></td><td>Self-move-assignment of library types</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2475">2475</a></td><td>Allow overwriting of std::basic_string terminator with charT() to allow cleaner interoperation with legacy APIs</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2503">2503</a></td><td>multiline option should be added to syntax_option_type</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2510">2510</a></td><td>Tag types should not be DefaultConstructible</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2514">2514</a></td><td>Type traits must not be final</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2519">2519</a></td><td>Iterator operator-= has gratuitous undefined behaviour</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2531">2531</a></td><td>future::get should explicitly state that the shared state is released</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2534">2534</a></td><td>Constrain rvalue stream operators</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2536">2536</a></td><td>What should &lt;complex.h&gt; do?</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2540">2540</a></td><td>unordered_multimap::insert hint iterator</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2543">2543</a></td><td>LWG 2148 (hash support for enum types) seems under-specified</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2544">2544</a></td><td>istreambuf_iterator(basic_streambuf<charT, traits>* s) effects unclear when s is 0</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2556">2556</a></td><td>Wide contract for future::share()</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2562">2562</a></td><td>Consistent total ordering of pointers by comparison functors</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2567">2567</a></td><td>Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2569">2569</a></td><td>conjunction and disjunction requirements are too strict</td><td>Issaquah</td><td>Nothing to do.</td></tr>
- <tr><td><a href="http://wg21.link/LWG2570">2570</a></td><td>[fund.ts.v2] conjunction and disjunction requirements are too strict</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2578">2578</a></td><td>Iterator requirements should reference iterator traits</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2584">2584</a></td><td><regex> ECMAScript IdentityEscape is ambiguous</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2589">2589</a></td><td>match_results can't satisfy the requirements of a container</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2591">2591</a></td><td>std::function's member template target() should not lead to undefined behaviour</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2598">2598</a></td><td>addressof works on temporaries</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2664">2664</a></td><td>operator/ (and other append) semantics not useful if argument has root</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Issaquah</td><td>See Below</td></tr>
- <tr><td><a href="http://wg21.link/LWG2672">2672</a></td><td>Should is_empty use error_code in its specification?</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2678">2678</a></td><td>std::filesystem enum classes overspecified</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2679">2679</a></td><td>Inconsistent Use of Effects and Equivalent To</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2680">2680</a></td><td>Add "Equivalent to" to filesystem</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2681">2681</a></td><td>filesystem::copy() cannot copy symlinks</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2682">2682</a></td><td>filesystem::copy() won't create a symlink to a directory</td><td>Issaquah</td><td>Implemented in trunk</td></tr>
- <tr><td><a href="http://wg21.link/LWG2686">2686</a></td><td>Why is std::hash specialized for error_code, but not error_condition?</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2694">2694</a></td><td>Application of LWG 436 accidentally deleted definition of "facet"</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2696">2696</a></td><td>Interaction between make_shared and enable_shared_from_this is underspecified</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2699">2699</a></td><td>Missing restriction in [numeric.requirements]</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2712">2712</a></td><td>copy_file(from, to, ...) has a number of unspecified error conditions</td><td>Issaquah</td><td>Implemented in trunk</td></tr>
- <tr><td><a href="http://wg21.link/LWG2722">2722</a></td><td>equivalent incorrectly specifies throws clause</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2729">2729</a></td><td>Missing SFINAE on std::pair::operator=</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2732">2732</a></td><td>Questionable specification of path::operator/= and path::append</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2733">2733</a></td><td>[fund.ts.v2] gcd / lcm and bool</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2735">2735</a></td><td>std::abs(short), std::abs(signed char) and others should return int instead of double in order to be compatible with C++98 and C</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2736">2736</a></td><td>nullopt_t insufficiently constrained</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2738">2738</a></td><td>is_constructible with void types</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2739">2739</a></td><td>Issue with time_point non-member subtraction with an unsigned duration</td><td>Issaquah</td><td>Patch Ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2740">2740</a></td><td>constexpr optional<T>::operator-></td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2742">2742</a></td><td>Inconsistent string interface taking string_view</td><td>Issaquah</td><td>Patch Ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2744">2744</a></td><td>any's in_place constructors</td><td>Issaquah</td><td>Implemented in trunk</td></tr>
- <tr><td><a href="http://wg21.link/LWG2745">2745</a></td><td>[fund.ts.v2] Implementability of LWG 2451</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2747">2747</a></td><td>Possibly redundant std::move in [alg.foreach]</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2748">2748</a></td><td>swappable traits for optionals</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2749">2749</a></td><td>swappable traits for variants</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2750">2750</a></td><td>[fund.ts.v2] LWG 2451 conversion constructor constraint</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2752">2752</a></td><td>"Throws:" clauses of async and packaged_task are unimplementable</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2753">2753</a></td><td>Optional's constructors and assignments need constraints</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2754">2754</a></td><td>The in_place constructors and emplace functions added by P0032R3 don't require CopyConstructible</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2755">2755</a></td><td>§[string.view.io] uses non-existent basic_string_view::to_string function</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2756">2756</a></td><td>C++ WP optional<T> should 'forward' T's implicit conversions</td><td>Issaquah</td><td>Implemented in trunk</td></tr>
- <tr><td><a href="http://wg21.link/LWG2758">2758</a></td><td>std::string{}.assign("ABCDE", 0, 1) is ambiguous</td><td>We already do this</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2759">2759</a></td><td>gcd / lcm and bool for the WP</td><td>Issaquah</td><td>Patch ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2760">2760</a></td><td>non-const basic_string::data should not invalidate iterators</td><td>Issaquah</td><td>Nothing to do</td></tr>
- <tr><td><a href="http://wg21.link/LWG2765">2765</a></td><td>Did LWG 1123 go too far?</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2767">2767</a></td><td>not_fn call_wrapper can form invalid types</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2768">2768</a></td><td>any_cast and move semantics</td><td>Issaquah</td><td>Resolved by LWG 2769</td></tr>
- <tr><td><a href="http://wg21.link/LWG2769">2769</a></td><td>Redundant const in the return type of any_cast(const any&)</td><td>Issaquah</td><td>Implemented in trunk</td></tr>
- <tr><td><a href="http://wg21.link/LWG2771">2771</a></td><td>Broken Effects of some basic_string::compare functions in terms of basic_string_view</td><td>Issaquah</td><td>We already do this</td></tr>
- <tr><td><a href="http://wg21.link/LWG2773">2773</a></td><td>Making std::ignore constexpr</td><td>Issaquah</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2777">2777</a></td><td>basic_string_view::copy should use char_traits::copy</td><td>Issaquah</td><td>Patch Ready</td></tr>
- <tr><td><a href="http://wg21.link/LWG2778">2778</a></td><td>basic_string_view is missing constexpr</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2260">2260</a></td><td>Missing requirement for Allocator::pointer</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2768">2768</a></td><td>any_cast and move semantics</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2769">2769</a></td><td>Redundant const in the return type of any_cast(const any&amp;)</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2781">2781</a></td><td>Contradictory requirements for std::function and std::reference_wrapper</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2782">2782</a></td><td>scoped_allocator_adaptor constructors must be constrained</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2784">2784</a></td><td>Resolution to LWG 2484 is missing "otherwise, no effects" and is hard to parse</td><td>Kona</td><td><i>Patch Ready</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2785">2785</a></td><td>quoted should work with basic_string_view</td><td>Kona</td><td><i>We do this already</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2786">2786</a></td><td>Annex C should mention shared_ptr changes for array support</td><td>Kona</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2787">2787</a></td><td>&sect;[file_status.cons] doesn't match class definition</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2789">2789</a></td><td>Equivalence of contained objects</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2794">2794</a></td><td>Missing requirements for allocator pointers</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2795">2795</a></td><td>&sect;[global.functions] provides incorrect example of ADL use</td><td>Kona</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2804">2804</a></td><td>Unconditional constexpr default constructor for istream_iterator</td><td>Kona</td><td><i>We do this already</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2812">2812</a></td><td>Range access is available with &lt;string_view&gt;</td><td>Kona</td><td><i>We do this already</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2824">2824</a></td><td>list::sort should say that the order of elements is unspecified if an exception is thrown</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2826">2826</a></td><td>string_view iterators use old wording</td><td>Kona</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2834">2834</a></td><td>Resolution LWG 2223 is missing wording about end iterators</td><td>Kona</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2835">2835</a></td><td>LWG 2536 seems to misspecify &lt;tgmath.h&gt;</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2837">2837</a></td><td>gcd and lcm should support a wider range of input values</td><td>Kona</td><td><i>We do this already</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2838">2838</a></td><td>is_literal_type specification needs a little cleanup</td><td>Kona</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2842">2842</a></td><td>in_place_t check for optional::optional(U&amp;&amp;) should decay U</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2850">2850</a></td><td>std::function move constructor does unnecessary work</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2853">2853</a></td><td>Possible inconsistency in specification of erase in [vector.modifiers]</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2855">2855</a></td><td>std::throw_with_nested("string_literal")</td><td>Kona</td><td></td></tr>
+
+ <tr><td></td><td><center><b>Priority 1 Bugs</b></center></td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Kona</td><td>We do this already</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2806">2806</a></td><td>Base class of bad_optional_access</td><td>Kona</td><td><i>We do this already</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2857">2857</a></td><td>{variant,optional,any}::emplace should return the constructed value</td><td>Kona</td><td></td></tr>
+
</table>
<h3>Comments about the issues</h3>
<ul>
-<li>2062 - We already do this; added some tests to make sure we keep doing so.</li>
-<li>2166 - I <b>suspect</b> that this is just better specification of the existing structure. Probably need more tests for this.</li>
-<li>2221 - Patch and tests ready</li>
-<li>2223 - This is just wording cleanup. </li>
-<li>2261 - <b>Survey our containers to make sure we do this.</b> Ideally, this will result in no code changes.</li>
-<li>2394 - This is just wording cleanup.</li>
-<li>2460 - This is just wording cleanup.</li>
-<li>2468 - <i>I think we already do this; but will need to survey the libray to be sure</i></li>
-<li>2475 - Nothing to do here. </li>
-<li>2503 - </li>
-<li>2510 - <b>Need to write tests for all the tag types</b></li>
-<li>2514 - Nothing to do; We don't mark any of the type traits as final. </li>
-<li>2519 - This is just wording cleanup. </li>
-<li>2531 - This <b>should be</b> just wording cleanup. </li>
-<li>2534 - </li>
-<li>2536 - We already do this. </li>
-<li>2540 - We already do this, and have tests for it.</li>
-<li>2543 - </li>
-<li>2544 - We already do this; I've added tests to make sure we keep doing so</li>
-<li>2556 - Patch and tests ready</li>
-<li>2562 - I <b>suspect</b> that this is just better specification of the existing structure. Probably need more tests for this.</li>
-<li>2567 - This is just wording cleanup.</li>
-<li>2569 - This is just wording cleanup.</li>
-<li>2570 - Same as 2569, but applied to LFTS</li>
-<li>2578 - This is just wording cleanup. </li>
-<li>2584 - </li>
-<li>2589 - This is just wording cleanup. </li>
-<li>2591 - I <b>suspect</b> that this is just better specification of the existing structure. Probably need more tests for this.</li>
-<li>2598 - Patch and tests ready</li>
-<li>2664 - No change needed. _LIBCPP_DEBUG mode tests the new requirements.</li>
-<li>2665 - PR is incorrect as-is. We implement a modified version</li>
-<li>2672 - Patch and tests in tree. </li>
-<li>2678 - No change needed. Mostly wording cleanup. </li>
-<li>2679 - This is just wording cleanup. </li>
-<li>2680 - This is just wording cleanup. </li>
-<li>2681 - LGTM </li>
-<li>2682 - Current PR is incorrect. A modified version has been implemented</li>
-<li>2686 - Patch and tests ready</li>
-<li>2694 - Restoring inadvertently deleted text. No code changes needed.</li>
-<li>2696 - I <b>suspect</b> that this is just better specification of the existing structure. Probably need more tests for this.</li>
-<li>2699 - I don't think this requires any code changes; look more closely.</li>
-<li>2712 - LGTM. </li>
-<li>2722 - LGTM </li>
-<li>2729 - </li>
-<li>2732 - Our implementation is already equivalent. </li>
-<li>2733 - LFTS; same as 2759</li>
-<li>2735 - I <b>suspect</b> that this is just better specification of the existing structure. Probably need more tests for this.</li>
-<li>2736 - </li>
-<li>2738 - We already do this; I added tests for cv-void</li>
-<li>2739 - Patch and tests ready</li>
-<li>2740 - <i>std::optional</i>: The resolution LGTM. </li>
-<li>2742 - Patch and tests ready</li>
-<li>2744 - <i>std::any</i>: We already do this. We also check for a decayed in_place_type_t. </li>
-<li>2745 - <i>std::optional</i> for LFTS -- should be considered for C++17</li>
-<li>2747 - Patch ready, but I can't think of any way to test it.</li>
-<li>2748 - <i>std::optional</i>: LGTM. </li>
-<li>2749 - <i>std::variant</i></li>
-<li>2750 - <i>std::optional</i> for LFTS -- should be considered for C++17</li>
-<li>2752 - </li>
-<li>2753 - <i>std::optional</i>: LGTM. </li>
-<li>2754 - <i>std::any</i>: LGTM. </li>
-<li>2755 - Both string and string_view call a common routine for output; so no code changes needed.</li>
-<li>2756 - <i>std::optional</i>: Very large change. It is fully implemented and tested. </li>
-<li>2758 - We already do this. </li>
-<li>2759 - Patch and tests ready</li>
-<li>2760 - This is just wording cleanup; no code or test changes needed.</li>
-<li>2765 - is this just wording cleanup????? I don't think this actually requires code changes. </li>
-<li>2767 - The test case on the issue is incorrect. See not_fn.pass.cpp for the correct test case. </li>
-<li>2768 - <i>std::any</i>: There is no PR for this issue. It is resolved by LWG 2769. </li>
-<li>2769 - <i>std::any</i>: The PR looks good except that
- <code>remove_reference_t&lt;remove_cv_t&lt;T&gt;&gt;</code> should read
- <code>remove_cv_t&lt;remove_reference_t&lt;T&gt;&gt;</code>. </li>
-<li>2771 - We already do this.</li>
-<li>2773 - </li>
-<li>2777 - Patch ready; existing tests should suffice</li>
-<li>2778 - This is mostly tests.</li>
+<li>2260 - Check our current allocators to make sure we do this</li>
+<li>2768 - Resolution is "apply 2769"</li>
+<li>2769 - This should be easy; trick will be devising tests.</li>
+<li>2781 - </li>
+<li>2782 - Looks straightforward.</li>
+<li>2784 - Patch Ready</li>
+<li>2785 - We do this already.</li>
+<li>2786 - Nothing to do; just moving words around</li>
+<li>2787 - Eric? </li>
+<li>2789 - I don't think there are any code changes required here</li>
+<li>2794 - I don't think there are any code changes required here - maybe a static_assert.</li>
+<li>2795 - Nothing to do; just moving words around</li>
+<li>2804 - We do this already.</li>
+<li>2812 - We do this already.</li>
+<li>2824 - Nothing do to here, but we should add some throwing sort tests.</li>
+<li>2826 - Nothing to do; just moving words around</li>
+<li>2834 - Nothing to do; just moving words around</li>
+<li>2835 - I'm pretty sure we already do this.</li>
+<li>2837 - Added some tests to ensure we do this already.</li>
+<li>2838 - Nothing to do; just moving words around</li>
+<li>2842 - This should be easy; trick will be devising tests.</li>
+<li>2850 - I think we already do this.</li>
+<li>2853 - I think that this will be mostly adding tests.</li>
+<li>2855 - This should be easy; trick will be devising tests.</li></li>
+<li></li>
+<li>2665 - We do this already.</li>
+<li>2806 - We do this already.</li>
+<li>2857 - This is the subject of several NB comments.</li>
</ul>
-<p>Last Updated: 10-Oct-2016</p>
+<p>Last Updated: 7-Feb-2017</p>
</div>
</body>
</html>