Remove unsafe tag and add presorted tag
[folly.git] / folly / small_vector.h
index d8911a077b2dd9fb561ceb52ca8c9f1c75ad44c4..26e92657d2f473865d4d0092e2c675b739e98a6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2011-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <boost/operators.hpp>
 #include <boost/type_traits.hpp>
 
-#include <folly/Assume.h>
 #include <folly/ConstexprMath.h>
 #include <folly/FormatTraits.h>
 #include <folly/Portability.h>
 #include <folly/SmallLocks.h>
 #include <folly/Traits.h>
+#include <folly/lang/Assume.h>
 #include <folly/memory/Malloc.h>
 #include <folly/portability/BitsFunctexcept.h>
 #include <folly/portability/Malloc.h>
@@ -413,6 +413,7 @@ class small_vector : public detail::small_vector_base<
   typedef value_type& reference;
   typedef value_type const& const_reference;
   typedef value_type* iterator;
+  typedef value_type* pointer;
   typedef value_type const* const_iterator;
   typedef std::ptrdiff_t difference_type;
 
@@ -420,6 +421,9 @@ class small_vector : public detail::small_vector_base<
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
   small_vector() = default;
+  // Allocator is unused here. It is taken in for compatibility with std::vector
+  // interface, but it will be ignored.
+  small_vector(const std::allocator<Value>&) {}
 
   small_vector(small_vector const& o) {
     auto n = o.size();