<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 12:31 PM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: marshall<br>
Date: Wed Jan 7 14:31:06 2015<br>
New Revision: 225375<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225375&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225375&view=rev</a><br>
Log:<br>
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.<br></blockquote><div><br>Are there any tests around to ensure the C++03 behavior remains in C++03? Or is that not worth worrying about/preserving/implementing?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp<br>
libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::divides<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(36, 4) == 9);<br>
#if _LIBCPP_STD_VER > 11<br>
typedef std::divides<> F2;<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::minus<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(3, 2) == 1);<br>
#if _LIBCPP_STD_VER > 11<br>
typedef std::minus<> F2;<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::modulus<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(36, 8) == 4);<br>
#if _LIBCPP_STD_VER > 11<br>
typedef std::modulus<> F2;<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::multiplies<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(3, 2) == 6);<br>
#if _LIBCPP_STD_VER > 11<br>
typedef std::multiplies<> F2;<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::plus<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(3, 2) == 5);<br>
#if _LIBCPP_STD_VER > 11<br>
typedef std::plus<> F2;<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::bit_and<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(0xEA95, 0xEA95) == 0xEA95);<br>
assert(f(0xEA95, 0x58D3) == 0x4891);<br>
assert(f(0x58D3, 0xEA95) == 0x4891);<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::bit_or<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(0xEA95, 0xEA95) == 0xEA95);<br>
assert(f(0xEA95, 0x58D3) == 0xFAD7);<br>
assert(f(0x58D3, 0xEA95) == 0xFAD7);<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::bit_xor<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::result_type>::value), "" );<br>
assert(f(0xEA95, 0xEA95) == 0);<br>
assert(f(0xEA95, 0x58D3) == 0xB246);<br>
assert(f(0x58D3, 0xEA95) == 0xB246);<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::equal_to<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(f(36, 36));<br>
assert(!f(36, 6));<br>
#if _LIBCPP_STD_VER > 11<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/greater.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::greater<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(!f(36, 36));<br>
assert(f(36, 6));<br>
assert(!f(6, 36));<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::greater_equal<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(f(36, 36));<br>
assert(f(36, 6));<br>
assert(!f(6, 36));<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::less_equal<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(f(36, 36));<br>
assert(!f(36, 6));<br>
assert(f(6, 36));<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::not_equal_to<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(!f(36, 36));<br>
assert(f(36, 6));<br>
#if _LIBCPP_STD_VER > 11<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::logical_and<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(f(36, 36));<br>
assert(!f(36, 0));<br>
assert(!f(0, 36));<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::logical_or<int> F;<br>
const F f = F();<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(f(36, 36));<br>
assert(f(36, 0));<br>
assert(f(0, 36));<br>
<br>
Modified: libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp?rev=225375&r1=225374&r2=225375&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp (original)<br>
+++ libcxx/trunk/test/std/utilities/function.objects/negators/binary_negate.pass.cpp Wed Jan 7 14:31:06 2015<br>
@@ -19,7 +19,9 @@ int main()<br>
{<br>
typedef std::binary_negate<std::logical_and<int> > F;<br>
const F f = F(std::logical_and<int>());<br>
- static_assert((std::is_base_of<std::binary_function<int, int, bool>, F>::value), "");<br>
+ static_assert((std::is_same<int, F::first_argument_type>::value), "" );<br>
+ static_assert((std::is_same<int, F::second_argument_type>::value), "" );<br>
+ static_assert((std::is_same<bool, F::result_type>::value), "" );<br>
assert(!f(36, 36));<br>
assert( f(36, 0));<br>
assert( f(0, 36));<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>