Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / depr / depr.lib.binders / depr.lib.bind.2nd / bind2nd.pass.cpp
blobb7cfd603b6a0160cf5a9afb0c435b2da380d1b1e
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // <functional>
11 // template <class Fn, class T>
12 // binder2nd<Fn>
13 // bind2nd(const Fn& op, const T& x);
15 // REQUIRES: c++03 || c++11 || c++14
16 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
18 #include <functional>
19 #include <cassert>
21 #include "test_macros.h"
22 #include "../test_func.h"
24 int main(int, char**)
26 assert(std::bind2nd(test_func(1), 5)(10) == 5.);
28 return 0;