summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
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/comparisons/less_equal.pass.cpp
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/comparisons/less_equal.pass.cpp')
-rw-r--r--libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
index 116906eaafe..e6ba1f7f8a2 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
@@ -19,7 +19,9 @@ int main()
{
typedef std::less_equal<int> F;
const F f = F();
- 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, 6));
assert(f(6, 36));
OpenPOWER on IntegriCloud