2 // { dg-options "-std=c++11" }
3 // { dg-additional-options "-Wno-return-type" }
7 template <class, class>
11 struct input_iterator_tag
14 struct forward_iterator_tag : public input_iterator_tag
17 template <typename, typename _Tp, typename = _Tp>
24 template <typename _Tp>
28 typedef _Tp value_type;
29 template <typename _Tp1>
32 typedef new_allocator <_Tp1> other;
38 template <typename _Tp>
39 struct allocator : public __gnu_cxx::new_allocator <_Tp>
46 void rtl_string_release (rtl_String *) throw ();
47 void rtl_string_newFromStr (rtl_String * *, const char *) throw ();
51 template <typename, typename, typename> struct binary_function;
52 template <typename _Tp>
53 struct equal_to : public binary_function <_Tp, _Tp, bool>
62 OString (const char *value)
64 rtl_string_newFromStr (&pData, value);
68 rtl_string_release (pData);
75 template <class> struct hash;
78 template <class T, class = boost::hash <T>, class = std::equal_to <T>, class = std::allocator <T>>class unordered_set;
80 using boost::unordered::unordered_set;
86 template <class, class F>
93 template <class, class> struct pointer_to_other;
94 template <class T, class U>
95 struct pointer_to_other <T *, U>
103 template <typename T, T> struct integral_constant
108 typedef char (&type)[9];
110 struct choice8:choice9
113 struct choice7:choice8
116 struct choice6:choice7
119 struct choice5:choice6
122 struct choice4:choice5
125 struct choice3:choice4
128 struct choice2:choice3
131 struct choice1:choice2
135 template <typename Alloc, typename T>
138 typedef typename Alloc::template rebind <T>::other type;
140 template <typename, typename T2>
144 template <typename Tp, typename Default>
145 struct default_type_pointer
147 template <typename X>
148 static boost::unordered::detail::sfinae <typename X::pointer, choice1> test (choice1);
151 typedef Default pointer;
153 enum { value = (1 == sizeof (test <Tp> (choose ()))) };
154 typedef typename boost::detail::if_true <value>::template then <Tp, DefaultWrap>::type::pointer type;
156 template <typename Tp, typename Default>
157 struct default_type_const_pointer
160 static choice2::type test (choice2);
164 enum { value = (1 == sizeof (test <Tp> (choose ()))) };
165 typedef typename boost::detail::if_true <value>::template then <Tp, DefaultWrap> type;
167 struct default_type_propagate_on_container_swap
173 template <typename Alloc>
174 struct allocator_traits
176 typedef typename Alloc::value_type value_type;
177 typedef typename default_type_pointer <Alloc, value_type *>::type pointer;
178 template <typename T>
179 struct pointer_to_other : boost::pointer_to_other <pointer, T>
182 typedef typename default_type_const_pointer <Alloc, typename pointer_to_other <value_type>::type>::type const_pointer;
190 template <typename> struct table;
191 template <typename NodeAlloc>
192 struct node_constructor
194 void construct_value ()
204 template <typename A, typename Bucket, typename Node>
208 typedef Bucket bucket;
209 typedef typename boost::unordered::detail::rebind_wrap <A, node>::type node_allocator;
210 typedef typename boost::unordered::detail::rebind_wrap <A, bucket>::type bucket_allocator;
211 typedef boost::unordered::detail::allocator_traits <node_allocator> node_allocator_traits;
212 typedef boost::unordered::detail::allocator_traits <bucket_allocator> bucket_allocator_traits;
213 typedef typename node_allocator_traits::pointer node_pointer;
214 typedef typename node_allocator_traits::const_pointer const_node_pointer;
215 typedef typename bucket_allocator_traits::pointer bucket_pointer;
216 typedef boost::unordered::detail::node_constructor <node_allocator> node_constructor;
217 bucket_pointer buckets_;
219 template <typename Types>
220 buckets (boost::unordered::detail::table <Types>, boost::unordered::detail::move_tag) : buckets_ (), size_ ()
231 template <class Category, class T, class, class, class>
232 struct iterator_base:std::iterator <Category, T>
236 template <class Category, class T, class Distance, class Pointer = T, class Reference = T>
237 struct iterator:boost::detail::iterator_base <Category, T, Distance, Pointer, Reference>
242 namespace iterator_detail
244 template <typename, typename NodePointer, typename Value> struct c_iterator:public boost::iterator <std::forward_iterator_tag, Value, int>
246 friend bool operator== (c_iterator, c_iterator)
253 template <typename ValueType>
256 typedef ValueType value_type;
261 template <typename Types>
262 struct table:boost::unordered::detail::buckets <typename Types::allocator, typename Types::bucket, typename Types::key_equal>
264 typedef typename Types::value_type value_type;
265 typedef boost::unordered::detail::buckets <typename Types::allocator, typename Types::bucket, typename Types::node> buckets;
266 typedef typename buckets::node_pointer node_pointer;
267 typedef typename buckets::const_node_pointer const_node_pointer;
268 typedef boost::unordered::iterator_detail::c_iterator <const_node_pointer, node_pointer, value_type> c_iterator;
273 template <typename> struct table_impl;
274 template <typename T>
275 struct ptr_node : boost::unordered::detail::value_base <T>, boost::unordered::detail::ptr_bucket
277 boost::unordered::detail::ptr_bucket bucket_base;
279 ptr_node () : bucket_base (), hash_ ()
283 template <typename A, typename T, typename, typename> struct pick_node2
286 template <typename A, typename T> struct pick_node2 <A, T, boost::unordered::detail::ptr_node <T> *, boost::unordered::detail::ptr_bucket *>
288 typedef boost::unordered::detail::ptr_node <T> node;
289 typedef boost::unordered::detail::ptr_bucket bucket;
291 template <typename A, typename T> struct pick_node
293 typedef boost::unordered::detail::allocator_traits <typename boost::unordered::detail::rebind_wrap <A, boost::unordered::detail::ptr_node <T>>::type> tentative_node_traits;
294 typedef boost::unordered::detail::allocator_traits <typename boost::unordered::detail::rebind_wrap <A, boost::unordered::detail::ptr_bucket>::type> tentative_bucket_traits;
295 typedef pick_node2 <A, T, typename tentative_node_traits::pointer, typename tentative_bucket_traits::pointer> pick;
296 typedef typename pick::node node;
297 typedef typename pick::bucket bucket;
299 template <typename A, typename T, typename H, typename P>
302 typedef boost::unordered::detail::set <A, T, H, P> types;
303 typedef T value_type;
305 typedef typename boost::unordered::detail::rebind_wrap <A, value_type>::type allocator;
306 typedef boost::unordered::detail::pick_node <allocator, value_type> pick;
307 typedef typename pick::node node;
308 typedef typename pick::bucket bucket;
309 typedef boost::unordered::detail::table_impl <types> table;
311 template <typename Types>
312 struct table_impl : boost::unordered::detail::table <Types>
314 typedef boost::unordered::detail::table <Types> table;
315 typedef typename table::node_constructor node_constructor;
316 table_impl () : table ()
319 template <class InputIt>
320 void insert_range_impl2 (node_constructor, InputIt)
325 template <class T, class H, class P, class A>
329 typedef T value_type;
330 typedef boost::unordered::detail::set <A, T, H, P> types;
331 typedef typename types::table table;
332 typedef typename table::c_iterator const_iterator;
333 typedef typename table::c_iterator iterator;
342 std::pair <iterator, bool> insert (value_type)
345 unsigned erase (const key_type &);
346 const_iterator find (const key_type);
348 template <class T, class H, class P, class A>
349 unsigned unordered_set <T, H, P, A>::erase (const key_type &)
354 using namespace::rtl;
355 namespace skeletonmaker
358 checkDefaultInterfaces (boost::unordered_set <OString, OStringHash> interfaces,
359 boost::unordered_set <OStringHash> services, OString)
361 if (services.empty ())
362 interfaces.erase ("com.sun.star.lang.XServiceInfo");
363 else if (interfaces.find ("com.sun.star.lang.XServiceInfo") == interfaces.end ())
364 interfaces.insert ("com.sun.star.lang.XServiceInfo");