Summary: MSVC doesn't allow non-static locals to be accessed within a non-capturing lambda, and some were introduced into the json code.
Reviewed By: yfeldblum
Differential Revision:
D4856242
fbshipit-source-id:
b2db36ca37a79a41237d39cc7e7b839a5416922f
template <class T>
size_t firstEscapableInWord(T s) {
static_assert(std::is_unsigned<T>::value, "Unsigned integer required");
template <class T>
size_t firstEscapableInWord(T s) {
static_assert(std::is_unsigned<T>::value, "Unsigned integer required");
- constexpr T kOnes = ~T() / 255; // 0x...0101
- constexpr T kMsbs = kOnes * 0x80; // 0x...8080
+ static constexpr T kOnes = ~T() / 255; // 0x...0101
+ static constexpr T kMsbs = kOnes * 0x80; // 0x...8080
// Sets the MSB of bytes < b. Precondition: b < 128.
auto isLess = [](T w, uint8_t b) {
// Sets the MSB of bytes < b. Precondition: b < 128.
auto isLess = [](T w, uint8_t b) {