1bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//===----------------------------------------------------------------------===//
2bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
3f5256e16dfc425c1d466f6308d4026d529ce9e0bHoward Hinnant//                     The LLVM Compiler Infrastructure
4bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
5b64f8b07c104c6cc986570ac8ee0ed16a9f23976Howard Hinnant// This file is dual licensed under the MIT and the University of Illinois Open
6b64f8b07c104c6cc986570ac8ee0ed16a9f23976Howard Hinnant// Source Licenses. See LICENSE.TXT for details.
7bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
8bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//===----------------------------------------------------------------------===//
9bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
10bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// <set>
11bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
12bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// template <class Key, class Compare = less<Key>,
13bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//           class Allocator = allocator<Key>>
14bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// class multiset
15bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// {
16bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// public:
17bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     // types:
18bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef Key                                      key_type;
19bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef key_type                                 value_type;
20bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef Compare                                  key_compare;
21bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef key_compare                              value_compare;
22bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef Allocator                                allocator_type;
23bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::reference       reference;
24bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::const_reference const_reference;
25bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::pointer         pointer;
26bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::const_pointer   const_pointer;
27bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::size_type       size_type;
28bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     typedef typename allocator_type::difference_type difference_type;
29bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//     ...
30bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// };
31bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
32bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant#include <set>
33bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant#include <type_traits>
34bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
35061d0cc4db18d17bf01ed14c5db0be098205bd47Marshall Clow#include "min_allocator.h"
3670342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant
37bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnantint main()
38bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant{
3970342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    {
40bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::key_type, int>::value), "");
41bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::value_type, int>::value), "");
42bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::key_compare, std::less<int> >::value), "");
43bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::value_compare, std::less<int> >::value), "");
44bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::allocator_type, std::allocator<int> >::value), "");
45bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::reference, int&>::value), "");
46bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::const_reference, const int&>::value), "");
47bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::pointer, int*>::value), "");
48bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::const_pointer, const int*>::value), "");
49bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::size_type, std::size_t>::value), "");
50bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    static_assert((std::is_same<std::multiset<int>::difference_type, std::ptrdiff_t>::value), "");
5170342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    }
5270342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant#if __cplusplus >= 201103L
5370342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    {
5470342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::key_type, int>::value), "");
5570342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::value_type, int>::value), "");
5670342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::key_compare, std::less<int> >::value), "");
5770342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::value_compare, std::less<int> >::value), "");
5870342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::allocator_type, min_allocator<int>>::value), "");
5970342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::reference, int&>::value), "");
6070342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::const_reference, const int&>::value), "");
6170342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::pointer, min_pointer<int>>::value), "");
6270342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::const_pointer, min_pointer<const int>>::value), "");
6370342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::size_type, std::size_t>::value), "");
6470342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::difference_type, std::ptrdiff_t>::value), "");
6570342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant    }
6670342b99e227912742972b754ad86e75c5d7eefbHoward Hinnant#endif
67bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant}
68