adding is_non_positive traits
authorMarcelo Juchem <marcelo@fb.com>
Tue, 12 Mar 2013 22:55:06 +0000 (15:55 -0700)
committerJordan DeLong <jdelong@fb.com>
Tue, 19 Mar 2013 00:09:08 +0000 (17:09 -0700)
commit1bf1654c689b31ac7b53f499b8f1810548fbda7a
tree1cd41ce53066aa8da24401faa857e08c1343f2ab
parente4f530f84abb296327f2e8d986a38fce660dcd71
adding is_non_positive traits

Summary:
template <typename SomeInt>
void foo(SomeInt x) {
// yields an error in clang when SomeInt is unsigned and -Werror is used
if(x <= 0) {
//...
}
}

Test Plan: added unit tests

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D735735
folly/Traits.h
folly/test/TraitsTest.cpp