[libcxx] r326120 - [libcxx] [test] Fix MSVC warnings and errors.
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 26 12:47:46 PST 2018
Author: stl_msft
Date: Mon Feb 26 12:47:46 2018
New Revision: 326120
URL: http://llvm.org/viewvc/llvm-project?rev=326120&view=rev
Log:
[libcxx] [test] Fix MSVC warnings and errors.
test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
Fix MSVC x64 truncation warnings.
warning C4267: conversion from 'size_t' to 'int', possible loss of data
test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
Fix MSVC uninitialized memory warning.
warning C6001: Using uninitialized memory 'vl'.
test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
Include <cassert> for the assert() macro.
Fixes D43273.
Modified:
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
Modified: libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Feb 26 12:47:46 2018
@@ -55,31 +55,31 @@ test()
test(Iter(ia), Iter(ia + i), 0, pRes, pRes + i);
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
- std::exclusive_scan(v.begin(), v.end(), v.begin(), 50);
+ std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 50 + (int) i * 3);
+ assert(v[i] == 50 + i * 3);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
- std::exclusive_scan(v.begin(), v.end(), v.begin(), 30);
+ std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30});
for (size_t i = 0; i < v.size(); ++i)
assert(v[i] == 30 + triangle(i-1));
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
- std::exclusive_scan(v.begin(), v.end(), v.begin(), 40);
+ std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40});
for (size_t i = 0; i < v.size(); ++i)
assert(v[i] == 40 + triangle(i));
}
Modified: libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Feb 26 12:47:46 2018
@@ -74,11 +74,11 @@ int main()
{
std::vector<unsigned char> v(10);
std::iota(v.begin(), v.end(), static_cast<unsigned char>(1));
- std::vector<int> res;
+ std::vector<size_t> res;
std::exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 1, std::multiplies<>());
assert(res.size() == 10);
- int j = 1;
+ size_t j = 1;
assert(res[0] == 1);
for (size_t i = 1; i < v.size(); ++i)
{
Modified: libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp Mon Feb 26 12:47:46 2018
@@ -55,21 +55,21 @@ test()
test(Iter(ia), Iter(ia + i), pRes, pRes + i);
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
std::inclusive_scan(v.begin(), v.end(), v.begin());
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == (int)(i+1) * 3);
+ assert(v[i] == (i+1) * 3);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
std::inclusive_scan(v.begin(), v.end(), v.begin());
for (size_t i = 0; i < v.size(); ++i)
@@ -77,7 +77,7 @@ void basic_tests()
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
std::inclusive_scan(v.begin(), v.end(), v.begin());
for (size_t i = 0; i < v.size(); ++i)
@@ -85,7 +85,7 @@ void basic_tests()
}
{
- std::vector<int> v, res;
+ std::vector<size_t> v, res;
std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res));
assert(res.empty());
}
Modified: libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp Mon Feb 26 12:47:46 2018
@@ -61,21 +61,21 @@ test()
}
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>());
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == (int)(i+1) * 3);
+ assert(v[i] == (i+1) * 3);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>());
for (size_t i = 0; i < v.size(); ++i)
@@ -83,7 +83,7 @@ void basic_tests()
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>());
for (size_t i = 0; i < v.size(); ++i)
@@ -91,7 +91,7 @@ void basic_tests()
}
{
- std::vector<int> v, res;
+ std::vector<size_t> v, res;
std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>());
assert(res.empty());
}
Modified: libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp Mon Feb 26 12:47:46 2018
@@ -60,38 +60,38 @@ test()
}
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
- std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 50);
+ std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{50});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 50 + (int)(i+1) * 3);
+ assert(v[i] == 50 + (i+1) * 3);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
- std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 40);
+ std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{40});
for (size_t i = 0; i < v.size(); ++i)
assert(v[i] == 40 + triangle(i));
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
- std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 30);
+ std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), size_t{30});
for (size_t i = 0; i < v.size(); ++i)
assert(v[i] == 30 + triangle(i + 1));
}
{
- std::vector<int> v, res;
- std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), 40);
+ std::vector<size_t> v, res;
+ std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), size_t{40});
assert(res.empty());
}
@@ -99,11 +99,11 @@ void basic_tests()
{
std::vector<unsigned char> v(10);
std::iota(v.begin(), v.end(), static_cast<unsigned char>(1));
- std::vector<int> res;
- std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), 1);
+ std::vector<size_t> res;
+ std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), size_t{1});
assert(res.size() == 10);
- int j = 1;
+ size_t j = 1;
assert(res[0] == 1);
for (size_t i = 1; i < v.size(); ++i)
{
Modified: libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Feb 26 12:47:46 2018
@@ -87,38 +87,38 @@ test()
}
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
- std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 50, std::plus<>(), add_one{});
+ std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50}, std::plus<>(), add_one{});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 50 + (int) i * 4);
+ assert(v[i] == 50 + i * 4);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
- std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 30, std::plus<>(), add_one{});
+ std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30}, std::plus<>(), add_one{});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 30 + triangle(i - 1) + (int) i);
+ assert(v[i] == 30 + triangle(i - 1) + i);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
- std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 40, std::plus<>(), add_one{});
+ std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40}, std::plus<>(), add_one{});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 40 + triangle(i) + (int) i);
+ assert(v[i] == 40 + triangle(i) + i);
}
{
- std::vector<int> v, res;
- std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 40, std::plus<>(), add_one{});
+ std::vector<size_t> v, res;
+ std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), size_t{40}, std::plus<>(), add_one{});
assert(res.empty());
}
@@ -126,11 +126,11 @@ void basic_tests()
{
std::vector<unsigned char> v(10);
std::iota(v.begin(), v.end(), static_cast<unsigned char>(1));
- std::vector<int> res;
- std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 1, std::multiplies<>(), add_one{});
+ std::vector<size_t> res;
+ std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), size_t{1}, std::multiplies<>(), add_one{});
assert(res.size() == 10);
- int j = 1;
+ size_t j = 1;
assert(res[0] == 1);
for (size_t i = 1; i < res.size(); ++i)
{
Modified: libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp Mon Feb 26 12:47:46 2018
@@ -76,39 +76,39 @@ test()
}
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{});
- std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout, " "));
+ std::copy(v.begin(), v.end(), std::ostream_iterator<size_t>(std::cout, " "));
std::cout << std::endl;
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == (int)(i+1) * 4);
+ assert(v[i] == (i+1) * 4);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == triangle(i) + (int)(i + 1));
+ assert(v[i] == triangle(i) + i + 1);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == triangle(i + 1) + (int)(i + 1));
+ assert(v[i] == triangle(i + 1) + i + 1);
}
{
- std::vector<int> v, res;
+ std::vector<size_t> v, res;
std::transform_inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), add_one{});
assert(res.empty());
}
Modified: libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp Mon Feb 26 12:47:46 2018
@@ -87,38 +87,38 @@ test()
}
}
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
// Basic sanity
void basic_tests()
{
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::fill(v.begin(), v.end(), 3);
- std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, 50);
+ std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{50});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 50 + (int) (i + 1) * 4);
+ assert(v[i] == 50 + (i + 1) * 4);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 0);
- std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, 30);
+ std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{30});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 30 + triangle(i) + (int) (i + 1));
+ assert(v[i] == 30 + triangle(i) + i + 1);
}
{
- std::vector<int> v(10);
+ std::vector<size_t> v(10);
std::iota(v.begin(), v.end(), 1);
- std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, 40);
+ std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), add_one{}, size_t{40});
for (size_t i = 0; i < v.size(); ++i)
- assert(v[i] == 40 + triangle(i + 1) + (int) (i + 1));
+ assert(v[i] == 40 + triangle(i + 1) + i + 1);
}
{
- std::vector<int> v, res;
- std::transform_inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), add_one{}, 1);
+ std::vector<size_t> v, res;
+ std::transform_inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), add_one{}, size_t{1});
assert(res.empty());
}
@@ -126,11 +126,11 @@ void basic_tests()
{
std::vector<unsigned char> v(10);
std::iota(v.begin(), v.end(), static_cast<unsigned char>(1));
- std::vector<int> res;
- std::transform_inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), add_one{}, 1);
+ std::vector<size_t> res;
+ std::transform_inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), add_one{}, size_t{1});
assert(res.size() == 10);
- int j = 2;
+ size_t j = 2;
assert(res[0] == 2);
for (size_t i = 1; i < res.size(); ++i)
{
Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp Mon Feb 26 12:47:46 2018
@@ -52,7 +52,7 @@ int main()
{
// https://bugs.llvm.org/show_bug.cgi?id=31454
std::basic_string<veryLarge> s;
- veryLarge vl;
+ veryLarge vl = {};
s.push_back(vl);
s.push_back(vl);
s.push_back(vl);
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp Mon Feb 26 12:47:46 2018
@@ -16,6 +16,7 @@
#include <tuple>
#include <string>
+#include <cassert>
#include "test_macros.h"
#if TEST_HAS_BUILTIN_IDENTIFIER(__reference_binds_to_temporary)
More information about the cfe-commits
mailing list