projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revise API to load cert/key in SSLContext.
[folly.git]
/
folly
/
small_vector.h
diff --git
a/folly/small_vector.h
b/folly/small_vector.h
index b8009b018acf4e1231fc20a13a772ce71518a24c..67f18108b0c7b7dc37d08af0f331e57d954c6812 100644
(file)
--- a/
folly/small_vector.h
+++ b/
folly/small_vector.h
@@
-45,13
+45,13
@@
#include <boost/operators.hpp>
#include <boost/type_traits.hpp>
#include <boost/operators.hpp>
#include <boost/type_traits.hpp>
-#include <folly/Assume.h>
#include <folly/ConstexprMath.h>
#include <folly/FormatTraits.h>
#include <folly/ConstexprMath.h>
#include <folly/FormatTraits.h>
-#include <folly/Malloc.h>
#include <folly/Portability.h>
#include <folly/SmallLocks.h>
#include <folly/Traits.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>
#include <folly/portability/TypeTraits.h>
#include <folly/portability/BitsFunctexcept.h>
#include <folly/portability/Malloc.h>
#include <folly/portability/TypeTraits.h>
@@
-378,7
+378,7
@@
T* pointerFlagClear(T* p) {
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes;
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes;
}
-}
+}
// namespace detail
//////////////////////////////////////////////////////////////////////
FOLLY_PACK_PUSH
//////////////////////////////////////////////////////////////////////
FOLLY_PACK_PUSH
@@
-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& 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;
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;
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();
small_vector(small_vector const& o) {
auto n = o.size();
@@
-1137,7
+1141,7
@@
class small_vector : public detail::small_vector_base<
union Data {
explicit Data() {
union Data {
explicit Data() {
- pdata_.heap_ =
0
;
+ pdata_.heap_ =
nullptr
;
}
PointerType pdata_;
}
PointerType pdata_;