summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/negators
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-01-07 20:31:06 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-01-07 20:31:06 +0000
commit66369c03a387f6c27cc92ba6184433daa4989dd2 (patch)
treee1fae2848f1dd7890b27cf1cc1a76048adff40c2 /libcxx/test/std/utilities/function.objects/negators
parent627df427eb718d42669265d58a80607272ac9ccf (diff)
downloadbcm5719-llvm-66369c03a387f6c27cc92ba6184433daa4989dd2.tar.gz
bcm5719-llvm-66369c03a387f6c27cc92ba6184433daa4989dd2.zip
In C++03, a bunch of the arithmetic/logical/comparison functors (such as add/equal_to/logical_or) were defined as deriving from binary_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: 225375
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/negators')
-rw-r--r--libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
index e30670836c5..53ff5b47a3a 100644
--- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::binary_negate<std::logical_and<int> > F;
const F f = F(std::logical_and<int>());
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );
+ static_assert((std::is_same<bool, F::result_type>::value), "" );
assert(!f(36, 36));
assert( f(36, 0));
assert( f(0, 36));
OpenPOWER on IntegriCloud