summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-01-15 14:32:55 -0800
committerDan Albert <danalbert@google.com>2015-01-15 14:32:55 -0800
commit4dc5b2198d1aa4ab585a3d4a87ee9626d681f9f7 (patch)
treee878e720bd2667cc9ea365b6e6cb324539d15b76
parent2b3c63f7049d05a7affe265fed13516d16e6810e (diff)
downloadexternal_libcxx-4dc5b2198d1aa4ab585a3d4a87ee9626d681f9f7.tar.gz
external_libcxx-4dc5b2198d1aa4ab585a3d4a87ee9626d681f9f7.tar.bz2
external_libcxx-4dc5b2198d1aa4ab585a3d4a87ee9626d681f9f7.zip
Merge to upstream r226192.
Change-Id: Id459c8ce0d7dec371ff4d064ee2c71f6b7178e63
-rw-r--r--include/__locale2
-rw-r--r--include/atomic18
-rw-r--r--include/cstdio18
-rw-r--r--include/regex4
-rw-r--r--include/type_traits4
-rw-r--r--test/CMakeLists.txt3
-rw-r--r--test/libcxx/test/config.py157
-rw-r--r--test/lit.site.cfg.in3
-rw-r--r--test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp1
-rw-r--r--test/std/containers/sequences/vector.bool/vector_bool.pass.cpp5
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp1
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp1
-rw-r--r--test/std/containers/sequences/vector/vector.special/swap.pass.cpp1
-rw-r--r--test/std/depr/depr.c.headers/stdint_h.pass.cpp1
-rw-r--r--test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp4
-rw-r--r--test/std/experimental/string.view/string.view.hash/string_view.pass.cpp4
-rw-r--r--test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp2
-rw-r--r--test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp1
-rw-r--r--test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp2
-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/types.pass.cpp4
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp3
-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/locales/locale/locale.types/locale.category/category.pass.cpp4
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign.pass.cpp9
-rw-r--r--test/std/re/re.traits/translate_nocase.pass.cpp4
-rw-r--r--test/std/strings/basic.string.hash/strings.pass.cpp4
-rw-r--r--test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp1
-rw-r--r--test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp1
-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/thread/futures/futures.future_error/what.pass.cpp6
-rw-r--r--test/std/thread/futures/test_allocator.h1
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp2
-rw-r--r--test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp1
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp3
-rw-r--r--test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp3
-rw-r--r--test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/equal_to.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/greater.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/less.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/less_equal.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp117
-rw-r--r--test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp3
-rw-r--r--test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/negators/binary_negate.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/negators/unary_negate.pass.cpp3
-rw-r--r--test/std/utilities/function.objects/unord.hash/enum.pass.cpp7
-rw-r--r--test/std/utilities/function.objects/unord.hash/floating.pass.cpp8
-rw-r--r--test/std/utilities/function.objects/unord.hash/integral.pass.cpp8
-rw-r--r--test/std/utilities/function.objects/unord.hash/pointer.pass.cpp8
-rw-r--r--test/std/utilities/memory/unique.ptr/deleter.h1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move03.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move04.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert01.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert02.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert03.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert04.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert05.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert06.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert07.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert08.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move_convert09.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert04.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert05.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert06.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert13.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.pass.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert09.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert10.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert12.fail.cpp1
-rw-r--r--test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp1
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp4
-rw-r--r--test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp8
-rw-r--r--test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp4
-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/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp1
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp1
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp1
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp1
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp1
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp1
-rw-r--r--test/std/utilities/type.index/type.index.hash/hash.pass.cpp4
-rw-r--r--test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp5
144 files changed, 470 insertions, 206 deletions
diff --git a/include/__locale b/include/__locale
index 0097fc28d..42cf4d9a3 100644
--- a/include/__locale
+++ b/include/__locale
@@ -1420,7 +1420,7 @@ protected:
// template <class charT> class numpunct_byname
-template <class charT> class _LIBCPP_TYPE_VIS_ONLY numpunct_byname;
+template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY numpunct_byname;
template <>
class _LIBCPP_TYPE_VIS numpunct_byname<char>
diff --git a/include/atomic b/include/atomic
index 7a6dd24fe..0427a9133 100644
--- a/include/atomic
+++ b/include/atomic
@@ -551,26 +551,26 @@ typedef enum memory_order
#if _GNUC_VER >= 407
namespace __gcc_atomic {
-template <typename T>
+template <typename _Tp>
struct __gcc_atomic_t {
__gcc_atomic_t() _NOEXCEPT {}
- explicit __gcc_atomic_t(T value) _NOEXCEPT : __a_value(value) {}
- T __a_value;
+ explicit __gcc_atomic_t(_Tp value) _NOEXCEPT : __a_value(value) {}
+ _Tp __a_value;
};
#define _Atomic(x) __gcc_atomic::__gcc_atomic_t<x>
-template <typename T> T __create();
+template <typename _Tp> _Tp __create();
-template <typename __Tp, typename __Td>
-typename enable_if<sizeof(__Tp()->__a_value = __create<__Td>()), char>::type
+template <typename _Tp, typename _Td>
+typename enable_if<sizeof(_Tp()->__a_value = __create<_Td>()), char>::type
__test_atomic_assignable(int);
-template <typename T, typename U>
+template <typename _Tp, typename _Up>
__two __test_atomic_assignable(...);
-template <typename __Tp, typename __Td>
+template <typename _Tp, typename _Td>
struct __can_assign {
static const bool value =
- sizeof(__test_atomic_assignable<__Tp, __Td>(1)) == sizeof(char);
+ sizeof(__test_atomic_assignable<_Tp, _Td>(1)) == sizeof(char);
};
static inline constexpr int __to_gcc_order(memory_order __order) {
diff --git a/include/cstdio b/include/cstdio
index ce3af4d91..37814ef11 100644
--- a/include/cstdio
+++ b/include/cstdio
@@ -120,6 +120,24 @@ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putc(int __c, FILE* __stream) {ret
inline _LIBCPP_INLINE_VISIBILITY int putc(int __c, FILE* __stream) {return __libcpp_putc(__c, __stream);}
#endif // putc
+#ifdef clearerr
+inline _LIBCPP_INLINE_VISIBILITY void __libcpp_clearerr(FILE* __stream) { return clearerr(__stream); }
+#undef clearerr
+inline _LIBCPP_INLINE_VISIBILITY void clearerr(FILE* __stream) { return __libcpp_clearerr(__stream); }
+#endif // clearerr
+
+#ifdef feof
+inline _LIBCPP_INLINE_VISIBILITY int __libcpp_feof(FILE* __stream) { return feof(__stream); }
+#undef feof
+inline _LIBCPP_INLINE_VISIBILITY int feof(FILE* __stream) { return __libcpp_feof(__stream); }
+#endif // feof
+
+#ifdef ferror
+inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ferror(FILE* __stream) { return ferror(__stream); }
+#undef ferror
+inline _LIBCPP_INLINE_VISIBILITY int ferror(FILE* __stream) { return __libcpp_ferror(__stream); }
+#endif // ferror
+
_LIBCPP_BEGIN_NAMESPACE_STD
using ::FILE;
diff --git a/include/regex b/include/regex
index 7bc08a83c..9a8898331 100644
--- a/include/regex
+++ b/include/regex
@@ -2608,9 +2608,7 @@ public:
assign(_ForwardIterator __first, _ForwardIterator __last,
flag_type __f = regex_constants::ECMAScript)
{
- __member_init(__f);
- __parse(__first, __last);
- return *this;
+ return assign(basic_regex(__first, __last, __f));
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
diff --git a/include/type_traits b/include/type_traits
index f4677358a..914e8593b 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -1433,11 +1433,11 @@ template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
#ifdef _LIBCPP_HAS_NO_VARIADICS
-template <class _Tp, class _Up = void, class V = void>
+template <class _Tp, class _Up = void, class _Vp = void>
struct _LIBCPP_TYPE_VIS_ONLY common_type
{
public:
- typedef typename common_type<typename common_type<_Tp, _Up>::type, V>::type type;
+ typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp>::type type;
};
template <class _Tp>
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e72cfbe1c..8cffd4331 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,6 +23,9 @@ if(PYTHONINTERP_FOUND)
set(LIT_ARGS "${LLVM_LIT_ARGS}")
separate_arguments(LIT_ARGS)
+ set(LIBCXX_LIT_VARIANT "libcxx" CACHE STRING
+ "Configuration variant to use for LIT.")
+
pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)
pythonize_bool(LIBCXX_ENABLE_RTTI)
pythonize_bool(LIBCXX_ENABLE_SHARED)
diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py
index 9899d94b2..be4c988b9 100644
--- a/test/libcxx/test/config.py
+++ b/test/libcxx/test/config.py
@@ -17,13 +17,13 @@ class Configuration(object):
self.lit_config = lit_config
self.config = config
self.cxx = None
- self.src_root = None
+ self.libcxx_src_root = None
self.obj_root = None
- self.library_root = None
+ self.cxx_library_root = None
self.env = {}
self.compile_flags = []
self.link_flags = []
- self.use_system_lib = False
+ self.use_system_cxx_lib = False
self.use_clang_verify = False
self.use_ccache = False
self.long_tests = None
@@ -56,8 +56,8 @@ class Configuration(object):
self.configure_triple()
self.configure_src_root()
self.configure_obj_root()
- self.configure_library_root()
- self.configure_use_system_lib()
+ self.configure_cxx_library_root()
+ self.configure_use_system_cxx_lib()
self.configure_use_clang_verify()
self.configure_ccache()
self.configure_env()
@@ -137,27 +137,28 @@ class Configuration(object):
compiler_name, major_ver, minor_ver))
def configure_src_root(self):
- self.src_root = self.get_lit_conf(
+ self.libcxx_src_root = self.get_lit_conf(
'libcxx_src_root', os.path.dirname(self.config.test_source_root))
def configure_obj_root(self):
- self.obj_root = self.get_lit_conf('libcxx_obj_root', self.src_root)
+ self.obj_root = self.get_lit_conf('libcxx_obj_root',
+ self.libcxx_src_root)
- def configure_library_root(self):
- self.library_root = self.get_lit_conf('libcxx_library_root',
- self.obj_root)
+ def configure_cxx_library_root(self):
+ self.cxx_library_root = self.get_lit_conf('cxx_library_root',
+ self.obj_root)
- def configure_use_system_lib(self):
+ def configure_use_system_cxx_lib(self):
# This test suite supports testing against either the system library or
# 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_lib = self.get_lit_bool('use_system_lib')
- if self.use_system_lib is None:
+ 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.
- self.use_system_lib = False
+ self.use_system_cxx_lib = False
self.lit_config.note(
- "inferred use_system_lib as: %r" % self.use_system_lib)
+ "inferred use_system_cxx_lib as: %r" % self.use_system_cxx_lib)
def configure_use_clang_verify(self):
'''If set, run clang with -verify on failing tests.'''
@@ -228,12 +229,12 @@ class Configuration(object):
locale.setlocale(locale.LC_ALL, default_locale)
# Write an "available feature" that combines the triple when
- # use_system_lib is enabled. This is so that we can easily write XFAIL
+ # use_system_cxx_lib is enabled. This is so that we can easily write XFAIL
# markers for tests that are known to fail with versions of libc++ as
# were shipped with a particular triple.
- if self.use_system_lib:
+ if self.use_system_cxx_lib:
self.config.available_features.add(
- 'with_system_lib=%s' % self.config.target_triple)
+ 'with_system_cxx_lib=%s' % self.config.target_triple)
# Some linux distributions have different locale data than others.
# Insert the distributions name and name-version into the available
@@ -268,28 +269,14 @@ class Configuration(object):
self.config.available_features.add(std)
# Configure include paths
self.compile_flags += ['-nostdinc++']
- self.compile_flags += ['-I' + self.src_root + '/test/support']
- libcxx_headers = self.get_lit_conf('libcxx_headers',
- self.src_root + '/include')
- if not os.path.isdir(libcxx_headers):
- self.lit_config.fatal("libcxx_headers='%s' is not a directory."
- % libcxx_headers)
- self.compile_flags += ['-I' + libcxx_headers]
+ self.configure_compile_flags_header_includes()
if sys.platform.startswith('linux'):
self.compile_flags += ['-D__STDC_FORMAT_MACROS',
'-D__STDC_LIMIT_MACROS',
'-D__STDC_CONSTANT_MACROS']
# Configure feature flags.
- enable_exceptions = self.get_lit_bool('enable_exceptions', True)
- if enable_exceptions:
- self.config.available_features.add('exceptions')
- else:
- self.compile_flags += ['-fno-exceptions']
- enable_rtti = self.get_lit_bool('enable_rtti', True)
- if enable_rtti:
- self.config.available_features.add('rtti')
- else:
- self.compile_flags += ['-fno-rtti', '-D_LIBCPP_NO_RTTI']
+ self.configure_compile_flags_exceptions()
+ self.configure_compile_flags_rtti()
enable_32bit = self.get_lit_bool('enable_32bit', False)
if enable_32bit:
self.compile_flags += ['-m32']
@@ -298,12 +285,9 @@ class Configuration(object):
enable_monotonic_clock = self.get_lit_bool('enable_monotonic_clock',
True)
if not enable_threads:
- self.compile_flags += ['-D_LIBCPP_HAS_NO_THREADS']
- self.config.available_features.add('libcpp-has-no-threads')
+ self.configure_compile_flags_no_threads()
if not enable_monotonic_clock:
- self.compile_flags += ['-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK']
- self.config.available_features.add(
- 'libcpp-has-no-monotonic-clock')
+ self.configure_compile_flags_no_monotonic_clock()
elif not enable_monotonic_clock:
self.lit_config.fatal('enable_monotonic_clock cannot be false when'
' enable_threads is true.')
@@ -313,8 +297,53 @@ class Configuration(object):
compile_flags_str = self.get_lit_conf('compile_flags', '')
self.compile_flags += shlex.split(compile_flags_str)
+ def configure_compile_flags_header_includes(self):
+ self.compile_flags += ['-I' + self.libcxx_src_root + '/test/support']
+ libcxx_headers = self.get_lit_conf('libcxx_headers',
+ self.libcxx_src_root + '/include')
+ if not os.path.isdir(libcxx_headers):
+ self.lit_config.fatal("libcxx_headers='%s' is not a directory."
+ % libcxx_headers)
+ self.compile_flags += ['-I' + libcxx_headers]
+
+ def configure_compile_flags_exceptions(self):
+ enable_exceptions = self.get_lit_bool('enable_exceptions', True)
+ if enable_exceptions:
+ self.config.available_features.add('exceptions')
+ else:
+ self.compile_flags += ['-fno-exceptions']
+
+ def configure_compile_flags_rtti(self):
+ enable_rtti = self.get_lit_bool('enable_rtti', True)
+ if enable_rtti:
+ self.config.available_features.add('rtti')
+ else:
+ self.compile_flags += ['-fno-rtti', '-D_LIBCPP_NO_RTTI']
+
+ def configure_compile_flags_no_threads(self):
+ self.compile_flags += ['-D_LIBCPP_HAS_NO_THREADS']
+ self.config.available_features.add('libcpp-has-no-threads')
+
+ def configure_compile_flags_no_monotonic_clock(self):
+ self.compile_flags += ['-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK']
+ self.config.available_features.add('libcpp-has-no-monotonic-clock')
+
def configure_link_flags(self):
self.link_flags += ['-nodefaultlibs']
+
+ # Configure library path
+ self.configure_link_flags_cxx_library_path()
+ self.configure_link_flags_abi_library_path()
+
+ # Configure libraries
+ self.configure_link_flags_cxx_library()
+ self.configure_link_flags_abi_library()
+ self.configure_extra_library_flags()
+
+ link_flags_str = self.get_lit_conf('link_flags', '')
+ self.link_flags += shlex.split(link_flags_str)
+
+ def configure_link_flags_cxx_library_path(self):
libcxx_library = self.get_lit_conf('libcxx_library')
# Configure libc++ library paths.
if libcxx_library is not None:
@@ -323,25 +352,31 @@ class Configuration(object):
self.lit_config.fatal(
"libcxx_library='%s' is not a valid file." %
libcxx_library)
- if self.use_system_lib:
+ if self.use_system_cxx_lib:
self.lit_config.fatal(
"Conflicting options: 'libcxx_library' cannot be used "
- "with 'use_system_lib=true'")
+ "with 'use_system_cxx_lib=true'")
self.link_flags += ['-Wl,-rpath,' +
os.path.dirname(libcxx_library)]
- elif not self.use_system_lib:
- self.link_flags += ['-L' + self.library_root,
- '-Wl,-rpath,' + self.library_root]
+ elif not self.use_system_cxx_lib:
+ self.link_flags += ['-L' + self.cxx_library_root,
+ '-Wl,-rpath,' + self.cxx_library_root]
+
+ def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
abi_library_path = self.get_lit_conf('abi_library_path', '')
if abi_library_path:
self.link_flags += ['-L' + abi_library_path,
'-Wl,-rpath,' + abi_library_path]
- # Configure libraries
+
+ def configure_link_flags_cxx_library(self):
+ libcxx_library = self.get_lit_conf('libcxx_library')
if libcxx_library:
self.link_flags += [libcxx_library]
else:
self.link_flags += ['-lc++']
+
+ def configure_link_flags_abi_library(self):
cxx_abi = self.get_lit_conf('cxx_abi', 'libcxxabi')
if cxx_abi == 'libstdc++':
self.link_flags += ['-lstdc++']
@@ -356,20 +391,28 @@ class Configuration(object):
else:
self.lit_config.fatal(
'C++ ABI setting %s unsupported for tests' % cxx_abi)
- # Configure extra libraries.
+
+ def configure_extra_library_flags(self):
+ enable_threads = self.get_lit_bool('enable_threads', True)
+ llvm_unwinder = self.get_lit_conf('llvm_unwinder', False)
if sys.platform == 'darwin':
self.link_flags += ['-lSystem']
elif sys.platform.startswith('linux'):
- self.link_flags += ['-lgcc_eh', '-lc', '-lm', '-lpthread',
- '-lrt', '-lgcc_s']
+ if not llvm_unwinder:
+ self.link_flags += ['-lgcc_eh']
+ self.link_flags += ['-lc', '-lm']
+ if enable_threads:
+ self.link_flags += ['-lpthread']
+ self.link_flags += ['-lrt']
+ if llvm_unwinder:
+ self.link_flags += ['-lunwind', '-ldl']
+ else:
+ self.link_flags += ['-lgcc_s']
elif sys.platform.startswith('freebsd'):
self.link_flags += ['-lc', '-lm', '-pthread', '-lgcc_s']
else:
self.lit_config.fatal("unrecognized system: %r" % sys.platform)
- link_flags_str = self.get_lit_conf('link_flags', '')
- self.link_flags += shlex.split(link_flags_str)
-
def configure_sanitizer(self):
san = self.get_lit_conf('use_sanitizer', '').strip()
if san:
@@ -409,7 +452,7 @@ class Configuration(object):
self.config.available_features.add('tsan')
else:
self.lit_config.fatal('unsupported value for '
- 'libcxx_use_san: {0}'.format(san))
+ 'use_sanitizer: {0}'.format(san))
def configure_triple(self):
# Get or infer the target triple.
@@ -437,10 +480,10 @@ class Configuration(object):
"inferred target_triple as: %r" % self.config.target_triple)
def configure_env(self):
- if sys.platform == 'darwin' and not self.use_system_lib:
+ if sys.platform == 'darwin' and not self.use_system_cxx_lib:
libcxx_library = self.get_lit_conf('libcxx_library')
if libcxx_library:
- library_root = os.path.dirname(libcxx_library)
+ cxx_library_root = os.path.dirname(libcxx_library)
else:
- library_root = self.library_root
- self.env['DYLD_LIBRARY_PATH'] = library_root
+ cxx_library_root = self.cxx_library_root
+ self.env['DYLD_LIBRARY_PATH'] = cxx_library_root
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index fa821bd80..59c44b825 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -3,7 +3,7 @@ config.cxx_under_test = "@LIBCXX_COMPILER@"
config.std = "@LIBCXX_STD_VERSION@"
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
-config.libcxx_library_root = "@LIBCXX_LIBRARY_DIR@"
+config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
config.enable_exceptions = "@LIBCXX_ENABLE_EXCEPTIONS@"
config.enable_rtti = "@LIBCXX_ENABLE_RTTI@"
config.enable_shared = "@LIBCXX_ENABLE_SHARED@"
@@ -13,6 +13,7 @@ config.enable_monotonic_clock = "@LIBCXX_ENABLE_MONOTONIC_CLOCK@"
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
config.abi_library_path = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
+config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
# Let the main config do the real work.
lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")
diff --git a/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp b/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
index 869c1ec9c..8eec3ceff 100644
--- a/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
+++ b/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
@@ -13,6 +13,7 @@
#include <array>
#include <memory>
+#include <utility>
#include <cassert>
int main()
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 ea2262cd9..a78f4fd59 100644
--- a/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
+++ b/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp
@@ -29,8 +29,9 @@ int main()
{
typedef std::vector<bool> T;
typedef std::hash<T> H;
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- H>::value), "");
+ static_assert((std::is_same<H::argument_type, T>::value), "" );
+ static_assert((std::is_same<H::result_type, std::size_t>::value), "" );
+
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.modifiers/erase_iter.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
index 7a850edda..4fa07b729 100644
--- a/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
@@ -12,6 +12,7 @@
// iterator erase(const_iterator position);
#include <vector>
+#include <iterator>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
index bfc18bc48..2e81d133c 100644
--- a/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
@@ -12,6 +12,7 @@
// iterator erase(const_iterator first, const_iterator last);
#include <vector>
+#include <iterator>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/containers/sequences/vector/vector.special/swap.pass.cpp b/test/std/containers/sequences/vector/vector.special/swap.pass.cpp
index 27001aef7..96aaf7131 100644
--- a/test/std/containers/sequences/vector/vector.special/swap.pass.cpp
+++ b/test/std/containers/sequences/vector/vector.special/swap.pass.cpp
@@ -13,6 +13,7 @@
// void swap(vector<T,Alloc>& x, vector<T,Alloc>& y);
#include <vector>
+#include <iterator>
#include <cassert>
#include "test_allocator.h"
#include "min_allocator.h"
diff --git a/test/std/depr/depr.c.headers/stdint_h.pass.cpp b/test/std/depr/depr.c.headers/stdint_h.pass.cpp
index 9e3c329b2..3861ee509 100644
--- a/test/std/depr/depr.c.headers/stdint_h.pass.cpp
+++ b/test/std/depr/depr.c.headers/stdint_h.pass.cpp
@@ -10,6 +10,7 @@
// test <stdint.h>
#include <stdint.h>
+#include <cstddef>
#include <csignal>
#include <cwctype>
#include <climits>
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 14d7b2d47..b812e364b 100644
--- a/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
+++ b/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
@@ -27,8 +27,8 @@ test(int i)
{
typedef std::error_code T;
typedef std::hash<T> H;
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- H>::value), "");
+ static_assert((std::is_same<H::argument_type, T>::value), "" );
+ static_assert((std::is_same<H::result_type, std::size_t>::value), "" );
H h;
T ec(i, std::system_category());
assert(h(ec) == i);
diff --git a/test/std/experimental/string.view/string.view.hash/string_view.pass.cpp b/test/std/experimental/string.view/string.view.hash/string_view.pass.cpp
index 03e0db2db..6b16971bf 100644
--- a/test/std/experimental/string.view/string.view.hash/string_view.pass.cpp
+++ b/test/std/experimental/string.view/string.view.hash/string_view.pass.cpp
@@ -29,8 +29,8 @@ void
test()
{
typedef std::hash<T> H;
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- H>::value), "");
+ static_assert((std::is_same<typename H::argument_type, T>::value), "" );
+ static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
H h;
// std::string g1 = "1234567890";
// std::string g2 = "1234567891";
diff --git a/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp b/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
index 3e38d5ec5..51f9ab6be 100644
--- a/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
+++ b/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
@@ -13,5 +13,5 @@
int main()
{
- std::experimental::erased_type e();
+ std::experimental::erased_type e;
}
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 2033683b9..f771688f1 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
@@ -18,6 +18,7 @@
#include <iterator>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#include <utility>
#include <vector>
#include <memory>
#include <cassert>
diff --git a/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp b/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp
index 9c3354d75..23cf8b66b 100644
--- a/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp
+++ b/test/std/language.support/cstdint/cstdint.syn/cstdint.pass.cpp
@@ -10,6 +10,8 @@
// test <cstdint>
#include <cstdint>
+#include <cstddef>
+#include <cwchar>
#include <csignal>
#include <cwctype>
#include <climits>
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 d78df203a..044ba2b97 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 f95714904..c2eeea820 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
@@ -13,8 +13,8 @@
// charT tolower(charT) const;
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// XFAIL: linux
#include <locale>
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 9579f4df8..b2577e323 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
@@ -13,8 +13,8 @@
// const charT* tolower(charT* low, const charT* high) const;
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// XFAIL: linux
#include <locale>
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 9b09e819a..8611293b8 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
@@ -13,8 +13,8 @@
// charT toupper(charT) const;
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// XFAIL: linux
#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 87e9b9776..d23a29273 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
@@ -13,8 +13,8 @@
// const charT* toupper(charT* low, const charT* high) const;
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// XFAIL: linux
#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 a76cea5cc..32e7249ab 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <locale>
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
index 0a18c222f..706d92b71 100644
--- a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// XFAIL: android
+
// <locale>
// class num_put<charT, OutputIterator>
@@ -15,7 +17,6 @@
// TODO GLIBC uses a different string for positive and negative NAN numbers.
// XFAIL: linux-gnu
-// XFAIL: android
#include <locale>
#include <ios>
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 e6ebb9d7a..f5c7c1277 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <locale>
diff --git a/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp b/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp
index 399e4e85c..0087f1943 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <locale>
diff --git a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
index 1bd0022ed..8bf98268c 100644
--- a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
@@ -23,4 +23,13 @@ int main()
r2.assign(r1);
assert(r2.flags() == std::regex::ECMAScript);
assert(r2.mark_count() == 2);
+ assert(std::regex_search("ab", r2));
+
+ bool caught = false;
+ try { r2.assign("(def", std::regex::extended); }
+ catch(std::regex_error &) { caught = true; }
+ assert(caught);
+ assert(r2.flags() == std::regex::ECMAScript);
+ assert(r2.mark_count() == 2);
+ assert(std::regex_search("ab", r2));
}
diff --git a/test/std/re/re.traits/translate_nocase.pass.cpp b/test/std/re/re.traits/translate_nocase.pass.cpp
index 0692e000d..f9fa38ddf 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// TODO: investigation needed
// XFAIL: linux-gnu
diff --git a/test/std/strings/basic.string.hash/strings.pass.cpp b/test/std/strings/basic.string.hash/strings.pass.cpp
index 8ba166fbb..5fc32c06a 100644
--- a/test/std/strings/basic.string.hash/strings.pass.cpp
+++ b/test/std/strings/basic.string.hash/strings.pass.cpp
@@ -27,8 +27,8 @@ void
test()
{
typedef std::hash<T> H;
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- H>::value), "");
+ static_assert((std::is_same<typename H::argument_type, T>::value), "" );
+ static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
H h;
std::string g1 = "1234567890";
std::string g2 = "1234567891";
diff --git a/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp b/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
index ac0e535ee..4273860f4 100644
--- a/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
+++ b/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
@@ -13,6 +13,7 @@
// assign(basic_string<charT,traits>&& str);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp
index 4e09bf246..23a89c6fc 100644
--- a/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp
@@ -18,6 +18,7 @@
// operator+(charT lhs, basic_string<charT,traits,Allocator>&& rhs);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp
index 9dc8a510b..665e86f2c 100644
--- a/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp
@@ -18,6 +18,7 @@
// operator+(const charT* lhs, basic_string<charT,traits,Allocator>&& rhs);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp
index 4d72db595..12903fe81 100644
--- a/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp
@@ -18,6 +18,7 @@
// operator+(basic_string<charT,traits,Allocator>&& lhs, charT rhs);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp
index 47fc1ca51..63a7b769b 100644
--- a/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp
@@ -18,6 +18,7 @@
// operator+(basic_string<charT,traits,Allocator>&& lhs, const charT* rhs);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp
index bf2ddd51f..318b648d6 100644
--- a/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp
+++ b/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp
@@ -30,6 +30,7 @@
// const basic_string<charT,traits,Allocator>&& rhs);
#include <string>
+#include <utility>
#include <cassert>
#include "min_allocator.h"
diff --git a/test/std/strings/string.conversions/stof.pass.cpp b/test/std/strings/string.conversions/stof.pass.cpp
index 65809cb2c..3e9b681dd 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <string>
diff --git a/test/std/strings/string.conversions/stol.pass.cpp b/test/std/strings/string.conversions/stol.pass.cpp
index d1cd75dcf..dbbccc927 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <string>
diff --git a/test/std/strings/string.conversions/stoll.pass.cpp b/test/std/strings/string.conversions/stoll.pass.cpp
index 11f15e1fd..f68490ed1 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <string>
diff --git a/test/std/strings/string.conversions/stoul.pass.cpp b/test/std/strings/string.conversions/stoul.pass.cpp
index fcd19e883..37d33c4a9 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <string>
diff --git a/test/std/strings/string.conversions/stoull.pass.cpp b/test/std/strings/string.conversions/stoull.pass.cpp
index b1a2f9f09..c0667edb3 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <string>
diff --git a/test/std/thread/futures/futures.future_error/what.pass.cpp b/test/std/thread/futures/futures.future_error/what.pass.cpp
index 1a66e4a61..52d2e944a 100644
--- a/test/std/thread/futures/futures.future_error/what.pass.cpp
+++ b/test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -12,9 +12,9 @@
// 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
-// XFAIL: with_system_lib=x86_64-apple-darwin13
+// 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-darwin13
// <future>
diff --git a/test/std/thread/futures/test_allocator.h b/test/std/thread/futures/test_allocator.h
index ea70ada63..50072909f 100644
--- a/test/std/thread/futures/test_allocator.h
+++ b/test/std/thread/futures/test_allocator.h
@@ -12,6 +12,7 @@
#include <cstddef>
#include <type_traits>
+#include <utility>
#include <cstdlib>
#include <new>
#include <climits>
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 bb7f2aa0d..106c69e2e 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
@@ -28,6 +28,8 @@ int main()
std::thread::id id1;
std::thread::id id2 = std::this_thread::get_id();
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), "" );
H h;
assert(h(id1) != h(id2));
}
diff --git a/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
index dbfaa9780..e165d9836 100644
--- a/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
+++ b/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include <scoped_allocator>
+#include <memory>
#include <cassert>
#if __cplusplus >= 201103L
diff --git a/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
index 74298f23b..490dc16b6 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::divides<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(36, 4) == 9);
#if _LIBCPP_STD_VER > 11
typedef std::divides<> F2;
diff --git a/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
index 9a496a806..9bda541f8 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::minus<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(3, 2) == 1);
#if _LIBCPP_STD_VER > 11
typedef std::minus<> F2;
diff --git a/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
index 3c1788192..ca5bba6d5 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::modulus<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(36, 8) == 4);
#if _LIBCPP_STD_VER > 11
typedef std::modulus<> F2;
diff --git a/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
index 97287e6c8..f132c8d4b 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::multiplies<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(3, 2) == 6);
#if _LIBCPP_STD_VER > 11
typedef std::multiplies<> F2;
diff --git a/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
index 3ffb7051b..0adac6591 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
@@ -19,7 +19,8 @@ int main()
{
typedef std::negate<int> F;
const F f = F();
- static_assert((std::is_base_of<std::unary_function<int, int>, F>::value), "");
+ static_assert((std::is_same<F::argument_type, int>::value), "" );
+ static_assert((std::is_same<F::result_type, int>::value), "" );
assert(f(36) == -36);
#if _LIBCPP_STD_VER > 11
typedef std::negate<> F2;
diff --git a/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp b/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
index 44001a0e5..3c093fc09 100644
--- a/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
+++ b/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::plus<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(3, 2) == 5);
#if _LIBCPP_STD_VER > 11
typedef std::plus<> F2;
diff --git a/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp b/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
index 66544781d..c0135fad1 100644
--- a/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
+++ b/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::bit_and<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(0xEA95, 0xEA95) == 0xEA95);
assert(f(0xEA95, 0x58D3) == 0x4891);
assert(f(0x58D3, 0xEA95) == 0x4891);
diff --git a/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp b/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
index 82efcbc29..48800a366 100644
--- a/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
+++ b/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
@@ -20,7 +20,8 @@ int main()
#if _LIBCPP_STD_VER > 11
typedef std::bit_not<int> F;
const F f = F();
- static_assert((std::is_base_of<std::unary_function<int, int>, F>::value), "");
+ static_assert((std::is_same<F::argument_type, int>::value), "" );
+ static_assert((std::is_same<F::result_type, int>::value), "" );
assert((f(0xEA95) & 0xFFFF ) == 0x156A);
assert((f(0x58D3) & 0xFFFF ) == 0xA72C);
assert((f(0) & 0xFFFF ) == 0xFFFF);
diff --git a/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp b/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
index 6ae3c3ac9..cb33df3d8 100644
--- a/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
+++ b/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::bit_or<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(0xEA95, 0xEA95) == 0xEA95);
assert(f(0xEA95, 0x58D3) == 0xFAD7);
assert(f(0x58D3, 0xEA95) == 0xFAD7);
diff --git a/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp b/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
index e7bb5e49f..d8690aa82 100644
--- a/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
+++ b/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::bit_xor<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::result_type>::value), "" );
assert(f(0xEA95, 0xEA95) == 0);
assert(f(0xEA95, 0x58D3) == 0xB246);
assert(f(0x58D3, 0xEA95) == 0xB246);
diff --git a/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp b/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
index 3d1c0b5ce..60415ec75 100644
--- a/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::equal_to<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(f(36, 36));
assert(!f(36, 6));
#if _LIBCPP_STD_VER > 11
diff --git a/test/std/utilities/function.objects/comparisons/greater.pass.cpp b/test/std/utilities/function.objects/comparisons/greater.pass.cpp
index 5a88f4362..164f09aa6 100644
--- a/test/std/utilities/function.objects/comparisons/greater.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/greater.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::greater<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(!f(36, 36));
assert(f(36, 6));
assert(!f(6, 36));
diff --git a/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp b/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
index 22444c794..e89c14e24 100644
--- a/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::greater_equal<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(f(36, 36));
assert(f(36, 6));
assert(!f(6, 36));
diff --git a/test/std/utilities/function.objects/comparisons/less.pass.cpp b/test/std/utilities/function.objects/comparisons/less.pass.cpp
index 99cdd1291..74fe166a0 100644
--- a/test/std/utilities/function.objects/comparisons/less.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/less.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::less<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(!f(36, 36));
assert(!f(36, 6));
assert(f(6, 36));
diff --git a/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp b/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
index 116906eaa..e6ba1f7f8 100644
--- a/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::less_equal<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(f(36, 36));
assert(!f(36, 6));
assert(f(6, 36));
diff --git a/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp b/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
index 4b61bf8b8..3e710b3e0 100644
--- a/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
+++ b/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::not_equal_to<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(!f(36, 36));
assert(f(36, 6));
#if _LIBCPP_STD_VER > 11
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
index 6c70db408..eb4eac65c 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
@@ -10,40 +10,99 @@
// <functional>
// template<Returnable R, CopyConstructible... ArgTypes>
-// class function<R(ArgTypes...)>
-// : public unary_function<T1, R> // iff sizeof...(ArgTypes) == 1 and
-// // ArgTypes contains T1
-// : public binary_function<T1, T2, R> // iff sizeof...(ArgTypes) == 2 and
-// // ArgTypes contains T1 and T2
-// {
+// class function<R(ArgTypes...)> {
// public:
-// typedef R result_type;
-// ...
-// };
+// typedef R result_type;
+// typedef T1 argument_type; // iff sizeof...(ArgTypes) == 1 and
+// // the type in ArgTypes is T1
+// typedef T1 first_argument_type; // iff sizeof...(ArgTypes) == 2 and
+// // ArgTypes contains T1 and T2
+// typedef T2 second_argument_type; // iff sizeof...(ArgTypes) == 2 and
+// // ArgTypes contains T1 and T2
+// ...
+// };
#include <functional>
#include <type_traits>
+
+template <typename T>
+class has_argument_type
+{
+ typedef char yes;
+ typedef long no;
+
+ template <typename C> static yes check( typename C::argument_type * );
+ template <typename C> static no check(...);
+public:
+ enum { value = sizeof(check<T>(0)) == sizeof(yes) };
+};
+
+template <typename T>
+class has_first_argument_type
+{
+ typedef char yes;
+ typedef long no;
+
+ template <typename C> static yes check( typename C::first_argument_type * );
+ template <typename C> static no check(...);
+public:
+ enum { value = sizeof(check<T>(0)) == sizeof(yes) };
+};
+
+
+template <typename T>
+class has_second_argument_type
+{
+ typedef char yes;
+ typedef long no;
+
+ template <typename C> static yes check( typename C::second_argument_type *);
+ template <typename C> static no check(...);
+public:
+ enum { value = sizeof(check<T>(0)) == sizeof(yes) };
+};
+
+template <class F, class return_type>
+void test_nullary_function ()
+{
+ static_assert((std::is_same<typename F::result_type, return_type>::value), "" );
+ static_assert((!has_argument_type<F>::value), "" );
+ static_assert((!has_first_argument_type<F>::value), "" );
+ static_assert((!has_second_argument_type<F>::value), "" );
+}
+
+template <class F, class return_type, class arg_type>
+void test_unary_function ()
+{
+ static_assert((std::is_same<typename F::result_type, return_type>::value), "" );
+ static_assert((std::is_same<typename F::argument_type, arg_type>::value), "" );
+ static_assert((!has_first_argument_type<F>::value), "" );
+ static_assert((!has_second_argument_type<F>::value), "" );
+}
+
+template <class F, class return_type, class arg_type1, class arg_type2>
+void test_binary_function ()
+{
+ static_assert((std::is_same<typename F::result_type, return_type>::value), "" );
+ static_assert((std::is_same<typename F::first_argument_type, arg_type1>::value), "" );
+ static_assert((std::is_same<typename F::second_argument_type, arg_type2>::value), "" );
+ static_assert((!has_argument_type<F>::value), "" );
+}
+
+template <class F, class return_type>
+void test_other_function ()
+{
+ static_assert((std::is_same<typename F::result_type, return_type>::value), "" );
+ static_assert((!has_argument_type<F>::value), "" );
+ static_assert((!has_first_argument_type<F>::value), "" );
+ static_assert((!has_second_argument_type<F>::value), "" );
+}
+
int main()
{
- static_assert((!std::is_base_of<std::unary_function <int, int>,
- std::function<int()> >::value), "");
- static_assert((!std::is_base_of<std::binary_function<int, int, int>,
- std::function<int()> >::value), "");
- static_assert(( std::is_same< std::function<int()>::result_type,
- int>::value), "");
-
- static_assert(( std::is_base_of<std::unary_function <int, double>,
- std::function<double(int)> >::value), "");
- static_assert((!std::is_base_of<std::binary_function<int, int, double>,
- std::function<double(int)> >::value), "");
- static_assert(( std::is_same< std::function<double(int)>::result_type,
- double>::value), "");
-
- static_assert((!std::is_base_of<std::unary_function <int, double>,
- std::function<double(int, char)> >::value), "");
- static_assert(( std::is_base_of<std::binary_function<int, char, double>,
- std::function<double(int, char)> >::value), "");
- static_assert(( std::is_same< std::function<double(int, char)>::result_type,
- double>::value), "");
+ test_nullary_function<std::function<int()>, int>();
+ test_unary_function <std::function<double(int)>, double, int>();
+ test_binary_function <std::function<double(int, char)>, double, int, char>();
+ test_other_function <std::function<double(int, char, double)>, double>();
}
diff --git a/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp b/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
index c7b03cce0..72f9dc201 100644
--- a/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
+++ b/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::logical_and<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(f(36, 36));
assert(!f(36, 0));
assert(!f(0, 36));
diff --git a/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp b/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
index 12b3543c5..8484625a7 100644
--- a/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
+++ b/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
@@ -19,7 +19,8 @@ int main()
{
typedef std::logical_not<int> F;
const F f = F();
- static_assert((std::is_base_of<std::unary_function<int, bool>, F>::value), "");
+ static_assert((std::is_same<F::argument_type, int>::value), "" );
+ static_assert((std::is_same<F::result_type, bool>::value), "" );
assert(!f(36));
assert(f(0));
#if _LIBCPP_STD_VER > 11
diff --git a/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp b/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
index 8b5420d8e..728050440 100644
--- a/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
+++ b/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::logical_or<int> F;
const F f = F();
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(f(36, 36));
assert(f(36, 0));
assert(f(0, 36));
diff --git a/test/std/utilities/function.objects/negators/binary_negate.pass.cpp b/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
index e30670836..53ff5b47a 100644
--- a/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
+++ b/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::binary_negate<std::logical_and<int> > F;
const F f = F(std::logical_and<int>());
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(!f(36, 36));
assert( f(36, 0));
assert( f(0, 36));
diff --git a/test/std/utilities/function.objects/negators/unary_negate.pass.cpp b/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
index 2aa4f0ab4..e2498a3b5 100644
--- a/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
+++ b/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
@@ -19,7 +19,8 @@ int main()
{
typedef std::unary_negate<std::logical_not<int> > F;
const F f = F(std::logical_not<int>());
- static_assert((std::is_base_of<std::unary_function<int, bool>, F>::value), "");
+ static_assert((std::is_same<F::argument_type, int>::value), "" );
+ static_assert((std::is_same<F::result_type, bool>::value), "" );
assert(f(36));
assert(!f(0));
}
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 b5cd6f845..dca59c62b 100644
--- a/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
@@ -33,11 +33,12 @@ template <class T>
void
test()
{
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- std::hash<T> >::value), "");
+ 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), "" );
typedef typename std::underlying_type<T>::type under_type;
- std::hash<T> h1;
+ H h1;
std::hash<under_type> h2;
for (int i = 0; i <= 5; ++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 988950d4d..f1f198f23 100644
--- a/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
@@ -28,9 +28,11 @@ template <class T>
void
test()
{
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- std::hash<T> >::value), "");
- std::hash<T> h;
+ 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), "" );
+ H h;
+
std::size_t t0 = h(0.);
std::size_t tn0 = h(-0.);
std::size_t tp1 = h(0.1);
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 e5f7ca616..7cd9f15e9 100644
--- a/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
@@ -27,9 +27,11 @@ template <class T>
void
test()
{
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- std::hash<T> >::value), "");
- std::hash<T> h;
+ 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), "" );
+ H h;
+
for (int i = 0; i <= 5; ++i)
{
T t(i);
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 e4e011295..a48394495 100644
--- a/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
+++ b/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
@@ -27,9 +27,11 @@ template <class T>
void
test()
{
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- std::hash<T> >::value), "");
- std::hash<T> h;
+ 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), "" );
+ H h;
+
typedef typename std::remove_pointer<T>::type type;
type i;
type j;
diff --git a/test/std/utilities/memory/unique.ptr/deleter.h b/test/std/utilities/memory/unique.ptr/deleter.h
index 04b6de7c7..fb26044d9 100644
--- a/test/std/utilities/memory/unique.ptr/deleter.h
+++ b/test/std/utilities/memory/unique.ptr/deleter.h
@@ -17,6 +17,7 @@
#define DELETER_H
#include <type_traits>
+#include <utility>
#include <cassert>
template <class T>
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp
index 57724ae10..17375ede0 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move01.fail.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't copy from lvalue
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
index 2426dd30f..286e6bc9a 100644
--- 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
@@ -17,6 +17,7 @@
// deleter is a reference, not even that.
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp
index bfaac8805..6e13873c2 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/move02.fail.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't copy from const lvalue
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
index aa4fdb8a9..3712a2796 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't copy from lvalue
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
index e0d7c891c..4e85e5b0f 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test move ctor. Can't copy from const lvalue
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
index a0ea40bc8..9461958a4 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't assign from lvalue
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
index b46092354..1737136f4 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index e18be7b04..3c89bb123 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index 8d2e07466..970beb5a1 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't assign from const lvalue
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
index 3ba514c92..786858dd4 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from const lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index f4c45bc5f..46d4c0985 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from const lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index 5e238bd27..65ee26941 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
struct A
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
index d084d3820..da08195ff 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index 972c5593b..aeec076cb 100644
--- 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
@@ -16,6 +16,7 @@
// test converting move assignment with reference deleters
#include <memory>
+#include <utility>
#include <cassert>
#include "../deleter.h"
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
index fc00c7da3..03747b4f8 100644
--- 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
@@ -17,6 +17,7 @@
// deleter is a reference, not even that.
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index 6641a5885..9535ed029 100644
--- 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
@@ -17,6 +17,7 @@
// deleter is a reference, not even that.
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index 8940dbe9c..3fd2cbc42 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't assign from lvalue
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.pass.cpp
index 64d7b6b9a..989f594e3 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert01.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
struct A
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
index 1ab0779b1..0f900603e 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.pass.cpp
index ff59ad463..a448c77a6 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert02.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index e06b9d0af..f35af9f45 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.pass.cpp
index d726a830b..9aea81a8b 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.asgn/move_convert03.pass.cpp
@@ -16,6 +16,7 @@
// test converting move assignment with reference deleters
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index ab33785bd..dba901b2c 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move assignment
#include <memory>
+#include <utility>
#include <cassert>
// Can't assign from const lvalue
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
index 50c553e52..4694986c6 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from const lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index 541e10b8b..220677cd6 100644
--- 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
@@ -16,6 +16,7 @@
// Can't assign from const lvalue
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index f7e128beb..56ab43c7d 100644
--- 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
@@ -16,6 +16,7 @@
// Do not convert from an array unique_ptr
#include <memory>
+#include <utility>
#include <cassert>
struct A
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
index a23f029c0..1ce1838af 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr(pointer) ctor
#include <memory>
+#include <utility>
#include <cassert>
// template <class U> explicit unique_ptr(auto_ptr<U>&);
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp
index 65b1694b3..dc16c3115 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test move ctor. Should only require a MoveConstructible deleter, or if
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
index 5cd1b1800..ed1fe8c2b 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// Can't construct from lvalue
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.pass.cpp
index 42917b1de..b65cf564a 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert01.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index 8f1259229..a1bf634b9 100644
--- 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
@@ -18,6 +18,7 @@
// Explicit version
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.pass.cpp
index f72efb98e..829e7553a 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert02.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index c9076af41..740919979 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.pass.cpp
index 7463c38e7..792076a95 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert03.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index 7487e2db3..981ea706e 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.pass.cpp
index 18443a465..12ab17fad 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert04.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index 630fcb77a..d055b8062 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.pass.cpp
index a8a9c760b..8077b0dac 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert05.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index 04bf0f92e..5b9b12e0d 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.pass.cpp
index 84cef783f..4115107b8 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert06.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index da15c5c20..bef022cfc 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.pass.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.pass.cpp
index f80931022..978cb0e90 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.pass.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert07.pass.cpp
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
#include "../../deleter.h"
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
index 4d47bfd7b..e14bba076 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index d5687985d..a475c1754 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index 50647b93d..f0da5efb6 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index 0ca3d8c7f..bcf94a978 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
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
index e1eff8dd9..095bec656 100644
--- 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
@@ -14,6 +14,7 @@
// Test unique_ptr converting move ctor
#include <memory>
+#include <utility>
#include <cassert>
// test converting move ctor. Should only require a MoveConstructible deleter, or if
diff --git a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp
index cf03a2bbf..a4bd2cba1 100644
--- a/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp
+++ b/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert13.fail.cpp
@@ -16,6 +16,7 @@
// Do not convert from an array unique_ptr
#include <memory>
+#include <utility>
#include <cassert>
struct A
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 cd79fdb0d..2d586e9c7 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 2fd9d5a8f..34da04cc1 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 5c082cc27..50b96e551 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 f53f44256..d304319d2 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 fc4c47a20..3b44c8ba9 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 19482dc0a..598a1b8da 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 566e95ade..d4a39c878 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 b42360446..af11dc8bc 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 f65f3ebf8..7a85a9934 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <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 68642002d..c81266c55 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <memory>
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index db2ed3bb3..d091ae99f 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
@@ -47,6 +47,10 @@ int main()
typedef std::owner_less<std::shared_ptr<int> > CS;
CS cs;
+ 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));
@@ -61,6 +65,10 @@ int main()
typedef std::owner_less<std::weak_ptr<int> > CS;
CS cs;
+ static_assert((std::is_same<std::weak_ptr<int>, CS::first_argument_type>::value), "" );
+ static_assert((std::is_same<std::weak_ptr<int>, CS::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, CS::result_type>::value), "" );
+
assert(!cs(w1, w2));
assert(!cs(w2, w1));
assert(cs(w1, w3) || cs(w3, w1));
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 b1b24f96f..520f2e875 100644
--- a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
@@ -28,8 +28,8 @@ test()
{
typedef std::bitset<N> T;
typedef std::hash<T> H;
- static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
- H>::value), "");
+ static_assert((std::is_same<typename H::argument_type, T>::value), "" );
+ static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
H h;
T bs(static_cast<unsigned long long>(N));
assert(h(bs) == N);
diff --git a/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp b/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp
index 848534d61..2e3acbc52 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <chrono>
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 60c646147..0e0b83b2f 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// UNSUPPORTED: libcpp-has-no-monotonic-clock
// <chrono>
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 d9d6b04d6..e277d4e67 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_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
// <chrono>
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp
index 670ca04ae..2c09690f8 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp
@@ -17,6 +17,7 @@
#include <tuple>
#include <string>
#include <memory>
+#include <utility>
#include <cassert>
struct B
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp
index 302c1f924..59464fccf 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp
@@ -14,6 +14,7 @@
// tuple& operator=(tuple&& u);
#include <tuple>
+#include <utility>
#include <cassert>
#include "../MoveOnly.h"
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
index bcdb9d99b..00bb1e854 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp
@@ -14,6 +14,7 @@
// template <class... UTypes> tuple(const tuple<UTypes...>& u);
#include <tuple>
+#include <utility>
#include <string>
#include <cassert>
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
index 8dc7d21ec..92bff97d9 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
@@ -14,6 +14,7 @@
// tuple(tuple&& u);
#include <tuple>
+#include <utility>
#include <cassert>
#include "../MoveOnly.h"
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp
index 5e84ff8e8..751c1a50c 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp
@@ -13,6 +13,7 @@
// tuple<Types&&...> forward_as_tuple(Types&&... t);
#include <tuple>
+#include <type_traits>
#include <cassert>
template <class Tuple>
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp
index 5a97710c2..414d8a1c9 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp
@@ -16,6 +16,7 @@
// get(tuple<Types...>&& t);
#include <tuple>
+#include <utility>
#include <memory>
#include <cassert>
diff --git a/test/std/utilities/type.index/type.index.hash/hash.pass.cpp b/test/std/utilities/type.index/type.index.hash/hash.pass.cpp
index 259f313db..c5ffacfa3 100644
--- a/test/std/utilities/type.index/type.index.hash/hash.pass.cpp
+++ b/test/std/utilities/type.index/type.index.hash/hash.pass.cpp
@@ -23,6 +23,10 @@
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), "" );
+
std::type_index t1 = typeid(int);
assert(std::hash<std::type_index>()(t1) == t1.hash_code());
}
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 b855d1254..6d353f1d3 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
@@ -20,6 +20,7 @@
int main()
{
- static_assert((std::is_base_of<std::unary_function<std::type_index, std::size_t>,
- std::hash<std::type_index> >::value), "");
+ 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), "" );
}