diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-01-07 21:51:30 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-01-07 21:51:30 +0000 |
commit | 601fa8d824de4cc2cbc42c422b25fbdfe3b7dd32 (patch) | |
tree | bb0d04a883c0f7b2f3c6275ac82a48ba134e1ed6 /libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp | |
parent | 136ea3f97b64f82666cb6c8803321e7160af16c7 (diff) | |
download | bcm5719-llvm-601fa8d824de4cc2cbc42c422b25fbdfe3b7dd32.tar.gz bcm5719-llvm-601fa8d824de4cc2cbc42c422b25fbdfe3b7dd32.zip |
In C++03, a bunch of the arithmetic/logical/comparison functors (such as negate/bit_not.pass/logical_not) were defined as deriving from unary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion.
llvm-svn: 225402
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp index 2aa4f0ab448..e2498a3b52e 100644 --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp @@ -19,7 +19,8 @@ int main() { typedef std::unary_negate<std::logical_not<int> > F; const F f = F(std::logical_not<int>()); - static_assert((std::is_base_of<std::unary_function<int, bool>, F>::value), ""); + static_assert((std::is_same<F::argument_type, int>::value), "" ); + static_assert((std::is_same<F::result_type, bool>::value), "" ); assert(f(36)); assert(!f(0)); } |