From: Hannes Roth Date: Thu, 20 Mar 2014 17:11:14 +0000 (-0700) Subject: (Wangle) Sanity check for the small_vector test X-Git-Tag: v0.22.0~633 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4738210a65ad039332807b7ce464d9423e40c1a;p=folly.git (Wangle) Sanity check for the small_vector test Summary: Let's double check that `small_vector` is doing the right thing. So it doesn't just accidentally work. Test Plan: `fbconfig folly/wangle && fbmake runtests` `fbconfig --clang folly/wangle && fbmake runtests` Reviewed By: marccelani@fb.com FB internal diff: D1231360 --- diff --git a/folly/wangle/test/FutureTest.cpp b/folly/wangle/test/FutureTest.cpp index 8afbdc17..a362e9bf 100644 --- a/folly/wangle/test/FutureTest.cpp +++ b/folly/wangle/test/FutureTest.cpp @@ -520,6 +520,12 @@ TEST(when, whenN) { /* Ensure that we can compile when_{all,any} with folly::small_vector */ TEST(when, small_vector) { + + static_assert(!FOLLY_IS_TRIVIALLY_COPYABLE(Future), + "Futures should not be trivially copyable"); + static_assert(!FOLLY_IS_TRIVIALLY_COPYABLE(Future), + "Futures should not be trivially copyable"); + using folly::small_vector; { small_vector> futures;