1//////////////////////////////////////////////////////////////////////////////
2//
3// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
4// Software License, Version 1.0. (See accompanying file
5// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6//
7// See http://www.boost.org/libs/container for documentation.
8//
9//////////////////////////////////////////////////////////////////////////////
10
11#include <boost/container/flat_set.hpp>
12
13struct empty
14{
15 friend bool operator == (const empty &, const empty &){ return true; }
16 friend bool operator < (const empty &, const empty &){ return true; }
17};
18
19template class ::boost::container::flat_set<empty>;
20template class ::boost::container::flat_multiset<empty>;
21
22volatile ::boost::container::flat_set<empty> dummy;
23volatile ::boost::container::flat_multiset<empty> dummy2;
24
25#include <boost/container/allocator.hpp>
26#include "movable_int.hpp"
27#include "dummy_test_allocator.hpp"
28#include <boost/container/stable_vector.hpp>
29#include <boost/container/small_vector.hpp>
30#include <boost/container/deque.hpp>
31#include <boost/container/static_vector.hpp>
32
33namespace boost {
34namespace container {
35
36//Explicit instantiation to detect compilation errors
37
38//flat_set
39template class flat_set
40 < test::movable_and_copyable_int
41 , std::less<test::movable_and_copyable_int>
42 , small_vector<test::movable_and_copyable_int, 10, allocator<test::movable_and_copyable_int> >
43 >;
44
45//flat_multiset
46template class flat_multiset
47 < test::movable_and_copyable_int
48 , std::less<test::movable_and_copyable_int>
49 , stable_vector<test::movable_and_copyable_int, test::simple_allocator<test::movable_and_copyable_int> >
50 >;
51
52template class flat_multiset
53 < test::movable_and_copyable_int
54 , std::less<test::movable_and_copyable_int>
55 , deque<test::movable_and_copyable_int, test::simple_allocator< test::movable_and_copyable_int > >
56 >;
57
58template class flat_multiset
59 < test::movable_and_copyable_int
60 , std::less<test::movable_and_copyable_int>
61 , static_vector<test::movable_and_copyable_int, 10 >
62 >;
63
64//As flat container iterators are typedefs for vector::[const_]iterator,
65//no need to explicit instantiate them
66
67}} //boost::container
68
69#if (__cplusplus > 201103L)
70#include <vector>
71
72namespace boost{
73namespace container{
74
75template class flat_set
76 < test::movable_and_copyable_int
77 , std::less<test::movable_and_copyable_int>
78 , std::vector<test::movable_and_copyable_int>
79>;
80
81}} //boost::container
82
83#endif
84
85int main()
86{
87 return 0;
88}
89

source code of boost/libs/container/test/explicit_inst_flat_set_test.cpp