Fix build breakage in hphp
authorAndrei Alexandrescu <aalexandre@fb.com>
Tue, 9 Jul 2013 23:11:19 +0000 (16:11 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 18 Jul 2013 18:55:35 +0000 (11:55 -0700)
Summary:
This should fix the build breakage in hphp caused by the latest fbstring changes (after being ported to engshare). Note that I'm flying blind here; I couldn't test with the hphp build because I don't have write access to engshare. @agallagher could you please make sure that this works after the fix?

fbconfig -r hphp && fbmake dbg

Test Plan: tested on folly

Reviewed By: tudorb@fb.com

FB internal diff: D880140

folly/test/FBStringTest.cpp

index 65fb7ad1711494b4e4c09385e63fc0e6c1e934a4..ede69e6a26393a65b09321b48b80796536849daa 100644 (file)
@@ -447,6 +447,12 @@ template <class String> void clause11_21_4_6_4(String & test) {
   pos = random(0, test.size());
   // Uncomment below to see a bug in gcc
   /*res = */test.insert(test.begin() + pos, il);
+
+  // Test with actual input iterators
+  stringstream ss;
+  ss << "hello cruel world";
+  auto i = istream_iterator<char>(ss);
+  test.insert(test.begin(), i, istream_iterator<char>());
 }
 
 template <class String> void clause11_21_4_6_5(String & test) {