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
13 struct empty
14 {
operator ==(const empty &,const empty &)15 friend bool operator == (const empty &, const empty &){ return true; }
operator <(const empty &,const empty &)16 friend bool operator < (const empty &, const empty &){ return true; }
17 };
18
19 template class ::boost::container::flat_set<empty>;
20 template class ::boost::container::flat_multiset<empty>;
21
22 volatile ::boost::container::flat_set<empty> dummy;
23 volatile ::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
33 namespace boost {
34 namespace container {
35
36 //Explicit instantiation to detect compilation errors
37
38 //flat_set
39 template 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
46 template 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
52 template 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
58 template 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
72 namespace boost{
73 namespace container{
74
75 template 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
main()85 int main()
86 {
87 return 0;
88 }
89