29 #define USING_STD_VECTOR 161 #ifdef USING_STD_VECTOR 163 #define VECTOR_ std::vector 166 #define VECTOR_ folly::fbvector 181 #include <type_traits> 184 #include <boost/iterator/iterator_adaptor.hpp> 185 #include <boost/preprocessor.hpp> 202 using namespace
folly;
260 D0(
const D0&) =
default;
262 explicit D0(std::nullptr_t) {}
269 D0(
const D0&) =
default;
271 explicit D0(std::nullptr_t) {}
279 D1(
const D1&) =
default;
281 explicit D1(std::nullptr_t) {}
288 D1(
const D1&) =
delete;
290 explicit D1(std::nullptr_t) {}
298 D2(
const D2&) =
default;
300 explicit D2(std::nullptr_t) {}
307 D2(
const D2&) =
default;
309 explicit D2(std::nullptr_t) {}
317 D3(
const D3&) =
default;
319 explicit D3(std::nullptr_t) {}
326 D3(
const D3&) =
default;
328 explicit D3(std::nullptr_t) {}
336 D4(
const D4&) =
default;
338 explicit D4(std::nullptr_t) {}
345 D4(
const D4&) =
default;
347 explicit D4(std::nullptr_t) {}
354 D1<(f & CC_DELETE) != 0>,
355 D2<(f & MC_DELETE) != 0>,
356 D3<(f & CA_DELETE) != 0>,
357 D4<(f & MA_DELETE) != 0> {
377 :
std::runtime_error(
"tick: " + s) {}
384 if (TicksLeft == 0) {
398 if (!(
f & DC_NOEXCEPT)) {
403 if (!(
f & CC_NOEXCEPT)) {
404 Tick(
"Data(const Data&)");
408 if (!(
f & MC_NOEXCEPT)) {
409 Tick(
"Data(Data&&)");
413 if (!(
f & OC_NOEXCEPT)) {
419 if (!(
f & CA_NOEXCEPT)) {
420 Tick(
"op=(const Data&)");
424 if (!(
f & MA_NOEXCEPT)) {
500 template <
bool isRelocatable>
505 if (!isRelocatable) {
506 Locations[
self] = uid;
513 if (!isRelocatable) {
514 Locations[
self] = uid;
516 print(
"Data(const Data&)");
521 if (!isRelocatable) {
522 Locations[
self] = uid;
524 print(
"Data(Data&&)");
530 if (!isRelocatable) {
531 Locations[
self] = uid;
539 if (!isRelocatable) {
540 Locations.erase(
self);
551 if (!isRelocatable) {
552 Locations[
self] = uid;
554 print(
"op=(const Data&)");
561 if (!isRelocatable) {
562 Locations[
self] = uid;
564 print(
"op=(Data&&)");
570 std::cerr << std::setw(20) << fun <<
": uid = " << std::setw(3) << uid;
571 if (!isRelocatable) {
572 std::cerr <<
", self = " <<
self;
574 std::cerr << std::endl;
589 template <Flags f = 0,
size_t pad = 0>
595 char spacehog[pad ? pad : 1];
614 template <Flags f,
size_t pad>
623 template <
typename T>
625 template <Flags f,
size_t pad>
628 template <
typename T>
630 template <Flags f,
size_t pad>
633 template <
typename T>
635 template <Flags f,
size_t pad>
651 typedef typename std::allocator<T>::pointer
pointer;
654 typedef typename std::allocator<T>::size_type
size_type;
668 return a == o.
a &&
id == o.
id;
671 return !(*
this == o);
679 cerr <<
"called allocate(0)" << endl;
680 throw runtime_error(
"allocate fail");
683 auto p = a.allocate(n);
691 cerr <<
"deallocate(nullptr, " << n <<
")" << endl;
692 FAIL() <<
"deallocate failed";
694 if (Allocated[p] != n) {
695 cerr <<
"deallocate(" << p <<
", " << n <<
") invalid: ";
696 if (Allocated[p] == 0) {
697 cerr <<
"never allocated";
698 }
else if (Allocated[p] ==
size_t(-1)) {
699 cerr <<
"already deallocated";
701 cerr <<
"wrong number (want " << Allocated[p] <<
")";
704 FAIL() <<
"deallocate failed";
706 if (Owner[p] !=
id) {
707 cerr <<
"deallocate(" << p <<
"), where pointer is owned by " << Owner[p]
708 <<
", instead of self - " <<
id << endl;
709 FAIL() <<
"deallocate failed";
715 template <
class U,
class...
Args>
718 a.construct(p, std::forward<Args>(args)...);
732 Tick(
"select allocator for copy");
733 return Alloc(
id + 1);
756 Tracker::UIDCount.clear();
758 Tracker::Locations.clear();
764 AllocTracker::Allocated.clear();
765 AllocTracker::Owner.clear();
777 ASSERT_GE(tot, 0) <<
"more objects deleted than constructed";
780 <<
"UIDTotal has incorrect number of objects";
783 for (
const auto& kv : Tracker::UIDCount) {
784 ASSERT_TRUE(kv.second >= 0) <<
"there exists " << kv.second
790 ASSERT_EQ(tot, altTot) <<
"UIDCount corrupted";
792 if (!Tracker::Locations.
empty()) {
794 <<
"Locations has incorrect number of objects";
795 for (
const auto& du : Tracker::Locations) {
796 ASSERT_EQ(du.second, du.first->uid) <<
"Locations contains wrong uid";
797 ASSERT_EQ(du.first, du.first->self) <<
"Data.self is corrupted";
805 template <
typename T>
808 std::is_copy_constructible<T>::value &&
809 std::is_copy_assignable<T>::value> {};
811 template <
typename T>
814 std::is_move_constructible<T>::value &&
815 std::is_move_assignable<T>::value> {};
817 template <
class Vector>
820 typename Vector::allocator_type,
821 std::allocator<typename Vector::value_type>>::value> {};
823 template <
typename T>
825 template <Flags f,
size_t pad>
828 is_move_constructibleAndAssignable<Data<f, pad>>::value ||
842 unsigned reslo, reshi;
844 __asm__ __volatile__(
"xorl %%eax,%%eax \n cpuid \n" ::
845 :
"%eax",
"%ebx",
"%ecx",
"%edx");
846 __asm__ __volatile__(
"rdtsc\n" :
"=a"(reslo),
"=d"(reshi));
847 __asm__ __volatile__(
"xorl %%eax,%%eax \n cpuid \n" ::
848 :
"%eax",
"%ebx",
"%ecx",
"%edx");
850 return ((
uint64_t)reshi << 32) | reslo;
858 #define IBOOST_PP_VARIADIC_SIZE(...) IBOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, \ 859 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, \ 860 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, \ 861 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, \ 862 7, 6, 5, 4, 3, 2, 1,) 863 #define IBOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, \ 864 e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, \ 865 e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, \ 866 e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, \ 867 e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size 869 #define IBOOST_PP_VARIADIC_TO_SEQ(...) \ 870 BOOST_PP_TUPLE_TO_SEQ(IBOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__)) 875 #define GEN_TEST(r, name, type) \ 877 string atype = PrettyType<typename type::allocator_type>()(); \ 878 string ptype = PrettyType<typename type::value_type>()(); \ 879 SCOPED_TRACE("allocator: " + atype); \ 881 SCOPED_TRACE("datatype: " + ptype); \ 883 test_##name##3 < type > (); \ 884 if (::testing::Test::HasFatalFailure()) \ 889 #define GEN_TYPE_TEST(r, name, type) \ 891 test_I_##name##3 < type > (); 892 #define GEN_RUNNABLE_TEST(r, name, type) \ 893 one = test_I_##name##3 < type > () || one; 895 #define GEN_LOOPER(r, d, arg) BOOST_PP_CAT(LOOPER_, arg) 896 #define GEN_VMAKER(r, d, arg) \ 898 BOOST_PP_CAT(VMAKER_, arg) { 899 #define GEN_UMAKER(r, d, arg) \ 901 BOOST_PP_CAT(UMAKER_, arg) \ 903 #define GEN_CLOSER(r, d, arg) BOOST_PP_CAT(CLOSER_, arg) 905 #define TYPIFY(r, d, name) BOOST_PP_CAT(TYPIFY_, name) 906 #define ARGIFY(r, d, name) TYPIFY(r, d, name) name 909 #define MAKE_TEST(ref, name, types, restriction, argseq, ...) \ 910 template <class Vector> void test_ ## name ## 2 (std::false_type) {} \ 911 template <class Vector> void test_ ## name ## 2 (std::true_type) { \ 912 BOOST_PP_SEQ_FOR_EACH(GEN_LOOPER, _, argseq) \ 916 BOOST_PP_SEQ_FOR_EACH(GEN_VMAKER, _, argseq) \ 918 test_ ## name <Vector, typename Vector::value_type, \ 919 typename Vector::allocator_type> ( __VA_ARGS__ ); \ 920 if (::testing::Test::HasFatalFailure()) { \ 924 BOOST_PP_SEQ_FOR_EACH(GEN_UMAKER, _, BOOST_PP_SEQ_REVERSE(argseq)) \ 928 BOOST_PP_SEQ_FOR_EACH(GEN_CLOSER, _, BOOST_PP_SEQ_REVERSE(argseq)) \ 930 template <class Vector> void test_ ## name ## 3 () { \ 931 test_ ## name ## 2 <Vector> (bool_constant< \ 932 restriction<typename Vector::value_type>::value && \ 933 is_copy_constructible<typename Vector::value_type>::value \ 937 template <class Vector> bool test_I_ ## name ## 2 (std::false_type) \ 939 template <class Vector> bool test_I_ ## name ## 2 (std::true_type) { \ 941 auto f = test_ ## name <Vector, \ 942 typename Vector::value_type, typename Vector::allocator_type>; \ 946 template <class Vector> bool test_I_ ## name ## 3 () { \ 947 return test_I_ ## name ## 2 <Vector> (bool_constant< \ 948 restriction<typename Vector::value_type>::value>()); \ 952 TEST(FBVector, name) { \ 953 SCOPED_TRACE("N3337 reference: " ref); \ 954 BOOST_PP_SEQ_FOR_EACH(GEN_TEST, name, types) \ 955 BOOST_PP_SEQ_FOR_EACH(GEN_TYPE_TEST, name, INTERFACE_TYPES) \ 957 BOOST_PP_SEQ_FOR_EACH(GEN_RUNNABLE_TEST, name, types) \ 959 FAIL() << "No tests qualified to run"; \ 964 #define DECL(name, ...) \ 965 template <class Vector, typename T, typename Allocator> \ 966 void test_##name(BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM( \ 967 ARGIFY, _, IBOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)))) 969 #define STL_TEST_I(ref, name, restriction, ...) \ 970 DECL(name, __VA_ARGS__); \ 976 IBOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__), \ 978 DECL(name, __VA_ARGS__) 980 #define STL_TEST(ref, name, restriction, ...) \ 981 STL_TEST_I(ref, name, restriction, z, ##__VA_ARGS__, ticks) 992 typedef VECTOR_<int, std::allocator<int>>
_TVIS;
993 typedef VECTOR_<int, Alloc<int>>
_TVI;
994 typedef VECTOR_<ED1, std::allocator<ED1>>
_TV1;
995 typedef VECTOR_<ED2, std::allocator<ED2>>
_TV2;
996 typedef VECTOR_<ED3, std::allocator<ED3>>
_TV3;
997 typedef VECTOR_<ED4, std::allocator<ED4>>
_TV4;
998 typedef VECTOR_<ED5, std::allocator<ED5>>
_TV5v1;
999 typedef VECTOR_<ED5, Alloc<ED5>>
_TV5;
1005 typedef VECTOR_<EP1, Alloc<EP1>>
_TP1;
1006 typedef VECTOR_<EP2, Alloc<EP2>>
_TP2;
1007 typedef VECTOR_<EP3, Alloc<EP3>>
_TP3;
1009 #define TEST_TYPES \ 1010 (_TVIS)(_TVI)(_TV1)(_TV2)(_TV3)(_TV4)(_TV5v1)(_TV5)(_TP1)(_TP2)(_TP3) 1024 #define INTERFACE_TYPES \ 1025 (_TVI)(VECTOR_<DD1>)(VECTOR_<DD2>)(VECTOR_<DD3>) \ 1026 (VECTOR_<DD4>)(VECTOR_<DD5>)(VECTOR_<DD6>) \ 1027 (VECTOR_<DD7>)(_TSpecialMA) 1033 template <
typename T>
1045 return typeid(
T).
name();
1049 template <Flags f,
size_t pad>
1058 if (
f & DC_DELETE) {
1061 if (
f & CC_DELETE) {
1064 if (
f & MC_DELETE) {
1067 if (
f & CA_DELETE) {
1070 if (
f & MA_DELETE) {
1079 if (
f & DC_NOEXCEPT) {
1082 if (
f & CC_NOEXCEPT) {
1085 if (
f & MC_NOEXCEPT) {
1088 if (
f & CA_NOEXCEPT) {
1091 if (
f & MA_NOEXCEPT) {
1098 tpe <<
"(relocatable)";
1102 tpe <<
"{pad " << pad <<
"}";
1109 template <
typename T>
1116 template <
typename T>
1131 #define SETUP hardReset(); 1140 #define TYPIFY_z std::nullptr_t 1142 Vector* a_p = nullptr; \ 1143 Vector* b_p = nullptr; \ 1144 typename Vector::value_type* t_p = nullptr; 1145 #define VMAKER_z std::nullptr_t z = nullptr; 1147 verify<Vector>(0); \ 1148 if (::testing::Test::HasFatalFailure()) { \ 1156 #define VERIFICATION \ 1157 if (b_p != nullptr) \ 1158 verify(t_p != nullptr, *a_p, *b_p); \ 1159 else if (a_p != nullptr) \ 1160 verify(t_p != nullptr, *a_p); \ 1162 verify<Vector>(t_p != nullptr); \ 1163 if (::testing::Test::HasFatalFailure()) \ 1166 #define TYPIFY_ticks int 1167 #define LOOPER_ticks \ 1168 int _maxTicks_ = 0; \ 1169 bool ticks_thrown = false; \ 1170 for (int ticks = -1; ticks < _maxTicks_; ++ticks) { 1171 #define VMAKER_ticks \ 1172 string ticks_st = folly::to<string>("ticks = ", ticks); \ 1173 SCOPED_TRACE(ticks_st); \ 1175 SCOPED_TRACE("pre-run verification"); \ 1180 #define UMAKER_ticks \ 1181 _maxTicks_ = Ticker::CountTicks; \ 1183 catch (const TickException&) { \ 1184 ticks_thrown = true; \ 1186 catch (const std::exception& e) { \ 1187 FAIL() << "EXCEPTION: " << e.what(); \ 1190 FAIL() << "UNKNOWN EXCEPTION"; \ 1192 if (ticks >= 0 && Ticker::CountTicks > ticks && !ticks_thrown) \ 1193 FAIL() << "CountTicks = " << Ticker::CountTicks << " > " << ticks \ 1195 << ", but no tick error was observed"; \ 1197 #define CLOSER_ticks } 1209 #if !FOLLY_SANITIZE_ADDRESS 1237 template <
class Vector>
1240 for (; i < ss.first; ++
i) {
1243 if (ss.second >= 0) {
1244 while (v.capacity() - v.size() != size_t(ss.second)) {
1250 template <
typename A>
1256 template <
typename T>
1265 #define TYPIFY_a Vector& 1266 #define LOOPER_a for (const auto& a_ss : VectorSizes) { 1268 Vector a(allocGen<typename Vector::allocator_type>::get()); \ 1270 populate(*a_p, a_ss); \ 1271 string a_st = folly::to<string>("a (", a.size(), "/", a.capacity(), ")"); \ 1275 if (::testing::Test::HasFatalFailure()) \ 1279 #define TYPIFY_b Vector& 1280 #define LOOPER_b for (int b_i = -2; b_i < (int)VectorSizes.size(); ++b_i) { 1282 Vector b_s(allocGen<typename Vector::allocator_type>::get()); \ 1287 b_st = "b is an alias of a"; \ 1288 } else if (b_i == -1) { \ 1290 new (&b_s) Vector(a); \ 1291 b_st = "b is a deep copy of a"; \ 1293 populate(b_s, VectorSizes[b_i]); \ 1294 b_st = folly::to<string>("b (", b_s.size(), "/", b_s.capacity(), ")"); \ 1300 if (::testing::Test::HasFatalFailure()) \ 1307 static const vector<int>
nSizes = {0, 1, 2, 9, 10, 11};
1309 #define TYPIFY_n int 1310 #define LOOPER_n for (int n : nSizes) { 1312 string n_st = folly::to<string>("n = ", n); \ 1320 static int ijarr[12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89};
1321 static int ijarC[12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89};
1323 #define TYPIFY_i int* 1327 SCOPED_TRACE("i = fib[0]"); 1331 #define TYPIFY_j int* 1332 #define LOOPER_j for (int j_i = 0; j_i < 12; ++j_i) { 1334 int* j = ijarr + j_i; \ 1335 string j_st = folly::to<string>("j = fib[", j_i, "]"); \ 1338 for (int j_c = 0; j_c < 12; ++j_c) \ 1339 ASSERT_EQ(ijarC[j_c], ijarr[j_c]); 1345 template <
class Vector>
1347 typename Vector::iterator it;
1378 cerr <<
"internal error" << endl;
1382 return make_pair(it, msg);
1385 #define TYPIFY_p typename Vector::iterator 1386 #define LOOPER_p for (int p_i = 0; p_i < 4; ++p_i) { 1388 auto p_im = iterSpotter(a, p_i); \ 1389 auto& p = p_im.first; \ 1390 auto& p_m = p_im.second; \ 1391 SCOPED_TRACE("p = " + p_m); 1395 #define TYPIFY_q typename Vector::iterator 1396 #define LOOPER_q for (int q_i = p_i; q_i < 4; ++q_i) { 1398 auto q_im = iterSpotter(a, q_i); \ 1399 auto& q = q_im.first; \ 1400 auto& q_m = q_im.second; \ 1401 SCOPED_TRACE("q = " + q_m); 1408 static const vector<int>
tVals = {0, 1, 2, 3, 17, 66, 521};
1410 #define TYPIFY_t typename Vector::value_type& 1411 #define LOOPER_t for (int t_v : tVals) { 1413 typename Vector::value_type t_s(t_v); \ 1414 t_p = addressof(t_s); \ 1415 string t_st = folly::to<string>("t(", t_v, ")"); \ 1416 if (t_v < 4 && a_p != nullptr) { \ 1417 auto t_im = iterSpotter(*a_p, t_v); \ 1418 if (t_im.first != a_p->end()) { \ 1419 t_p = addressof(*t_im.first); \ 1420 t_st = "t is " + t_im.second; \ 1423 typename Vector::value_type& t = *t_p; \ 1431 #define TYPIFY_m typename Vector::allocator_type 1433 int m_max = 1 + (a_p != nullptr); \ 1434 for (int m_i = 0; m_i < m_max; ++m_i) { 1436 typename Vector::allocator_type m = \ 1437 m_i == 0 ? typename Vector::allocator_type() : a_p->get_allocator(); 1445 template <
class Vector>
1447 ASSERT_TRUE(v.begin() <= v.end()) <<
"end is before begin";
1448 ASSERT_TRUE(v.empty() == (v.begin() == v.end())) <<
"empty != (begin == end)";
1449 ASSERT_TRUE(v.size() == size_t(distance(v.begin(), v.end())))
1450 <<
"size != end - begin";
1451 ASSERT_TRUE(v.size() <= v.capacity()) <<
"size > capacity";
1452 ASSERT_TRUE(v.capacity() <= v.max_size()) <<
"capacity > max_size";
1455 <<
"nullptr data points to at least one element";
1462 for (
auto kv : AllocTracker::Allocated) {
1463 if (kv.second !=
size_t(-1)) {
1467 ASSERT_EQ(cap, tot) <<
"the allocator counts " << tot
1469 "but the vector(s) have (combined) capacity " 1474 template <
class Vector>
1487 template <
class Vector>
1492 <<
"not all Data are in the vector";
1502 template <
class Vector>
1503 void verify(
int extras,
const Vector& v1,
const Vector& v2) {
1506 auto size = v1.size();
1507 auto cap = v1.capacity();
1510 cap += v2.capacity();
1531 template <Flags f,
size_t pad>
1535 template <
typename T>
1539 template <
typename T>
1544 template <
class Vector>
1554 data_ =
new int[size_];
1555 for (size_type
i = 0;
i < size_; ++
i) {
1567 if (size_ != o.
size_) {
1570 for (size_type
i = 0;
i < size_; ++
i) {
1580 cerr <<
"trying to access DataState out of bounds" << endl;
1592 template <
typename It,
class tag>
1594 Transformer<It, tag>,
1596 typename iterator_traits<It>::value_type,
1598 friend class boost::iterator_core_access;
1603 :
Transformer::iterator_adaptor_(it), dereferenced(new
set<It>()) {}
1606 if (dereferenced->find(this->base_reference()) != dereferenced->end()) {
1607 cerr <<
"iterator dereferenced more than once" << endl;
1610 dereferenced->insert(this->base_reference());
1611 return *this->base_reference();
1615 template <
typename It>
1619 template <
typename It>
1635 template <Flags f,
size_t pad>
1652 STL_TEST(
"23.2.1 Table 96.1-7", containerTypedefs, is_destructible) {
1655 "T != Vector::value_type");
1658 "T& != Vector::reference");
1661 "const T& != Vector::const_reference");
1664 typename iterator_traits<
1665 typename Vector::iterator>::iterator_category,
1666 forward_iterator_tag>::
value,
1667 "Vector::iterator is not a forward iterator");
1671 typename iterator_traits<typename Vector::iterator>::value_type>::
1673 "Vector::iterator does not iterate over type T");
1676 typename iterator_traits<
1677 typename Vector::const_iterator>::iterator_category,
1678 forward_iterator_tag>::
value,
1679 "Vector::const_iterator is not a forward iterator");
1683 typename iterator_traits<
1684 typename Vector::const_iterator>::value_type>::
value,
1685 "Vector::const_iterator does not iterate over type T");
1688 typename Vector::iterator,
1689 typename Vector::const_iterator>::
value,
1690 "Vector::iterator is not convertible to Vector::const_iterator");
1693 "Vector::difference_type is not signed");
1696 typename Vector::difference_type,
1697 typename iterator_traits<
1698 typename Vector::iterator>::difference_type>::
value,
1699 "Vector::difference_type != Vector::iterator::difference_type");
1702 typename Vector::difference_type,
1703 typename iterator_traits<
1704 typename Vector::const_iterator>::difference_type>::
value,
1705 "Vector::difference_type != Vector::const_iterator::difference_type");
1708 "Vector::size_type is not unsigned");
1710 sizeof(
typename Vector::size_type) >=
1711 sizeof(
typename Vector::difference_type),
1712 "Vector::size_type is smaller than Vector::difference_type");
1715 STL_TEST(
"23.2.1 Table 96.8-9", emptyConstruction, is_destructible) {
1740 <<
"single push_back increased capacity to " << u.capacity();
1743 <<
"first object did not get emplaced correctly";
1745 for (
int i = 0;
i < 3; ++
i) {
1746 auto cap = u.capacity();
1747 while (u.size() < cap) {
1749 ASSERT_EQ(cap, u.capacity()) <<
"Vector grew when it did not need to";
1751 <<
"push_back with excess capacity failed";
1757 ASSERT_GT(u.capacity(), cap) <<
"capacity did not grow on overflow";
1760 <<
"grow object did not get emplaced correctly";
1764 STL_TEST(
"23.2.1 Table 96.10-11", copyConstruction, is_copy_constructible,
a) {
1767 auto am =
a.get_allocator();
1772 std::allocator_traits<Allocator>::select_on_container_copy_construction(
1773 am) == u.get_allocator());
1776 (ca.data() ==
nullptr && u.data() ==
nullptr) || (ca.data() != u.data()))
1777 <<
"only a shallow copy was made";
1785 STL_TEST(
"23.2.1 Table 96.12", moveConstruction, is_destructible,
a) {
1787 auto m =
a.get_allocator();
1797 Vector u2 =
move(
a);
1803 auto am =
a.get_allocator();
1804 auto bm =
b.get_allocator();
1808 if (std::allocator_traits<
1815 ASSERT_TRUE(&
a == &
b || dsb ==
a) <<
"move assignment did not create a copy";
1819 STL_TEST(
"23.2.1 Table 96.14", destructible, is_destructible) {
1823 STL_TEST(
"23.2.1 Table 96.15-18", iterators, is_destructible,
a) {
1827 auto itb =
a.begin();
1828 auto citb = ca.begin();
1829 auto Citb =
a.cbegin();
1831 auto cite = ca.end();
1832 auto Cite =
a.cend();
1836 ASSERT_TRUE(dsa ==
a) <<
"call to begin or end modified internal data";
1838 ASSERT_TRUE(citb == Citb) <<
"cv.begin != v.cbegin";
1841 if (ca.size() == 0) {
1842 ASSERT_TRUE(itb == ite) <<
"begin != end when empty";
1843 ASSERT_TRUE(Citb == Cite) <<
"cbegin != cend when empty";
1845 ASSERT_TRUE(itb != ite) <<
"begin == end when non-empty";
1846 ASSERT_TRUE(Citb != Cite) <<
"cbegin == cend when non-empty";
1849 auto dist = size_t(std::distance(itb, ite));
1850 auto Cdist = size_t(std::distance(Citb, Cite));
1852 ASSERT_TRUE(Cdist == ca.size()) <<
"distance(cbegin, cend) != size";
1855 STL_TEST(
"23.2.1 Table 96.19-20", equitable, is_arithmetic,
a,
b) {
1861 ASSERT_TRUE((
bool)(ca == cb) == (
bool)(dsa == dsb))
1862 <<
"== does not return equality";
1864 <<
"!= is not the opposite of ==";
1870 STL_TEST(
"23.2.1 Table 96.21", memberSwappable, is_destructible,
a,
b) {
1879 auto adata =
a.data();
1880 auto bdata =
b.data();
1881 auto am =
a.get_allocator();
1882 auto bm =
b.get_allocator();
1887 FAIL() <<
"swap is noexcept";
1903 STL_TEST(
"23.2.1 Table 96.22", nonmemberSwappable, is_destructible,
a,
b) {
1912 auto adata =
a.data();
1913 auto bdata =
b.data();
1914 auto am =
a.get_allocator();
1915 auto bm =
b.get_allocator();
1920 FAIL() <<
"swap is noexcept";
1937 "23.2.1 Table 96.23",
1944 #ifdef USING_STD_VECTOR 1945 if (std::allocator_traits<
1956 auto am =
a.get_allocator();
1957 auto bm =
b.get_allocator();
1959 Vector& ret =
a = cb;
1961 if (std::allocator_traits<
1968 ASSERT_TRUE(dsb ==
a) <<
"copy-assign not equal to original";
1971 STL_TEST(
"23.2.1 Table 96.24-26", sizeops, is_destructible) {
1978 STL_TEST(
"23.2.1 Table 97.1-2", reversibleContainerTypedefs, is_destructible) {
1981 typename Vector::reverse_iterator,
1982 std::reverse_iterator<typename Vector::iterator>>::
value,
1983 "Vector::reverse_iterator != reverse_iterator<Vector:iterator");
1986 typename Vector::const_reverse_iterator,
1987 std::reverse_iterator<typename Vector::const_iterator>>::
value,
1988 "Vector::const_reverse_iterator != " 1989 "const_reverse_iterator<Vector::iterator");
1992 STL_TEST(
"23.2.1 Table 97.3-5", reversibleIterators, is_destructible,
a) {
1996 auto ritb =
a.rbegin();
1997 auto critb = ca.rbegin();
1998 auto Critb =
a.crbegin();
1999 auto rite =
a.rend();
2000 auto crite = ca.rend();
2001 auto Crite =
a.crend();
2005 ASSERT_TRUE(ds ==
a) <<
"call to rbegin or rend modified internal data";
2007 ASSERT_TRUE(critb == Critb) <<
"cv.rbegin != v.crbegin";
2008 ASSERT_TRUE(crite == Crite) <<
"cv.rend != v.crend";
2010 if (ca.size() == 0) {
2011 ASSERT_TRUE(ritb == rite) <<
"rbegin != rend when empty";
2012 ASSERT_TRUE(Critb == Crite) <<
"crbegin != crend when empty";
2014 ASSERT_TRUE(ritb != rite) <<
"rbegin == rend when non-empty";
2015 ASSERT_TRUE(Critb != Crite) <<
"crbegin == crend when non-empty";
2018 auto dist = size_t(std::distance(ritb, rite));
2019 auto Cdist = size_t(std::distance(Critb, Crite));
2021 ASSERT_TRUE(Cdist == ca.size()) <<
"distance(crbegin, crend) != size";
2027 STL_TEST(
"23.2.1 Table 98", comparable, is_arithmetic) {
2028 const Vector v1 = {1, 2, 3, 4};
2029 const Vector v2 = {1, 2, 3, 4, 5};
2030 const Vector v3 = {1, 2, 2};
2031 const Vector v4 = {1, 2, 2, 4, 5};
2032 const Vector v5 = {};
2033 const Vector v6 = {1, 2, 3, 4};
2046 STL_TEST(
"23.2.1 Table 99.1", allocatorTypedefs, is_destructible) {
2049 "Vector and vector's allocator value_type mismatch");
2052 STL_TEST(
"23.2.1 Table 99.2", getAllocator, is_destructible) {
2056 STL_TEST(
"23.2.1 Table 99.3", defaultAllocator, is_destructible) {
2072 STL_TEST(
"23.2.1 Table 99.5", copyWithAllocator, is_copy_constructible,
a,
m) {
2082 (ca.data() ==
nullptr && u.data() ==
nullptr) || (ca.data() != u.data()))
2083 <<
"only a shallow copy was made";
2087 "23.2.1 Table 99.6",
2088 moveConstructionWithAllocator,
2096 "23.2.1 Table 99.6",
2097 moveConstructionWithAllocatorSupplied,
2098 is_move_constructible,
2101 bool deep =
m !=
a.get_allocator();
2102 auto osize =
a.size();
2111 if (!AllocTracker::Allocated.
empty()) {
2119 STL_TEST(
"23.2.1 Table 99.7-9", allocAssign, is_destructible) {
2123 STL_TEST(
"23.2.1-7", nAllocConstruction, is_copy_constructible, n,
m) {
2124 #ifndef USING_STD_VECTOR 2133 STL_TEST(
"23.2.1-7", nCopyAllocConstruction, is_copy_constructible, n,
t,
m) {
2137 Vector u(n, ct, cm);
2144 forwardIteratorAllocConstruction,
2151 const auto& cfi = fi;
2152 const auto& cfj = fj;
2155 Vector u(cfi, cfj, cm);
2162 inputIteratorAllocConstruction,
2163 is_move_constructible,
2167 #ifdef USING_STD_VECTOR 2174 const auto& cii = ii;
2175 const auto& cij = ij;
2178 Vector u(cii, cij, cm);
2183 STL_TEST(
"23.2.1-7", ilAllocConstruction, is_arithmetic,
m) {
2191 Vector u({1, 4, 7}, cm);
2201 const Vector* cv =
nullptr;
2202 typename Vector::size_type*
s =
nullptr;
2223 STL_TEST(
"23.2.3 Table 100.1, alt", nConstruction, is_constructible, n) {
2231 STL_TEST(
"23.2.3 Table 100.1", nCopyConstruction, is_copy_constructible, n,
t) {
2237 ASSERT_EQ(n, u.size()) <<
"Vector(n, t).size() != n" << endl;
2238 for (
const auto&
val : u) {
2240 <<
"not all elements of Vector(n, t) are equal to t";
2245 "23.2.3 Table 100.2",
2246 forwardIteratorConstruction,
2255 const auto& cfi = fi;
2256 const auto& cfj = fj;
2263 ASSERT_EQ(j -
i, u.size()) <<
"u(i,j).size() != j-i";
2264 for (
auto it = u.begin(); it != u.end(); ++it, ++
i) {
2270 "23.2.3 Table 100.2",
2271 inputIteratorConstruction,
2272 is_move_constructible,
2275 #ifdef USING_STD_VECTOR 2282 const auto& cii = ii;
2283 const auto& cij = ij;
2288 ASSERT_EQ(j -
i, u.size()) <<
"u(i,j).size() != j-i";
2289 for (
auto it = u.begin(); it != u.end(); ++it, ++
i) {
2294 STL_TEST(
"23.2.3 Table 100.3", ilConstruction, is_arithmetic) {
2303 Vector u = {1, 4, 7};
2306 ASSERT_EQ(3, u.size()) <<
"u(il).size() fail";
2308 auto it = u.begin();
2309 for (; it != u.end(); ++it, i += 3) {
2314 STL_TEST(
"23.2.3 Table 100.4", ilAssignment, is_arithmetic,
a) {
2323 auto am =
a.get_allocator();
2325 Vector&
b =
a = {1, 4, 7};
2328 ASSERT_TRUE(&b == &
a) <<
"'a = ...' did not return *this";
2330 ASSERT_EQ(3,
a.size()) <<
"u(il).size() fail";
2332 auto it =
a.begin();
2333 for (; it !=
a.end(); ++it, i += 3) {
2341 template <
class Vector>
2350 for (; i < idx; ++
i) {
2353 for (; i < idx + n; ++
i) {
2356 for (; size_t(i) < a.size(); ++
i) {
2362 "23.2.3 Table 100.5",
2363 iteratorEmplacement,
2368 int idx = distance(
a.begin(), p);
2369 auto am =
a.get_allocator();
2371 auto q =
a.emplace(p, 44);
2374 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2379 "23.2.3 Table 100.6",
2386 int idx = distance(
a.begin(), p);
2388 auto am =
a.get_allocator();
2391 auto q =
a.insert(p, ct);
2394 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2399 "23.2.3 Table 100.7",
2400 iteratorInsertionRV,
2406 if (
a.data() <= addressof(
t) && addressof(
t) <
a.data() +
a.size()) {
2411 int idx = distance(
a.begin(), p);
2413 auto am =
a.get_allocator();
2418 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2423 "23.2.3 Table 100.8",
2431 int idx = distance(
a.begin(), p);
2433 auto am =
a.get_allocator();
2436 #ifndef USING_STD_VECTOR 2443 #ifndef USING_STD_VECTOR 2444 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2450 template <
class Vector>
2459 for (; i < idx; ++
i) {
2462 for (; i < idx + (e -
b); ++
i) {
2465 for (; size_t(i) < a.size(); ++
i) {
2471 "23.2.3 Table 100.9",
2472 iteratorInsertionIterator,
2479 int idx = distance(
a.begin(), p);
2483 auto am =
a.get_allocator();
2484 const auto& cfi = fi;
2485 const auto& cfj = fj;
2487 #ifndef USING_STD_VECTOR 2491 a.insert(p, cfi, cfj);
2494 #ifndef USING_STD_VECTOR 2495 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2502 "23.2.3 Table 100.9",
2503 iteratorInsertionInputIterator,
2510 int idx = distance(
a.begin(), p);
2514 auto am =
a.get_allocator();
2515 const auto& cii = ii;
2516 const auto& cij = ij;
2518 #ifndef USING_STD_VECTOR 2522 a.insert(p, cii, cij);
2525 #ifndef USING_STD_VECTOR 2526 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2532 STL_TEST(
"23.2.3 Table 100.10", iteratorInsertIL, is_arithmetic,
a, p) {
2542 int idx = distance(
a.begin(), p);
2543 auto am =
a.get_allocator();
2545 #ifndef USING_STD_VECTOR 2549 a.insert(p, {1, 4, 7});
2552 #ifndef USING_STD_VECTOR 2553 ASSERT_EQ(idx, distance(
a.begin(), q)) <<
"incorrect iterator returned";
2556 int ila[] = {1, 4, 7};
2562 template <
class Vector>
2566 auto it = a.begin();
2567 for (; it != a.end(); ++it, ++
i) {
2575 STL_TEST(
"23.2.3 Table 100.11", iteratorErase, is_move_assignable,
a, p) {
2581 int idx = distance(
a.begin(), p);
2582 auto am =
a.get_allocator();
2584 auto rit =
a.erase(p);
2587 ASSERT_EQ(idx, distance(
a.begin(), rit)) <<
"wrong iterator returned";
2592 "23.2.3 Table 100.12",
2603 int idx = distance(
a.begin(), p);
2604 auto am =
a.get_allocator();
2606 auto rit =
a.erase(p, q);
2609 ASSERT_EQ(idx, distance(
a.begin(), rit)) <<
"wrong iterator returned";
2616 STL_TEST(
"23.2.3 Table 100.13", clear, is_destructible,
a) {
2617 auto am =
a.get_allocator();
2622 FAIL() <<
"clear must be noexcept";
2629 STL_TEST(
"23.2.3 Table 100.14", assignRange, is_move_assignable,
a,
i, j) {
2632 const auto& cfi = fi;
2633 const auto& cfj = fj;
2634 auto am =
a.get_allocator();
2640 for (
auto it =
a.begin(); it !=
a.end(); ++it, ++
i) {
2646 "23.2.3 Table 100.14",
2654 const auto& cii = ii;
2655 const auto& cij = ij;
2656 auto am =
a.get_allocator();
2662 for (
auto it =
a.begin(); it !=
a.end(); ++it, ++
i) {
2667 STL_TEST(
"23.2.3 Table 100.15", assignIL, is_arithmetic,
a) {
2676 auto am =
a.get_allocator();
2678 a.assign({1, 4, 7});
2681 int ila[] = {1, 4, 7};
2685 for (
auto it =
a.begin(); it !=
a.end(); ++it, ++
i) {
2691 "23.2.3 Table 100.16",
2697 auto am =
a.get_allocator();
2705 for (
auto it =
a.begin(); it !=
a.end(); ++it) {
2721 const Vector& ca =
a;
2737 const Vector& ca =
a;
2742 STL_TEST(
"23.2.3 Table 101.4", emplaceBack, is_move_constructible,
a) {
2744 auto adata =
a.data();
2745 int excess =
a.capacity() -
a.size();
2746 auto am =
a.get_allocator();
2751 ASSERT_TRUE(dsa ==
a) <<
"failed strong exception guarantee";
2757 ASSERT_TRUE(
a.data() == adata) <<
"unnecessary relocation";
2761 auto it =
a.begin();
2762 for (; i < dsa.
size(); ++
i, ++it) {
2771 auto adata =
a.data();
2772 int excess =
a.capacity() -
a.size();
2773 auto am =
a.get_allocator();
2779 ASSERT_TRUE(dsa ==
a) <<
"failed strong exception guarantee";
2785 ASSERT_TRUE(
a.data() == adata) <<
"unnecessary relocation";
2789 auto it =
a.begin();
2790 for (; i < dsa.
size(); ++
i, ++it) {
2796 STL_TEST(
"23.2.3 Table 101.8", pushBackRV, is_move_constructible,
a,
t) {
2799 auto adata =
a.data();
2800 int excess =
a.capacity() -
a.size();
2801 auto am =
a.get_allocator();
2806 ASSERT_TRUE(dsa ==
a) <<
"failed strong exception guarantee";
2812 ASSERT_TRUE(
a.data() == adata) <<
"unnecessary relocation";
2816 auto it =
a.begin();
2817 for (; i < dsa.
size(); ++
i, ++it) {
2823 STL_TEST(
"23.2.3 Table 100.10", popBack, is_destructible,
a) {
2829 auto am =
a.get_allocator();
2836 auto it =
a.begin();
2837 for (; it !=
a.end(); ++it, ++
i) {
2842 STL_TEST(
"23.2.3 Table 100.11", operatorBrace, is_destructible,
a) {
2844 for (
size_t i = 0;
i < ca.size(); ++
i) {
2857 for (
size_t i = 0;
i < ca.size(); ++
i) {
2865 FAIL() <<
"at(size) should have thrown an error";
2866 }
catch (
const std::out_of_range& e) {
2868 FAIL() <<
"at(size) threw error other than out_of_range";
2886 Vector u1(mfi, mfj);
2887 Vector u2(mii, mij);
2889 u1.insert(u1.begin(), mfi, mfj);
2890 u1.insert(u1.begin(), mii, mij);
2892 u1.assign(mfi, mfj);
2893 u1.assign(mii, mij);
2900 STL_TEST(
"23.3.6.4", dataAndCapacity, is_destructible) {
2907 auto adata =
a.data();
2908 auto ocap =
a.capacity();
2909 auto am =
a.get_allocator();
2914 if (
size_t(n) <= ocap) {
2923 STL_TEST(
"23.3.6.3", lengthError, is_move_constructible) {
2924 auto mx = Vector().max_size();
2933 FAIL() <<
"reserve(big) should have thrown an error";
2934 }
catch (
const std::length_error& e) {
2936 FAIL() <<
"reserve(big) threw error other than length_error";
2943 auto am =
a.get_allocator();
2951 for (
int i = 0;
i < n; ++
i) {
2955 for (
int i = 0;
i < sz; ++
i) {
2962 #ifdef USING_STD_VECTOR 2963 if (
a.data() <= addressof(
t) && addressof(
t) <
a.data() +
a.size())
2969 auto am =
a.get_allocator();
2979 for (
int i = 0;
i < n; ++
i) {
2984 for (; i < sz; ++
i) {
2987 for (; i < n; ++
i) {
2993 STL_TEST(
"23.3.6.3", shrinkToFit, is_move_constructible,
a) {
2996 a.reserve(
a.capacity() * 11);
2998 auto ocap =
a.capacity();
3001 auto am =
a.get_allocator();
3006 FAIL() <<
"shrink_to_fit should swallow errors";
3015 ASSERT_TRUE(
a.capacity() == 0 ||
a.capacity() < ocap) <<
"Look into this";
3019 #ifndef USING_STD_VECTOR 3022 !is_same<Allocator, std::allocator<T>>::
value ||
3023 sizeof(Vector) == 3 *
sizeof(
void*),
3024 "fbvector has default allocator, but has size != 3*sizeof(void*)");
3029 auto cap =
a.capacity();
3030 auto data =
a.data();
3038 auto alloc =
a.get_allocator();
3039 for (
size_t i = 0;
i < sz; ++
i) {
3042 if (guts !=
nullptr) {
3045 std::allocator<typename decltype(alloc)::value_type>>
::value) {
3048 std::allocator_traits<decltype(alloc)>::deallocate(alloc, guts, cap);
3057 auto cap =
a.capacity();
3072 gflags::ParseCommandLineFlags(&argc, &argv,
true);
#define ASSERT_GE(val1, val2)
#define ASSERT_GT(val1, val2)
Tracker(Tracker *self, int uid)
static map< void *, size_t > Allocated
void BENCHFUN() resize(size_t iters, size_t arg)
static std::map< const Tracker *, int > Locations
static bool HasFatalFailure()
folly::fbvector< EP3, Alloc< EP3 > > _TP3
#define FOLLY_GNU_DISABLE_WARNING(warningName)
void populate(Vector &v, const pair< int, int > &ss)
TickException(const std::string &s)
#define FOLLY_POP_WARNING
folly::fbvector< ED3, std::allocator< ED3 > > _TV3
void operator=(Counter &&) noexcept
folly::fbvector< ED4, std::allocator< ED4 > > _TV4
#define ASSERT_EQ(val1, val2)
Counter(std::nullptr_t) noexcept
int operator[](size_type i)
#define FOLLY_PUSH_WARNING
bool operator==(const DataState &o) const
DataTicker(const DataTicker &) noexcept((f &CC_NOEXCEPT)!=0)
#define ASSERT_LT(val1, val2)
pointer allocate(size_type n)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
T * relinquish(fbvector< T, A > &v)
void softReset(int ticks=-1)
isPropSwap< T > propagate_on_container_swap
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
static std::map< int, int > UIDCount
constexpr detail::Map< Move > move
folly::fbvector< EP2, Alloc< EP2 > > _TP2
folly::fbvector< DDSMA, Alloc< DDSMA > > _TSpecialMA
DataTracker(DataTracker &&o) noexcept
#define ASSERT_LE(val1, val2)
folly::fbvector< EP1, Alloc< EP1 > > _TP1
Data< ALL_DELETE &~DC_DELETE > DD5
void print(const std::string &fun)
static map< void *, int > Owner
std::allocator< T >::value_type value_type
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
folly::fbvector< int, std::allocator< int > > _TVIS
—— Concurrent Priority Queue Implementation ——
Data< ALL_DELETE|PROP_MOVE > DDSMA
void construct(U *p, Args &&...args)
void verifyAllocator(int ele, int cap)
requires E e noexcept(noexcept(s.error(std::move(e))))
constexpr State operator&(State a, State b)
DataTicker(DataTicker &&) noexcept((f &MC_NOEXCEPT)!=0)
int main(int argc, char **argv)
bool_constant< true > true_type
#define STL_TEST(ref, name, restriction,...)
ThreadCachedInt< int64_t > Counter
static const vector< pair< int, int > > VectorSizes
Data< CA_DELETE|MA_DELETE > DD3
DataState(const Vector &v)
Data< DC_DELETE|CC_DELETE|MC_DELETE > DD2
void eraseCheck(Vector &a, DataState< Vector > &dsa, int idx, int n)
DataTracker(int uid) noexcept
void BENCHFUN() reserve(int iters, int size)
constexpr auto size(C const &c) -> decltype(c.size())
Data< MC_NOEXCEPT|CC_DELETE > ED4
DataTracker & operator=(DataTracker &&o) noexcept
constexpr auto empty(C const &c) -> decltype(c.empty())
string Print(const T &value)
std::integral_constant< bool, B > bool_constant
void BENCHFUN() pushBack(int iters, int initialSize)
static const vector< int > nSizes
folly::fbvector< ED5, std::allocator< ED5 > > _TV5v1
std::allocator< T >::difference_type difference_type
folly::fbvector< ED2, std::allocator< ED2 > > _TV2
folly::fbvector< int, Alloc< int > > _TVI
void insertNTCheck(const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
void verifyVector(const Vector &v)
static map< string, int > m
DataTicker() noexcept(f &DC_NOEXCEPT)
void operator=(const Counter &) noexcept
std::uniform_int_distribution< milliseconds::rep > dist
bool operator!=(const Alloc &o) const
void attach(fbvector< T, A > &v, T *data, size_t sz, size_t cap)
static const char *const value
void deallocate(pointer p, size_type n)
std::allocator< T >::const_pointer const_pointer
folly::fbvector< ED1, std::allocator< ED1 > > _TV1
bool operator==(const Alloc &o) const
DataTracker & operator=(const DataTracker &o) noexcept
Vector::size_type size_type
DataTicker(std::nullptr_t) noexcept((f &OC_NOEXCEPT)!=0)
static void Tick(const std::string &s)
isPropMove< T > propagate_on_container_move_assignment
Data< IS_RELOCATABLE > ED5
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Data< CC_DELETE|MC_DELETE > DD4
#define ASSERT_NE(val1, val2)
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)
DataTracker(const DataTracker &o) noexcept
std::allocator< T >::size_type size_type
Counter(const Counter &) noexcept
void insertItCheck(const Vector &a, DataState< Vector > &dsa, int idx, int *b, int *e)
Alloc(Alloc &&o) noexcept
static int CountLoggedConstruction
#define ASSERT_TRUE(condition)
std::pair< typename Vector::iterator, string > iterSpotter(Vector &v, int i)
static constexpr uint64_t data[1]
isPropCopy< T > propagate_on_container_copy_assignment
void operator=(DataTicker &&) noexcept((f &MA_NOEXCEPT)!=0)
void operator=(const DataTicker &) noexcept((f &CA_NOEXCEPT)!=0)
#define FOLLY_FALLTHROUGH
folly::fbvector< ED5, Alloc< ED5 > > _TV5
Counter(Counter &&) noexcept
static const vector< int > tVals
D0 & operator=(const D0 &)=default
std::allocator< T >::pointer pointer
Alloc select_on_container_copy_construction() const
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)