std::unordered_multiset<int> const build_unordered_multiset()
{
    typedef std::unordered_set<int> int_set;
    typedef std::unordered_multiset<int> int_multiset;
    int_set const data = build_unordered_set();
    return int_multiset(data.begin(), data.end());
}
Example #2
0
static bool operator==(int_set const & v1, int_splay_tree const & v2) {
    buffer<int> b;
    // std::cout << v2 << "\n";
    // std::for_each(v1.begin(), v1.end(), [](int v) { std::cout << v << " "; }); std::cout << "\n";
    v2.to_buffer(b);
    if (v1.size() != b.size())
        return false;
    for (unsigned i = 0; i < b.size(); i++) {
        if (v1.find(b[i]) == v1.end())
            return false;
    }
    return true;
}
Example #3
0
	FCPPT_PP_DISABLE_GCC_WARNING(-Wunused-local-typedefs)
		typedef
		void
		is_transparent;
	FCPPT_PP_POP_WARNING
	};

	typedef
	std::set<
		int,
		comp
	>
	int_set;

	int_set const set{
		1,2,3
	};

	typedef
	fcppt::optional::reference<
		int const
	>
	optional_int_ref;

	BOOST_CHECK_EQUAL(
		fcppt::container::find_opt(
			set,
			strong_int(
				3
			)
		),