| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // template <ObjectType T> reference_wrapper<T> ref(reference_wrapper<T>t); |
| #include "counting_predicates.hpp" |
| bool is5 ( int i ) { return i == 5; } |
| bool call_pred ( T pred ) { return pred(5); } |
| std::reference_wrapper<int> r1 = std::ref(i); |
| std::reference_wrapper<int> r2 = std::ref(r1); |
| unary_counting_predicate<bool(*)(int), int> cp(is5); |
| assert(call_pred(std::ref(cp))); |