Add unary and binary bind overloads
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2011 19:55:59 +0000 (19:55 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2011 19:55:59 +0000 (19:55 +0000)
commit78de5a505224500b8b75b78350104f5120f00a18
tree5cb185a5bfdf1eca9f429b27c561106083056051
parented063fd2cacfd2b020d656679cf10394f95adae1
Add unary and binary bind overloads
https://bugs.webkit.org/show_bug.cgi?id=74524

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* wtf/Functional.h:
(WTF::R):
(WTF::FunctionWrapper::ResultType):
(WTF::bind):

Tools:

Add tests.

* TestWebKitAPI/Tests/WTF/Functional.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::multiplyByTwo):
(TestWebKitAPI::multiplyByOneAndAHalf):
(TestWebKitAPI::multiply):
(TestWebKitAPI::subtract):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/Functional.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/Functional.cpp