| 320 | |
| 321 | template <class F> |
| 322 | struct predicate |
| 323 | { |
| 324 | std::string msg; |
| 325 | F f; |
| 326 | |
| 327 | friend std::ostream& operator<<(std::ostream& s, const predicate& self) |
| 328 | { |
| 329 | s << self.msg; |
| 330 | return s; |
| 331 | } |
| 332 | |
| 333 | decltype(auto) operator()() const { return f(); } |
| 334 | |
| 335 | operator decltype(auto)() const { return f(); } |
| 336 | }; |
| 337 | |
| 338 | template <class F> |
| 339 | auto make_predicate(const std::string& msg, F f) |