Commit 2f5fcde0 authored by Jon Maltiel Swenson's avatar Jon Maltiel Swenson Committed by Facebook Github Bot 2

Prevent compiler warning about mixing enumeral and non-enumeral types in ternary expression

Summary:
The GCC warning "warning: enumeral and non-enumeral type in conditional expression"
is logged a lot in many builds since lots of code depends on small_vector.  This diff
should prevent those warnings.

Reviewed By: yfeldblum

Differential Revision: D3762835

fbshipit-source-id: 49831e4364e716592287c05d1dbf1912326324f6
parent eb647573
......@@ -345,12 +345,10 @@ class small_vector
* 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment