From: Igor Sugak Date: Tue, 2 Aug 2016 01:06:41 +0000 (-0700) Subject: folly: remove template argument to std::abs to fix build with libc++ X-Git-Tag: v2016.08.08.00~39 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=42cd3696a4aae657ec2ae420ed912abd3c274be6 folly: remove template argument to std::abs to fix build with libc++ Summary: libc++ doesn't implement `std::abs` as template. ```lang=bash ./../folly/fibers/Fiber.h:68:34: error: unexpected type name 'intptr_t': expected expression const size_t size = std::abs( ^ ``` Reviewed By: markisaa Differential Revision: D3645584 fbshipit-source-id: a2d672137f110b975412a94ae4c6d00da0bd0d43 --- diff --git a/folly/fibers/Fiber.h b/folly/fibers/Fiber.h index 29269b28..13f435de 100644 --- a/folly/fibers/Fiber.h +++ b/folly/fibers/Fiber.h @@ -64,7 +64,7 @@ class Fiber { std::pair getStack() const { void* const stack = std::min(fcontext_.stackLimit(), fcontext_.stackBase()); - const size_t size = std::abs( + const size_t size = std::abs( reinterpret_cast(fcontext_.stackBase()) - reinterpret_cast(fcontext_.stackLimit())); return {stack, size};