| 1 | |
| 2 | // Copyright 2017 Daniel James. |
| 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | |
| 6 | #include <boost/unordered_map.hpp> |
| 7 | #include <boost/unordered_set.hpp> |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | #if defined(UNORDERED_TEST_MAP) |
| 12 | typedef boost::unordered_map<int, int> container; |
| 13 | container x; |
| 14 | x.emplace(args: 1, args: 1); |
| 15 | #elif defined(UNORDERED_TEST_MULTIMAP) |
| 16 | typedef boost::unordered_multimap<int, int> container; |
| 17 | container x; |
| 18 | #elif defined(UNORDERED_TEST_SET) |
| 19 | typedef boost::unordered_set<int> container; |
| 20 | container x; |
| 21 | x.emplace(1); |
| 22 | #elif defined(UNORDERED_TEST_MULTISET) |
| 23 | typedef boost::unordered_multiset<int> container; |
| 24 | container x; |
| 25 | x.emplace(1); |
| 26 | #else |
| 27 | #define UNORDERED_ERROR |
| 28 | #endif |
| 29 | |
| 30 | #if !defined(UNORDERED_ERROR) |
| 31 | container::node_type n = x.extract(position: x.begin()); |
| 32 | x.insert(n); |
| 33 | #endif |
| 34 | } |
| 35 | |