Summary:
Clang with libgcc-5 reported:
```lang=bash
folly/experimental/test/BitsTest.cpp:249:16: error: use of undeclared identifier 'pow'
auto value = pow(2, bits) * (negate ? -2.0 : 2.0) / 3.0;
^
```
Add missing include statement, and elaborate with the namespace.
Reviewed By: yfeldblum
Differential Revision:
D4385807
fbshipit-source-id:
a847dd439cd4c9f28ea8f222aa4ab60876949d13
* limitations under the License.
*/
+#include <cmath>
+
#include <folly/experimental/Bits.h>
#include <glog/logging.h>
if (std::is_signed<T>::value) {
--bits;
}
- auto value = pow(2, bits) * (negate ? -2.0 : 2.0) / 3.0;
+ auto value = std::pow(2, bits) * (negate ? -2.0 : 2.0) / 3.0;
CHECK_GE(value, std::numeric_limits<T>::min());
CHECK_LE(value, std::numeric_limits<T>::max());
return static_cast<T>(value);