X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fjson.cpp;h=ee56f0b1ea40634802e4720d7bdba94a10863f0a;hb=62134365a855a63a9dc1b8317ce44a4dd8430859;hp=ae2f2937ff95d52bd95fb37f74267f8955e7b737;hpb=2f0cabfb48b8a8df84f6453ef055e03ee1a34d51;p=folly.git diff --git a/folly/json.cpp b/folly/json.cpp index ae2f2937..ee56f0b1 100644 --- a/folly/json.cpp +++ b/folly/json.cpp @@ -615,8 +615,8 @@ std::string serialize(dynamic const& dyn, serialization_opts const& opts) { template size_t firstEscapableInWord(T s) { static_assert(std::is_unsigned::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) {