	#include <vector>
	#include <algorithm>
	#include <functional>
	#include <iostream>

	using find_ten_t = std::pair<std::reference_wrapper<const std::vector<int>>, std::vector<int>::const_iterator>;

	auto find_ten = [](const std::vector<int>& v1, const std::vector<int>& v2) -> find_ten_t {
		auto it1 = std::find(v1.cbegin(), v1.cend(), 10);
		if (it1 != v1.cend()) {
			return std::make_pair(std::ref(v1), it1);
		}
		auto it2 = std::find(v2.cbegin(), v2.cend(), 10);
		return std::make_pair(std::cref(v2), it2);
	};

	int main() {
		std::vector<int> v1{ 1, 2, 3 };
		std::vector<int> v2{ 3, 4, 10 };
		auto r = find_ten(v1, v2);
		std::cout << "r.first[0] = " << r.first.get()[0] << "\n";
	}