1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
13 // template <class F, class... Args>
14 // constexpr unspecified bind_front(F&&, Args&&...);
18 constexpr int pass(const int n
) { return n
; }
20 int simple(int n
) { return n
; }
23 T
do_nothing(T t
) { return t
; }
27 NotMoveConst(NotMoveConst
&&) = delete;
28 NotMoveConst(NotMoveConst
const&) = delete;
33 void testNotMoveConst(NotMoveConst
) { }
39 auto p
= std::bind_front(pass
, c
);
40 static_assert(p() == 1); // expected-error {{static assertion expression is not an integral constant expression}}
42 auto d
= std::bind_front(do_nothing
, n
); // expected-error {{no matching function for call to 'bind_front'}}
44 auto t
= std::bind_front(testNotMoveConst
, NotMoveConst(0)); // expected-error {{no matching function for call to 'bind_front'}}