Skip to content

Commit

Permalink
Explain passing template function as an argument
Browse files Browse the repository at this point in the history
Addresses (maybe) #81055 (comment)
  • Loading branch information
JMazurkiewicz committed Mar 14, 2024
1 parent 730b4e7 commit 50d4023
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ void test() {
static_assert(f1() == 1); // expected-error {{static assertion expression is not an integral constant expression}}
}

{ // Various failures
auto d = std::bind_back(do_nothing, 2); // expected-error {{no matching function for call to 'bind_back'}}
{ // Test calling `bind_back` with template function
auto f1 = std::bind_back(do_nothing, 2);
// expected-error@-1 {{no matching function for call to 'bind_back'}}
}

{ // Mandates: is_constructible_v<decay_t<F>, F>
Expand Down

0 comments on commit 50d4023

Please sign in to comment.