| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame^] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // <functional> |
| Marshall Clow | 7d210c7 | 2017-04-13 18:25:32 +0000 | [diff] [blame] | 10 | // REQUIRES: c++98 || c++03 || c++11 || c++14 |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 11 | |
| Howard Hinnant | 5cf4e1f | 2010-08-22 00:20:12 +0000 | [diff] [blame] | 12 | // template <class Fn, class T> |
| Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 13 | // binder1st<Fn> |
| 14 | // bind1st(const Fn& fn, const T& x); |
| 15 | |
| 16 | #include <functional> |
| 17 | #include <cassert> |
| 18 | |
| 19 | #include "../test_func.h" |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | assert(std::bind1st(test_func(1), 5)(10.) == -5.); |
| 24 | } |