3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

use universal reference

This commit is contained in:
Jakob Rath 2023-07-20 17:03:38 +02:00
parent e533c6c78d
commit 6d00d18ee4

View file

@ -363,7 +363,7 @@ void set_fatal_error_handler(void (*pfn)(int error_code));
template<typename S, typename T>
bool any_of(S& set, T const& p) {
bool any_of(S&& set, T const& p) {
for (auto const& s : set)
if (p(s))
return true;
@ -371,7 +371,7 @@ bool any_of(S& set, T const& p) {
}
template<typename S, typename T>
bool all_of(S& set, T const& p) {
bool all_of(S&& set, T const& p) {
for (auto const& s : set)
if (!p(s))
return false;