Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/multi_index/detail/unbounded.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
1 /* Copyright 2003-2008 Joaquin M Lopez Munoz. | 1 /* Copyright 2003-2013 Joaquin M Lopez Munoz. |
2 * Distributed under the Boost Software License, Version 1.0. | 2 * Distributed under the Boost Software License, Version 1.0. |
3 * (See accompanying file LICENSE_1_0.txt or copy at | 3 * (See accompanying file LICENSE_1_0.txt or copy at |
4 * http://www.boost.org/LICENSE_1_0.txt) | 4 * http://www.boost.org/LICENSE_1_0.txt) |
5 * | 5 * |
6 * See http://www.boost.org/libs/multi_index for library home page. | 6 * See http://www.boost.org/libs/multi_index for library home page. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP | 9 #ifndef BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP |
10 #define BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP | 10 #define BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP |
11 | 11 |
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200) | 12 #if defined(_MSC_VER) |
13 #pragma once | 13 #pragma once |
14 #endif | 14 #endif |
15 | 15 |
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ | 16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ |
17 #include <boost/detail/workaround.hpp> | 17 #include <boost/detail/workaround.hpp> |
20 | 20 |
21 namespace multi_index{ | 21 namespace multi_index{ |
22 | 22 |
23 /* dummy type and variable for use in ordered_index::range() */ | 23 /* dummy type and variable for use in ordered_index::range() */ |
24 | 24 |
25 #if BOOST_WORKAROUND(BOOST_MSVC,<1300) | |
26 /* The default branch actually works for MSVC 6.0, but seems like | |
27 * this implementation of unbounded improves the performance of ordered | |
28 * indices! This behavior is hard to explain and probably a test artifact, | |
29 * but it does not hurt to have the workaround anyway. | |
30 */ | |
31 | |
32 namespace detail{struct unbounded_type{};} | |
33 | |
34 namespace{ | |
35 | |
36 static detail::unbounded_type unbounded_obj=detail::unbounded_type(); | |
37 static detail::unbounded_type& unbounded=unbounded_obj; | |
38 | |
39 } /* unnamed */ | |
40 #else | |
41 /* ODR-abiding technique shown at the example attached to | 25 /* ODR-abiding technique shown at the example attached to |
42 * http://lists.boost.org/Archives/boost/2006/07/108355.php | 26 * http://lists.boost.org/Archives/boost/2006/07/108355.php |
43 */ | 27 */ |
44 | 28 |
45 namespace detail{class unbounded_helper;} | 29 namespace detail{class unbounded_helper;} |
61 | 45 |
62 inline detail::unbounded_helper unbounded(detail::unbounded_helper) | 46 inline detail::unbounded_helper unbounded(detail::unbounded_helper) |
63 { | 47 { |
64 return detail::unbounded_helper(); | 48 return detail::unbounded_helper(); |
65 } | 49 } |
66 #endif | |
67 | 50 |
68 /* tags used in the implementation of range */ | 51 /* tags used in the implementation of range */ |
69 | 52 |
70 namespace detail{ | 53 namespace detail{ |
71 | 54 |