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
* 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;