Summary: When doing android development, we need to compile with
FOLLY_HAVE_BITS_FUNCTEXCEPT_H set for some flavors, and
FOLLY_HAVE_BITS_FUNCTEXCEPT_H unset for others (primarily for tests
run in the local (xcode) development platform). This diff adds some
more conditionals so it all works.
In this repro, these files are never used, so this is more or less a
noop, but this is the upstream so I'm making these changes here.
Reviewed By: @Gownta
Differential Revision:
D2202107
* limitations under the License.
*/
+#include <folly/Portability.h>
+
+// If FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set, this file compiles to
+// nothing.
+
+#if !FOLLY_HAVE_BITS_FUNCTEXCEPT_H
+
#include <folly/detail/FunctionalExcept.h>
#include <stdexcept>
#endif
FOLLY_NAMESPACE_STD_END
+
+#endif
#include <folly/Portability.h>
+#if !FOLLY_HAVE_BITS_FUNCTEXCEPT_H
+
FOLLY_NAMESPACE_STD_BEGIN
FOLLY_NORETURN void __throw_length_error(const char* msg);
FOLLY_NAMESPACE_STD_END
+#else
+#error This file should never be included if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set
+#endif
+
#endif