#include <folly/Malloc.h>
#include <folly/Portability.h>
#include <folly/SmallLocks.h>
+#include <folly/portability/BitsFunctexcept.h>
#include <folly/portability/Constexpr.h>
#include <folly/portability/Malloc.h>
#include <folly/portability/TypeTraits.h>
* the user asks for less inlined elements than we can fit unioned
* into our value_type*, we will inline more than they asked.)
*/
- enum {
- MaxInline =
- constexpr_max(sizeof(Value*) / sizeof(Value), RequestedMaxInline),
- };
+ static constexpr std::size_t MaxInline{
+ constexpr_max(sizeof(Value*) / sizeof(Value), RequestedMaxInline)};
-public:
+ public:
typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
}
static constexpr size_type max_size() {
- return !BaseType::kShouldUseHeap ? MaxInline
+ return !BaseType::kShouldUseHeap ? static_cast<size_type>(MaxInline)
: BaseType::policyMaxSize();
}
reference at(size_type i) {
if (i >= size()) {
- throw std::out_of_range("index out of range");
+ std::__throw_out_of_range("index out of range");
}
return (*this)[i];
}
const_reference at(size_type i) const {
if (i >= size()) {
- throw std::out_of_range("index out of range");
+ std::__throw_out_of_range("index out of range");
}
return (*this)[i];
}