Commit acdd0d80 authored by Hugo Cuvillier's avatar Hugo Cuvillier Committed by Facebook Github Bot

Make `folly::FixedString` compile with Xcode's toolchain.

Summary:
Xcode wasn't impressed when I tried to import `folly::FixedString` from a Objective-C++ context.

This seem to satisfy Xcode's toolchain.

Reviewed By: lambdapioneer

Differential Revision: D8855137

fbshipit-source-id: 7bb3b1039b30241797ec7f3df7c0bbdeffca87bf
parent e7401c7b
...@@ -70,13 +70,13 @@ using FixedStringBase = FixedStringBase_<>; ...@@ -70,13 +70,13 @@ using FixedStringBase = FixedStringBase_<>;
} }
constexpr std::size_t checkOverflow(std::size_t i, std::size_t max) { constexpr std::size_t checkOverflow(std::size_t i, std::size_t max) {
return i <= max ? i : (assertOutOfBounds(), max); return i <= max ? i : (void(assertOutOfBounds()), max);
} }
constexpr std::size_t checkOverflowOrNpos(std::size_t i, std::size_t max) { constexpr std::size_t checkOverflowOrNpos(std::size_t i, std::size_t max) {
return i == FixedStringBase::npos return i == FixedStringBase::npos
? max ? max
: (i <= max ? i : (assertOutOfBounds(), max)); : (i <= max ? i : (void(assertOutOfBounds()), max));
} }
// Intentionally NOT constexpr. See note above for assertOutOfBounds // Intentionally NOT constexpr. See note above for assertOutOfBounds
......
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