Support -Wsign-compare compilation
authorSean Cannella <seanc@fb.com>
Wed, 10 Dec 2014 21:15:55 +0000 (13:15 -0800)
committerDave Watson <davejwatson@fb.com>
Thu, 11 Dec 2014 16:02:07 +0000 (08:02 -0800)
commitdb376afe1c715a3aa89faebe410ba2acaae2df33
treeb26bea3432428482a8e86781e87890ca3fa9f4fd
parent25e200e22d254f860f693e347706f918aa4de9ab
Support -Wsign-compare compilation

Summary:
Due to how Conv.h uses the less_than template inside
not-actually-static static ifs clang still ends up validating generated
code inside a FOLLY_RANGE_CHECK which is never executed due to the
templated types. This code however still generates -Wsign-compare issues
so suppress that in order to allow includers to use this flag.

A simple example will illustrate this:

uint64_t foo = 1;
int bar = folly::to<int>(foo);

Test Plan: fbmake runtests

Reviewed By: meyering@fb.com, njormrod@fb.com

Subscribers: trunkagent, folly-diffs@, bmatheny, ranjeeth, subodh, kmdent, fma, shikong, pgriess, jdelong

FB internal diff: D1731411

Signature: t1:1731411:1418243200:ed1f34a1485669c9cb18f9f6029aca70e498953c
folly/Traits.h