Get tests running with warnings. Fix warnings in headers and tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -47,12 +47,12 @@ void test_default_constructible_extension_sfinae()
|
||||
typedef std::tuple<MoveOnly, MoveOnly, NoDefault> Tuple;
|
||||
|
||||
static_assert(!std::is_constructible<
|
||||
std::tuple<MoveOnly, MoveOnly, NoDefault>,
|
||||
Tuple,
|
||||
std::allocator_arg_t, A1<int>, MoveOnly, MoveOnly
|
||||
>::value, "");
|
||||
|
||||
static_assert(std::is_constructible<
|
||||
std::tuple<MoveOnly, MoveOnly, NoDefault>,
|
||||
Tuple,
|
||||
std::allocator_arg_t, A1<int>, MoveOnly, MoveOnly, NoDefault
|
||||
>::value, "");
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ int main()
|
||||
typedef std::tuple<> T;
|
||||
T t0;
|
||||
T t = t0;
|
||||
((void)t); // Prevent unused warning
|
||||
}
|
||||
{
|
||||
typedef std::tuple<int> T;
|
||||
@@ -47,7 +48,7 @@ int main()
|
||||
assert(std::get<1>(t) == 'a');
|
||||
assert(std::get<2>(t) == "some text");
|
||||
}
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
typedef std::tuple<int> T;
|
||||
constexpr T t0(2);
|
||||
@@ -58,6 +59,8 @@ int main()
|
||||
typedef std::tuple<Empty> T;
|
||||
constexpr T t0;
|
||||
constexpr T t = t0;
|
||||
constexpr Empty e = std::get<0>(t);
|
||||
((void)e); // Prevent unused warning
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ int main()
|
||||
typedef std::tuple<> T;
|
||||
T t0;
|
||||
T t = std::move(t0);
|
||||
((void)t); // Prevent unused warning
|
||||
}
|
||||
{
|
||||
typedef std::tuple<MoveOnly> T;
|
||||
|
Reference in New Issue
Block a user