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:
Eric Fiselier
2015-02-05 20:28:37 +00:00
parent 70e0af45ae
commit 75fdf0ea7c
26 changed files with 66 additions and 21 deletions

View File

@@ -25,16 +25,20 @@ int main()
{
{
std::tuple<> t = std::tuple_cat();
((void)t); // Prevent unused warning
}
{
std::tuple<> t1;
std::tuple<> t2 = std::tuple_cat(t1);
((void)t2); // Prevent unused warning
}
{
std::tuple<> t = std::tuple_cat(std::tuple<>());
((void)t); // Prevent unused warning
}
{
std::tuple<> t = std::tuple_cat(std::array<int, 0>());
((void)t); // Prevent unused warning
}
{
std::tuple<int> t1(1);
@@ -42,19 +46,23 @@ int main()
assert(std::get<0>(t) == 1);
}
#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER > 11
{
constexpr std::tuple<> t = std::tuple_cat();
((void)t); // Prevent unused warning
}
{
constexpr std::tuple<> t1;
constexpr std::tuple<> t2 = std::tuple_cat(t1);
((void)t2); // Prevent unused warning
}
{
constexpr std::tuple<> t = std::tuple_cat(std::tuple<>());
((void)t); // Prevent unused warning
}
{
constexpr std::tuple<> t = std::tuple_cat(std::array<int, 0>());
((void)t); // Prevent unused warning
}
{
constexpr std::tuple<int> t1(1);
@@ -90,6 +98,7 @@ int main()
std::tuple<> t1;
std::tuple<> t2;
std::tuple<> t3 = std::tuple_cat(t1, t2);
((void)t3); // Prevent unused warning
}
{
std::tuple<> t1;