1 /* Boost.Flyweight test of assoc_container_factory.
3 * Copyright 2006-2008 Joaquin M Lopez Munoz.
4 * Distributed under the Boost Software License, Version 1.0.
5 * (See accompanying file LICENSE_1_0.txt or copy at
6 * http://www.boost.org/LICENSE_1_0.txt)
8 * See http://www.boost.org/libs/flyweight for library home page.
11 #include "test_assoc_cont_factory.hpp"
13 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
14 #include <boost/flyweight/assoc_container_factory.hpp>
15 #include <boost/flyweight/flyweight.hpp>
16 #include <boost/flyweight/refcounted.hpp>
17 #include <boost/flyweight/simple_locking.hpp>
18 #include <boost/flyweight/static_holder.hpp>
21 #include "test_basic_template.hpp"
23 using namespace boost::flyweights
;
25 struct reverse_set_specifier
27 template<typename Entry
,typename Key
>
30 typedef std::set
<Entry
,std::greater
<Key
> > type
;
34 struct assoc_container_factory_flyweight_specifier1
41 assoc_container_factory
<reverse_set_specifier
>
46 struct assoc_container_factory_flyweight_specifier2
53 assoc_container_factory_class
<
56 std::greater
<boost::mpl::_2
>,
57 std::allocator
<boost::mpl::_1
>
64 void test_assoc_container_factory()
66 test_basic_template
<assoc_container_factory_flyweight_specifier1
>();
67 test_basic_template
<assoc_container_factory_flyweight_specifier2
>();