| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| Howard Hinnant | 5b08a8a | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 4 | // |
| Howard Hinnant | 412dbeb | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <functional> |
| Marshall Clow | 7d210c7 | 2017-04-13 18:25:32 +0000 | [diff] [blame^] | 11 | // REQUIRES: c++98 || c++03 || c++11 || c++14 |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 12 | |
| Howard Hinnant | 5cf4e1f | 2010-08-22 00:20:12 +0000 | [diff] [blame] | 13 | // template <class Fn, class T> |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 14 | // binder1st<Fn> |
| 15 | // bind1st(const Fn& fn, const T& x); |
| 16 | |
| 17 | #include <functional> |
| 18 | #include <cassert> |
| 19 | |
| 20 | #include "../test_func.h" |
| 21 | |
| 22 | int main() |
| 23 | { |
| 24 | assert(std::bind1st(test_func(1), 5)(10.) == -5.); |
| 25 | } |